Merge remote-tracking branch 'origin/ajout_cellule' into ajout_cellule
This commit is contained in:
commit
51b578036d
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user