diff --git a/src/main/java/fr/ntr/AccessPoint.java b/src/main/java/fr/ntr/AccessPoint.java index b72c2c1..8d836d1 100644 --- a/src/main/java/fr/ntr/AccessPoint.java +++ b/src/main/java/fr/ntr/AccessPoint.java @@ -90,7 +90,9 @@ public class AccessPoint { for(int i = 0; i < frame.length; i++) { for(int j = 0; j < frame[i].length; j++) { ResourceBlock ur = frame[i][j]; - file.write((i + ";" + j + ";" + this.users.indexOf(ur.getUser()) + ";" + ur.getBandwidth() + ";\n").getBytes()); + String data = (i + ";" + j + ";" + this.users.indexOf(ur.getUser()) + ";" + ur.getBandwidth() + ";\n"); + System.out.println("data: " + data); + file.write(data.getBytes()); } } } diff --git a/src/main/java/fr/ntr/Main.java b/src/main/java/fr/ntr/Main.java index 21922b1..3c7457e 100644 --- a/src/main/java/fr/ntr/Main.java +++ b/src/main/java/fr/ntr/Main.java @@ -22,11 +22,9 @@ public class Main { System.exit(1); return; } - //TODO : change timeSlotNb and subCarrierNb - int timeSlotNb = 0; - int subCarrierNb = 0; + int timeSlotNb = 2; + int subCarrierNb = 100; List users = generateUsers(20, timeSlotNb, subCarrierNb); - //TODO : generate users 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);