Do multiple time the simulation depending of the number of users

This commit is contained in:
Quentin Legot 2023-03-24 09:08:14 +01:00
parent 97bdda71ce
commit 0bd32626f2

View File

@ -24,11 +24,13 @@ public class Main {
}
int timeSlotNb = 2;
int subCarrierNb = 100;
List<User> users = generateUsers(maximumLoad, timeSlotNb, subCarrierNb);
ResourceBlock[][] frame = new ResourceBlock[timeSlotNb][subCarrierNb];
Scheduler scheduler = new RoundRobin("round robin", 0, frame, users);
AccessPoint accessPoint = new AccessPoint(scheduler, frame, users, timeSlotNb, subCarrierNb, 0, 50);
accessPoint.startSimulation(numberOfTicks);
for(int i = 2; i < maximumLoad; i+=2) {
List<User> users = generateUsers(i, timeSlotNb, subCarrierNb);
ResourceBlock[][] frame = new ResourceBlock[timeSlotNb][subCarrierNb];
Scheduler scheduler = new RoundRobin("round robin", 0, frame, users);
AccessPoint accessPoint = new AccessPoint(scheduler, frame, users, timeSlotNb, subCarrierNb, 0, 50);
accessPoint.startSimulation(numberOfTicks);
}
}
else {
System.err.println("Please give launch arguments");