set fixed distance values
This commit is contained in:
parent
28f14a5447
commit
7cfad0a81c
@ -11,7 +11,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run {
|
run {
|
||||||
args = ["5000", "20"]
|
args = ["5000", "2"]
|
||||||
}
|
}
|
||||||
|
|
||||||
application {
|
application {
|
||||||
|
@ -60,10 +60,9 @@ public class AccessPoint {
|
|||||||
* Génération du débit et des paquets
|
* Génération du débit et des paquets
|
||||||
*/
|
*/
|
||||||
private void init(int nbUsers) {
|
private void init(int nbUsers) {
|
||||||
|
double[] distance = { 200d, 500d };
|
||||||
for (int i = 0; i < nbUsers; i++) {
|
for (int i = 0; i < nbUsers; i++) {
|
||||||
Random random = new Random();
|
User user = new User(distance[i]);
|
||||||
double randomDist = this.min + random.nextDouble() * (this.max - this.min);
|
|
||||||
User user = new User(randomDist);
|
|
||||||
user.generateBandwidth();
|
user.generateBandwidth();
|
||||||
user.createPackets();
|
user.createPackets();
|
||||||
this.users.add(user);
|
this.users.add(user);
|
||||||
|
Reference in New Issue
Block a user