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