diff --git a/src/main/java/fr/ntr/Main.java b/src/main/java/fr/ntr/Main.java index ace0947..e012943 100644 --- a/src/main/java/fr/ntr/Main.java +++ b/src/main/java/fr/ntr/Main.java @@ -14,6 +14,11 @@ public class Main { int numberOfTicks; // Nombre de ticks de la simulation -> durée de la simulation int maximumLoad; // Nombre maximal d'utilisateurs dans le système + + //TODO make this cleanly + boolean reuse3=false;//reuse 1 par def sinon reuse 3 + int nbcell = 2; //nombre de cellule que l'on va utilise + try { numberOfTicks = Integer.parseInt(args[0]); maximumLoad = Integer.parseInt(args[1]); @@ -28,18 +33,23 @@ public class Main { for(int i = 2; i < maximumLoad; i += 2) { List users = generateUsers(i, timeSlotNb, subCarrierNb); - //TODO reuse choise + //reuse choise + ResourceBlock[][] frame; + if(reuse3){ + frame = new ResourceBlock[timeSlotNb/nbcell][subCarrierNb]; + } else { + frame = new ResourceBlock[timeSlotNb][subCarrierNb]; + } - ResourceBlock[][] frame = new ResourceBlock[timeSlotNb/2][subCarrierNb]; - //TODO : changes schedulers + //TODO : changes schedulers Scheduler schedulerCell1 = new MaxSNR(frame, users); - Scheduler schedulerCell2 = new MaxSNR(frame, users); - //TODO : modify cells parameters ? + Scheduler schedulerCell2 = new MaxSNR(frame, users); + //TODO : modify cells parameters ? - Cell cell1 = new Cell(schedulerCell1, frame, users, timeSlotNb, subCarrierNb, 0, 50); - Cell cell2 = new Cell(schedulerCell2, frame, users, timeSlotNb, subCarrierNb, 0, 50); - AccessPoint accessPoint = new AccessPoint(cell1, cell2); - accessPoint.startSimulation(numberOfTicks); + Cell cell1 = new Cell(schedulerCell1, frame, users, timeSlotNb, subCarrierNb, 0, 50); + Cell cell2 = new Cell(schedulerCell2, frame, users, timeSlotNb, subCarrierNb, 0, 50); + AccessPoint accessPoint = new AccessPoint(cell1, cell2); + accessPoint.startSimulation(numberOfTicks); } } else {