From 0bd32626f298823b41dc63c8c7d29ebcd42e4a49 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Fri, 24 Mar 2023 09:08:14 +0100 Subject: [PATCH] Do multiple time the simulation depending of the number of users --- src/main/java/fr/ntr/Main.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/fr/ntr/Main.java b/src/main/java/fr/ntr/Main.java index 5f2551f..f130aa3 100644 --- a/src/main/java/fr/ntr/Main.java +++ b/src/main/java/fr/ntr/Main.java @@ -24,11 +24,13 @@ public class Main { } int timeSlotNb = 2; int subCarrierNb = 100; - List 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 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");