Merge remote-tracking branch 'origin/ajout_cellule' into ajout_cellule

This commit is contained in:
iboyeau 2023-03-30 09:00:54 +02:00
commit aa87a868a1
2 changed files with 8 additions and 8 deletions

View File

@ -14,8 +14,8 @@ import fr.ntr.scheduler.Scheduler;
public class AccessPoint {
private Cell cell1;
private Cell cell2;
private final Cell cell1;
private final Cell cell2;
private List<User> users;
private FileOutputStream outputDataFile;
@ -80,14 +80,14 @@ public class AccessPoint {
double bandwidth1 = frameCell1[k][l].getBandwidth();
double bandwidth2 = frameCell2[k][l].getBandwidth();
//User proche
if (user1.getDistance() > 200d) {
frameCell1[k][l].setBandwidth(bandwidth1 / 2);
frameCell2[k][l].setBandwidth(bandwidth2 / 2);
if (user1.getDistance() < 200d) {
frameCell1[k][l].getUser().getBandwidthTable()[k][l] = bandwidth1 / 2;
frameCell2[k][l].getUser().getBandwidthTable()[k][l] = bandwidth2 / 2;
}
//User loin
else {
frameCell1[k][l].setBandwidth(bandwidth1 / 4);
frameCell2[k][l].setBandwidth(bandwidth2 / 4);
frameCell1[k][l].getUser().getBandwidthTable()[k][l] = bandwidth1 / 4;
frameCell2[k][l].getUser().getBandwidthTable()[k][l] = bandwidth2 / 4;
}
}
}

View File

@ -25,7 +25,7 @@ public class Main {
}
int timeSlotNb = 2;
int subCarrierNb = 100;
for(int i = 2; i < maximumLoad; i+=2) {
for(int i = 2; i < maximumLoad; i += 2) {
List<User> users = generateUsers(i, timeSlotNb, subCarrierNb);
ResourceBlock[][] frame = new ResourceBlock[timeSlotNb][subCarrierNb];
//TODO : changes schedulers