fix SNR
This commit is contained in:
parent
d78d422a07
commit
21815c03da
@ -35,9 +35,11 @@ public class MaxSNR extends Scheduler {
|
|||||||
double maxSnr = 0.0;
|
double maxSnr = 0.0;
|
||||||
User userMax = null;
|
User userMax = null;
|
||||||
for(User u: users){
|
for(User u: users){
|
||||||
if (maxSnr < u.getBandwidthTable()[ts][sp]) {
|
if(!u.getPacketsToSend().isEmpty()) {
|
||||||
maxSnr = u.getBandwidthTable()[ts][sp];
|
if (maxSnr < u.getBandwidthTable()[ts][sp]) {
|
||||||
userMax = u;
|
maxSnr = u.getBandwidthTable()[ts][sp];
|
||||||
|
userMax = u;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return userMax;
|
return userMax;
|
||||||
|
Reference in New Issue
Block a user