MaxSnr v1

This commit is contained in:
Tr1xt4n 2023-03-10 11:55:01 +01:00
parent 7e79e7d30e
commit bdb674a63f

View File

@ -1,23 +1,34 @@
package fr.ntr.scheduler;
import java.util.List;
import fr.ntr.AccessPoint;
import fr.ntr.User;
import fr.ntr.UserGroup;
public class MaxSNR extends Scheduler {
private String name;
private List<User> users;
@Override
public void scheduling() {
User userMax = null;
for(int ts = 0; ts < 2; i++){
for(int sp = 0; sp < 100; j++){
userMax = selectionUtilisateur(sp, ts, users);
}
}
}
private void selectionUtilisateur(int Ts, int Sp, List<User> Users) {
private User selectionUtilisateur(int sp, int ts, List<User> Users) {
double MaxSnr = 0.0;
User userMax = null;
for(User u: Users){
if (MaxSnr < u.getBandwidthTable()[ts][sp]){
MaxSnr = u.getBandwidthTable()[ts][sp];
userMax = u;
}
public MaxSNR(String name) {
this.name = name;
}
return userMax;
}
}