Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/java/fr/ntr/AccessPoint.java
This commit is contained in:
commit
f2915df13f
@ -43,8 +43,8 @@ public class AccessPoint {
|
||||
* Lancer la simulation
|
||||
* @param duration
|
||||
*/
|
||||
public void startSimulation(int duration, int nbUsers){
|
||||
for(int ticks = 0; ticks < duration; ++ticks){
|
||||
public void startSimulation(int duration, int nbUsers) {
|
||||
for (int ticks = 0; ticks < duration; ++ticks) {
|
||||
// Simulation
|
||||
reset();
|
||||
init(nbUsers);
|
||||
@ -57,8 +57,8 @@ public class AccessPoint {
|
||||
/**
|
||||
* Génération du débit et des paquets
|
||||
*/
|
||||
private void init(int nbUsers){
|
||||
for(int i = 0; i < nbUsers; i++){
|
||||
private void init(int nbUsers) {
|
||||
for (int i = 0; i < nbUsers; i++) {
|
||||
Random random = new Random();
|
||||
double randomDist = this.min + random.nextDouble() * (this.max - this.min);
|
||||
User user = new User(randomDist, timeSlotNb, subCarrierNb);
|
||||
@ -68,24 +68,30 @@ public class AccessPoint {
|
||||
}
|
||||
}
|
||||
|
||||
private void schedule(){
|
||||
private void schedule() {
|
||||
|
||||
}
|
||||
|
||||
private void analyseData(){
|
||||
private void analyseData() {
|
||||
|
||||
}
|
||||
|
||||
private void plotData(){
|
||||
private void plotData() {
|
||||
|
||||
}
|
||||
|
||||
private void reset(){
|
||||
private void reset() {
|
||||
|
||||
}
|
||||
|
||||
public int getFrameSize(){
|
||||
public int getFrameSize() {
|
||||
return this.timeSlotNb * this.subCarrierNb;
|
||||
}
|
||||
|
||||
public ResourceBlock[][] getFrame() {
|
||||
return frame;
|
||||
}
|
||||
public void setFrame(ResourceBlock[][] frame) {
|
||||
this.frame = frame;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user