adjust real_message_weight param and set ylim to plots

This commit is contained in:
Youngjoon Lee 2024-05-20 09:45:40 +09:00
parent 654bc6dc67
commit e804303761
No known key found for this signature in database
GPG Key ID: 09B750B5BD6F08A2
5 changed files with 4 additions and 2 deletions

View File

@ -35,6 +35,7 @@ class Analysis:
plt.title("Ingress/egress bandwidth of each node over time")
plt.xlabel("Time")
plt.ylabel("Bandwidth (KiB/s)")
plt.ylim(bottom=0)
# Customize the legend to show only 'ingress' and 'egress' regardless of node_id
handles, labels = plt.gca().get_legend_handles_labels()
by_label = dict(zip(labels, handles))
@ -75,6 +76,7 @@ class Analysis:
plt.title("Mixed messages in each mix over time")
plt.xlabel("Time")
plt.ylabel("Msg Count")
plt.ylim(bottom=0)
plt.legend(title="Node ID")
plt.grid(True)
plt.show()

View File

@ -13,9 +13,9 @@ mixnet:
# A probability of sending a real message within a cycle
real_message_prob: 0.1
# A weight of real message emission probability of some nodes
# Each weight is assigned to each node in the order of the node ID.
# Each weight is multiplied to the real_message_prob of the node being at the same position in the node list.
# The length of the list should be <= p2p.num_nodes. i.e. some nodes won't have a weight.
real_message_prob_weights: [10, 8, 12]
real_message_prob_weights: [3, 2, 5]
# A probability of sending a cover message within a cycle if not sending a real message
cover_message_prob: 0.2
# A maximum preparation time (delay) before sending the message

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 49 KiB