diff --git a/src/main/java/fr/ntr/scheduler/MaxSNR.java b/src/main/java/fr/ntr/scheduler/MaxSNR.java index d825ec1..2a1fefe 100644 --- a/src/main/java/fr/ntr/scheduler/MaxSNR.java +++ b/src/main/java/fr/ntr/scheduler/MaxSNR.java @@ -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 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 Users) { - + private User selectionUtilisateur(int sp, int ts, List 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; + } + } + return userMax; } - public MaxSNR(String name) { - this.name = name; - } - - }