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);
return;
}
AccessPoint accessPoint = new AccessPoint(new RoundRobin("round robin", 0), 0, 50);
accessPoint.startSimulation(numberOfTicks, maximumLoad);
} else {

View File

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

View File

@ -15,11 +15,9 @@ public class RoundRobin extends Scheduler {
private List<User> users;
private ResourceBlock[][] frame;
public RoundRobin(String name, int index, List<User> users, ResourceBlock[][] frame ) {
public RoundRobin(String name, int index) {
this.name = name;
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>)
* 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 j = 0; j < Sp; j++) {
index++;
}
}
return Users.get(index%(Users.size() - 1));
return users.get(index%(users.size() - 1));
}
}