blabla
This commit is contained in:
parent
362684f1f8
commit
69203e1646
@ -54,4 +54,4 @@ public class AccessPoint {
|
|||||||
public int getFrameSize(){
|
public int getFrameSize(){
|
||||||
return this.timeSlotNb * this.subCarrierNb;
|
return this.timeSlotNb * this.subCarrierNb;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -19,4 +19,4 @@ public class Main {
|
|||||||
|
|
||||||
System.out.println("Hello World");
|
System.out.println("Hello World");
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -13,4 +13,4 @@ public class Packets {
|
|||||||
this.bitsNumberRemaining = bitsNumberRemaining;
|
this.bitsNumberRemaining = bitsNumberRemaining;
|
||||||
this.user = user;
|
this.user = user;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,14 +5,22 @@ import fr.ntr.User;
|
|||||||
public class MaxSNR extends Scheduler {
|
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