Fix build

This commit is contained in:
Quentin Legot 2023-03-17 09:32:25 +01:00
parent ef3a210fd1
commit fdc5445b25
3 changed files with 4 additions and 7 deletions

View File

@ -19,6 +19,7 @@ public class Main {
System.exit(1); System.exit(1);
return; return;
} }
AccessPoint accessPoint = new AccessPoint(new RoundRobin("round robin", 0), 0, 50); AccessPoint accessPoint = new AccessPoint(new RoundRobin("round robin", 0), 0, 50);
accessPoint.startSimulation(numberOfTicks, maximumLoad); accessPoint.startSimulation(numberOfTicks, maximumLoad);
} else { } else {

View File

@ -1,9 +1,7 @@
package fr.ntr.scheduler; package fr.ntr.scheduler;
import java.util.List; import java.util.List;
import fr.ntr.AccessPoint;
import fr.ntr.User; import fr.ntr.User;
import fr.ntr.UserGroup;
public class MaxSNR extends Scheduler { public class MaxSNR extends Scheduler {

View File

@ -15,11 +15,9 @@ public class RoundRobin extends Scheduler {
private List<User> users; private List<User> users;
private ResourceBlock[][] frame; private ResourceBlock[][] frame;
public RoundRobin(String name, int index, List<User> users, ResourceBlock[][] frame ) { public RoundRobin(String name, int index) {
this.name = name; this.name = name;
this.index = index; this.index = index;
this.users = users;
this.frame = frame;
} }
/** /**
@ -53,14 +51,14 @@ public class RoundRobin extends Scheduler {
* Entry Time slot (int), Sous porteuse(int), and users ( List<User>) * Entry Time slot (int), Sous porteuse(int), and 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) {
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++;
} }
} }
return Users.get(index%(Users.size() - 1)); return users.get(index%(users.size() - 1));
} }
} }