This commit is contained in:
Tr1xt4n 2023-03-28 09:35:26 +02:00
parent 7295530501
commit fa14796c17
2 changed files with 12 additions and 2 deletions

View File

@ -55,15 +55,18 @@ def delay() -> np.ndarray:
for x in d:
delays[nb, 0] = int(nb_users)
delays[nb, 1] = float(x)
print(float(x))
nb += 1
return delays
averages = mean_mkn()
available = rb_available()
delays = delay()
delays.sort(axis=0)
# Data for plotting
averages.sort(axis=0)
print(averages)
#print(averages)
fig, ax = plt.subplots()
ax.scatter(averages[:, 0], averages[:, 1])
@ -78,3 +81,10 @@ ax.scatter(available[:, 0], available[:, 1])
ax.set(xlabel='number of users', ylabel='RB utilisés', title='Pourcentage de RB utilisés')
ax.grid()
plt.show()
fig, ax = plt.subplots()
ax.scatter(delays[:, 0], delays[:, 1])
ax.set(xlabel='number of users', ylabel='delays(ms)', title='Delay')
ax.grid()
plt.show()

View File

@ -58,7 +58,7 @@ public class AccessPoint {
Files.deleteIfExists(Paths.get("export", this.users.size() + ".csv"));
new File("export").mkdir();
this.outputDataFile = new FileOutputStream("export" + File.separator + this.users.size() + ".csv", true);
outputDataFile.write("tick;x;y;user;bandwidth;delay\n".getBytes());
outputDataFile.write("tick;x;y;user;bandwidth;delay;\n".getBytes());
} catch(IOException e) {
System.err.println(e.getClass().getSimpleName() + " : " + e.getMessage());
System.exit(1);