javadoc and few warning suppression
This commit is contained in:
parent
b816e3d93e
commit
81f9739a8c
@ -1,9 +1,7 @@
|
|||||||
package fr.ntr;
|
package fr.ntr;
|
||||||
|
|
||||||
import fr.ntr.scheduler.MaxSNR;
|
|
||||||
import fr.ntr.scheduler.Scheduler;
|
import fr.ntr.scheduler.Scheduler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
@ -30,8 +30,14 @@ public class MaxSNR extends Scheduler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ts Time slot (int)
|
||||||
|
* @param sp Sous porteuse(int)
|
||||||
|
* @param Users (List<User>)
|
||||||
|
* Return
|
||||||
|
*/
|
||||||
private User selectionUtilisateur(int sp, int ts, List<User> Users) {
|
private User selectionUtilisateur(int sp, int ts, List<User> Users) {
|
||||||
double MaxSnr = 0.0;
|
double MaxSnr = 0.0;
|
||||||
User userMax = null;
|
User userMax = null;
|
||||||
|
@ -34,17 +34,17 @@ public class RoundRobin extends Scheduler {
|
|||||||
index = random.nextInt(users.size());
|
index = random.nextInt(users.size());
|
||||||
|
|
||||||
//Pour chaque time slot et sous porteuses
|
//Pour chaque time slot et sous porteuses
|
||||||
for (int Ts = 0; Ts < Cell.getTimeSlotNb(); Ts++) {
|
for (int ts = 0; ts < Cell.getTimeSlotNb(); ts++) {
|
||||||
for(int Sp = 0; Sp < Cell.getSubCarrierNb(); Sp++) {
|
for(int sp = 0; sp < Cell.getSubCarrierNb(); sp++) {
|
||||||
if (users.get(index).getPacketsToSend().size() != 0) {
|
if (users.get(index).getPacketsToSend().size() != 0) {
|
||||||
// on enlève le packet transmis de la liste
|
// on enlève le packet transmis de la liste
|
||||||
// TODO Verify sub the packet send need Set packet
|
// TODO Verify sub the packet send need Set packet
|
||||||
users.get(index).getPacketsSent().add(users.get(index).getPacketsToSend().get(0));
|
users.get(index).getPacketsSent().add(users.get(index).getPacketsToSend().get(0));
|
||||||
users.get(index).getPacketsToSend().remove(users.get(index).getPacketsToSend().get(0));
|
users.get(index).getPacketsToSend().remove(users.get(index).getPacketsToSend().get(0));
|
||||||
//on ajoute l'utilisateur a la frame
|
//on ajoute l'utilisateur a la frame
|
||||||
User user = UserSelection(Ts, Sp, users);
|
User user = UserSelection(ts, sp, users);
|
||||||
frame[Ts][Sp].setUser(user);
|
frame[ts][sp].setUser(user);
|
||||||
frame[Ts][Sp].setBandwidth(user.getBandwidthTable()[Ts][Sp]);
|
frame[ts][sp].setBandwidth(user.getBandwidthTable()[ts][sp]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -52,13 +52,15 @@ public class RoundRobin extends Scheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entry Time slot (int), Sous porteuse(int), and users ( List<User>)
|
* @param ts Time slot (int)
|
||||||
|
* @param sp Sous porteuse(int)
|
||||||
|
* @param Users (List<User>)
|
||||||
* Return the user in function of TS and SP selected
|
* Return the user in function of TS and SP selected
|
||||||
*/
|
*/
|
||||||
private User UserSelection(int Ts, int Sp, List<User> users) {
|
private User UserSelection(int ts, int sp, List<User> Users) {
|
||||||
//compte le nombre de bloc attribue
|
//compte le nombre de bloc attribue
|
||||||
for (int i = 0; i < Ts; i++){
|
for (int i = 0; i < ts; i++){
|
||||||
for (int j = 0; j < Sp; j++) {
|
for (int j = 0; j < sp; j++) {
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user