fix MaxSNR
This commit is contained in:
parent
4e229dbed8
commit
671ccd2b18
@ -35,12 +35,14 @@ public class MaxSNR extends Scheduler {
|
|||||||
private User userSelection(int ts, int sp) {
|
private User userSelection(int ts, int sp) {
|
||||||
double maxSnr = 0.0;
|
double maxSnr = 0.0;
|
||||||
User userMax = null;
|
User userMax = null;
|
||||||
for(User u: users){
|
for(User u: users) {
|
||||||
|
if (!u.getPacketsToSend().isEmpty()) {
|
||||||
if (maxSnr < u.getBandwidthTable()[ts][sp]) {
|
if (maxSnr < u.getBandwidthTable()[ts][sp]) {
|
||||||
maxSnr = u.getBandwidthTable()[ts][sp];
|
maxSnr = u.getBandwidthTable()[ts][sp];
|
||||||
userMax = u;
|
userMax = u;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return userMax;
|
return userMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user