Merge branch 'master' of https://gitlab.istic.univ-rennes1.fr/18008147/ntr
This commit is contained in:
commit
a8c97f24a7
@ -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 {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
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;
|
||||||
|
|
||||||
public class MaxSNR extends Scheduler {
|
public class MaxSNR extends Scheduler {
|
||||||
|
@ -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));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user