diff --git a/src/main/java/fr/ntr/AccessPoint.java b/src/main/java/fr/ntr/AccessPoint.java index 6548c5c..aa98c6d 100644 --- a/src/main/java/fr/ntr/AccessPoint.java +++ b/src/main/java/fr/ntr/AccessPoint.java @@ -77,18 +77,22 @@ public class AccessPoint { //interférences si les deux cellules parlent au même UE sur le même time slot User user1 = frameCell1[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 bandwidth2 = frameCell2[k][l].getBandwidth(); //User proche if (user1.getDistance() < 200d) { frameCell1[k][l].getUser().getBandwidthTable()[k][l] = bandwidth1 / 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 else { frameCell1[k][l].getUser().getBandwidthTable()[k][l] = bandwidth1 / 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]); } } }