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

This commit is contained in:
iboyeau 2023-03-30 09:53:55 +02:00
commit 51b578036d

View File

@ -77,18 +77,22 @@ public class AccessPoint {
//interférences si les deux cellules parlent au même UE sur le même time slot //interférences si les deux cellules parlent au même UE sur le même time slot
User user1 = frameCell1[k][l].getUser(); User user1 = frameCell1[k][l].getUser();
User user2 = frameCell2[k][l].getUser(); User user2 = frameCell2[k][l].getUser();
if (user1 == user2) { if (user1 == user2 && (user1 != null || user2 != null)) {
double bandwidth1 = frameCell1[k][l].getBandwidth(); double bandwidth1 = frameCell1[k][l].getBandwidth();
double bandwidth2 = frameCell2[k][l].getBandwidth(); double bandwidth2 = frameCell2[k][l].getBandwidth();
//User proche //User proche
if (user1.getDistance() < 200d) { if (user1.getDistance() < 200d) {
frameCell1[k][l].getUser().getBandwidthTable()[k][l] = bandwidth1 / 2; frameCell1[k][l].getUser().getBandwidthTable()[k][l] = bandwidth1 / 2;
frameCell2[k][l].getUser().getBandwidthTable()[k][l] = bandwidth2 / 2; frameCell2[k][l].getUser().getBandwidthTable()[k][l] = bandwidth2 / 2;
//System.out.println("Interference Cell1 /2 ="+frameCell1[k][l].getUser().getBandwidthTable()[k][l]);
//System.out.println("Interference Cell2 /2 ="+frameCell2[k][l].getUser().getBandwidthTable()[k][l]);
} }
//User loin //User loin
else { else {
frameCell1[k][l].getUser().getBandwidthTable()[k][l] = bandwidth1 / 4; frameCell1[k][l].getUser().getBandwidthTable()[k][l] = bandwidth1 / 4;
frameCell2[k][l].getUser().getBandwidthTable()[k][l] = bandwidth2 / 4; frameCell2[k][l].getUser().getBandwidthTable()[k][l] = bandwidth2 / 4;
//System.out.println("Interference Cell1 /4 ="+frameCell1[k][l].getUser().getBandwidthTable()[k][l]);
//System.out.println("Interference Cell2 /4 ="+frameCell2[k][l].getUser().getBandwidthTable()[k][l]);
} }
} }
} }