diff --git a/src/main/java/fr/ntr/Cell.java b/src/main/java/fr/ntr/Cell.java index c6d737b..70afe41 100644 --- a/src/main/java/fr/ntr/Cell.java +++ b/src/main/java/fr/ntr/Cell.java @@ -7,11 +7,11 @@ import java.util.Random; public class Cell { - private List users; + private final List users; /** * scheduler utilisé par la cellule */ - private Scheduler scheduler; + private final Scheduler scheduler; /** * Nombre de slots */ @@ -23,7 +23,7 @@ public class Cell { /** * Trame */ - private ResourceBlock[][] frame; + private final ResourceBlock[][] frame; /** * Reste pour la prochaine source */ diff --git a/src/main/java/fr/ntr/User.java b/src/main/java/fr/ntr/User.java index ec7e659..8c786e9 100644 --- a/src/main/java/fr/ntr/User.java +++ b/src/main/java/fr/ntr/User.java @@ -12,7 +12,7 @@ public class User { private final List packetsSent; private int leftForNextSource; - private Random random = new Random(); + private final Random random = new Random(); public User(double distance, int timeSlotNb, int subCarrierNb) { this.distance = distance; @@ -38,9 +38,9 @@ public class User { /** * - * @param m + * @param m un truc * @param ticks qui va définir le temps auquel a été créé un paquet - * @return + * @return mbis */ public int createPackets(int m, int ticks) { Random random = new Random(); diff --git a/src/main/java/fr/ntr/scheduler/MaxSNR.java b/src/main/java/fr/ntr/scheduler/MaxSNR.java index 504d1f5..0f4f10a 100644 --- a/src/main/java/fr/ntr/scheduler/MaxSNR.java +++ b/src/main/java/fr/ntr/scheduler/MaxSNR.java @@ -6,8 +6,8 @@ import fr.ntr.User; public class MaxSNR extends Scheduler { - private List users; - private ResourceBlock[][] frame; + private final List users; + private final ResourceBlock[][] frame; public MaxSNR( ResourceBlock[][] frame, List users) { this.frame = frame; @@ -16,7 +16,7 @@ public class MaxSNR extends Scheduler { @Override public void scheduling() { - User userMax = null; + User userMax; for(int ts = 0; ts < 2; ts++){ for(int sp = 0; sp < 100; sp++){ userMax = selectionUtilisateur(sp, ts, users); diff --git a/src/main/java/fr/ntr/scheduler/ProportionalFair.java b/src/main/java/fr/ntr/scheduler/ProportionalFair.java index 9e68531..b11e5b4 100644 --- a/src/main/java/fr/ntr/scheduler/ProportionalFair.java +++ b/src/main/java/fr/ntr/scheduler/ProportionalFair.java @@ -7,9 +7,9 @@ import fr.ntr.User; public class ProportionalFair extends Scheduler { - private String name; - private List users; - private ResourceBlock[][] frame; + private final String name; + private final List users; + private final ResourceBlock[][] frame; public ProportionalFair(String name, ResourceBlock[][] frame, List users) { this.name = name;