Main now gives user list to RoundRobin

This commit is contained in:
Loris 2023-03-17 11:13:25 +01:00
parent 7bd16cc191
commit daba62febe
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ public class Main {
List<User> users = generateUsers(20, timeSlotNb, subCarrierNb); List<User> users = generateUsers(20, timeSlotNb, subCarrierNb);
//TODO : generate users //TODO : generate users
ResourceBlock[][] frame = new ResourceBlock[timeSlotNb][subCarrierNb]; ResourceBlock[][] frame = new ResourceBlock[timeSlotNb][subCarrierNb];
Scheduler scheduler = new RoundRobin("round robin", 0, frame); Scheduler scheduler = new RoundRobin("round robin", 0, frame, users);
AccessPoint accessPoint = new AccessPoint(scheduler, frame, users, timeSlotNb, subCarrierNb, 0, 50); AccessPoint accessPoint = new AccessPoint(scheduler, frame, users, timeSlotNb, subCarrierNb, 0, 50);
accessPoint.startSimulation(numberOfTicks, maximumLoad); accessPoint.startSimulation(numberOfTicks, maximumLoad);
} }

View File

@ -15,10 +15,11 @@ public class RoundRobin extends Scheduler {
private List<User> users; private List<User> users;
private ResourceBlock[][] frame; private ResourceBlock[][] frame;
public RoundRobin(String name, int index, ResourceBlock[][] frame) { public RoundRobin(String name, int index, ResourceBlock[][] frame, List<User> users) {
this.name = name; this.name = name;
this.index = index; this.index = index;
this.frame = frame; this.frame = frame;
this.users = users;
} }
/** /**