blabla
This commit is contained in:
parent
362684f1f8
commit
69203e1646
@ -6,13 +6,21 @@ public class MaxSNR extends Scheduler {
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
@Override
|
||||
public void scheduling() {
|
||||
}
|
||||
|
||||
private void selectionUtilisateur(int Ts, int Sp, List<User> Users) {
|
||||
|
||||
private User selectionUtilisateur(int Ts, int Sp, List<User> Users) {
|
||||
User selectedUser = null;
|
||||
double maxSNR= 0;
|
||||
for (User user : Users) {
|
||||
double snr = (Math.log(1 + effSpect) / Math.log(2));
|
||||
if (snr > maxSNR) {
|
||||
maxSNR = snr;
|
||||
selectedUser = user;
|
||||
}
|
||||
}
|
||||
return selectedUser;
|
||||
}
|
||||
|
||||
public MaxSNR(String name) {
|
||||
|
@ -22,12 +22,5 @@ public class RoundRobin extends Scheduler {
|
||||
//Sp =sous porteuse
|
||||
private void selectionUtilisateur(int Ts, int Sp, List<User> Users) {
|
||||
int random = new Random().nextInt(0, Users.size()-1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user