Add timeslot and subcarreir size
This commit is contained in:
parent
daba62febe
commit
275a764752
@ -90,7 +90,9 @@ public class AccessPoint {
|
|||||||
for(int i = 0; i < frame.length; i++) {
|
for(int i = 0; i < frame.length; i++) {
|
||||||
for(int j = 0; j < frame[i].length; j++) {
|
for(int j = 0; j < frame[i].length; j++) {
|
||||||
ResourceBlock ur = frame[i][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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,11 +22,9 @@ public class Main {
|
|||||||
System.exit(1);
|
System.exit(1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//TODO : change timeSlotNb and subCarrierNb
|
int timeSlotNb = 2;
|
||||||
int timeSlotNb = 0;
|
int subCarrierNb = 100;
|
||||||
int subCarrierNb = 0;
|
|
||||||
List<User> users = generateUsers(20, timeSlotNb, subCarrierNb);
|
List<User> users = generateUsers(20, timeSlotNb, subCarrierNb);
|
||||||
//TODO : generate users
|
|
||||||
ResourceBlock[][] frame = new ResourceBlock[timeSlotNb][subCarrierNb];
|
ResourceBlock[][] frame = new ResourceBlock[timeSlotNb][subCarrierNb];
|
||||||
Scheduler scheduler = new RoundRobin("round robin", 0, frame, users);
|
Scheduler scheduler = new RoundRobin("round robin", 0, frame, users);
|
||||||
AccessPoint accessPoint = new AccessPoint(scheduler, frame, users, timeSlotNb, subCarrierNb, 0, 50);
|
AccessPoint accessPoint = new AccessPoint(scheduler, frame, users, timeSlotNb, subCarrierNb, 0, 50);
|
||||||
|
Reference in New Issue
Block a user