This commit is contained in:
Tr1xt4n 2023-03-10 09:17:15 +01:00
parent 362684f1f8
commit 69203e1646
5 changed files with 15 additions and 14 deletions

View File

@ -54,4 +54,4 @@ public class AccessPoint {
public int getFrameSize(){ public int getFrameSize(){
return this.timeSlotNb * this.subCarrierNb; return this.timeSlotNb * this.subCarrierNb;
} }
} }

View File

@ -19,4 +19,4 @@ public class Main {
System.out.println("Hello World"); System.out.println("Hello World");
} }
} }

View File

@ -13,4 +13,4 @@ public class Packets {
this.bitsNumberRemaining = bitsNumberRemaining; this.bitsNumberRemaining = bitsNumberRemaining;
this.user = user; this.user = user;
} }
} }

View File

@ -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) {

View File

@ -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);
} }
} }