correct "<"
This commit is contained in:
parent
6ce0e63e9c
commit
21ae722975
@ -66,7 +66,7 @@ public class AccessPoint {
|
|||||||
ResourceBlock[][] frameCell1 = cell1.getFrame();
|
ResourceBlock[][] frameCell1 = cell1.getFrame();
|
||||||
ResourceBlock[][] frameCell2 = cell2.getFrame();
|
ResourceBlock[][] frameCell2 = cell2.getFrame();
|
||||||
|
|
||||||
for (int k = 0; k > frameCell1.length; k++ ) {
|
for (int k = 0; k < frameCell1.length; k++ ) {
|
||||||
for (int l = 0; l < frameCell1[k].length; l++) {
|
for (int l = 0; l < frameCell1[k].length; l++) {
|
||||||
//interférences si les deux cellules parlent au même UE sur le même time slot
|
//interférences si les deux cellules parlent au même UE sur le même time slot
|
||||||
User user1 = frameCell1[k][l].getUser();
|
User user1 = frameCell1[k][l].getUser();
|
||||||
@ -86,25 +86,43 @@ public class AccessPoint {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// traite les données et les enregistre dans un fichier
|
||||||
|
|
||||||
|
/* try {
|
||||||
|
analyseData(ticks);
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println("Can't export data");
|
||||||
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
private void analyseData(int tick) throws IOException {
|
private void analyseData(int tick) throws IOException {
|
||||||
for(int i = 0; i < cell1.getFrame().length; i++) {
|
double delayAverage = 0.0;
|
||||||
for(int j = 0; j < cell1.getFrame()[i].length; j++) {
|
int nbPacketsSent = 0;
|
||||||
ResourceBlock ur = cell1.getFrame()[i][j];
|
for(User u: this.users){
|
||||||
if(ur.getUser() != null) {
|
List<Packets> packets = u.getPacketsSent();
|
||||||
String data = (tick + ";" + i + ";" + j + ";" + this.users.indexOf(ur.getUser()) + ";" + ur.getBandwidth() + ";\n");
|
nbPacketsSent += packets.size();
|
||||||
try{
|
for (Packets p: packets){
|
||||||
outputDataFile.write(data.getBytes());
|
delayAverage += p.getDurationSending();
|
||||||
}catch(IOException e){
|
|
||||||
System.err.println("Cannot write the data in the output file");
|
|
||||||
System.exit(1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
/*delayAverage = delayAverage/nbPacketsSent;
|
||||||
}
|
for(int i = 0; i < frame.length; i++) {
|
||||||
*/
|
for(int j = 0; j < frame[i].length; j++) {
|
||||||
|
ResourceBlock ur = frame[i][j];
|
||||||
|
if(ur.getUser() != null) {
|
||||||
|
String data = (tick + ";" + i + ";" + j + ";" + this.users.indexOf(ur.getUser()) + ";" + ur.getBandwidth() + ";" + delayAverage +";\n");
|
||||||
|
try{
|
||||||
|
outputDataFile.write(data.getBytes());
|
||||||
|
}catch(IOException e){
|
||||||
|
System.err.println("Cannot write the data in the output file");
|
||||||
|
System.exit(1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user