This commit is contained in:
iboyeau 2023-03-30 09:00:35 +02:00
parent 21ae722975
commit 89867ad20b
3 changed files with 25 additions and 8 deletions

View File

@ -8,6 +8,8 @@ import java.nio.file.Paths;
import java.util.List;
import java.util.Random;
import fr.ntr.Reuse.Reuse1;
import fr.ntr.Reuse.Reuse3;
import fr.ntr.scheduler.Scheduler;
public class AccessPoint {
@ -43,8 +45,11 @@ public class AccessPoint {
// Simulation
cell1.reset();
cell2.reset();
cell1.updateBandwidth(ticks);
cell2.updateBandwidth(ticks);
List<Cell> cellList = null;
cellList.add(cell1);
cellList.add(cell2);
Reuse1.BandwithReuse1(cellList,ticks);
//Reuse3.BandwithReuse3(cellList,ticks);
cell1.schedule();
cell2.schedule();
@ -123,6 +128,6 @@ public class AccessPoint {
return;
}
}
}
}*/
}
}*/
}

View File

@ -17,13 +17,15 @@ public class ResourceBlock {
this.user = user;
}
public User getUser() {
return user;
}
public void setBandwidth(double bandwidth) {
this.bandwidth = bandwidth;
}
public User getUser() {
return user;
}
public double getBandwidth() {
return bandwidth;

View File

@ -1,5 +1,15 @@
package fr.ntr.Reuse;
import fr.ntr.Cell;
import fr.ntr.User;
import java.util.List;
public class Reuse1 {
//TODO Reuse1
public static void BandwithReuse1(List<Cell> cellList, int tick) {
for (Cell cell : cellList) {
cell.updateBandwidth(tick);
}
}
}