Add timeslot and subcarreir size

This commit is contained in:
Quentin Legot 2023-03-17 11:18:48 +01:00
parent daba62febe
commit 275a764752
2 changed files with 5 additions and 5 deletions

View File

@ -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());
}
}
}

View File

@ -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<User> 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);