diff --git a/mixnet/v2/sim/analysis.py b/mixnet/v2/sim/analysis.py index 7408855..12f1e3b 100644 --- a/mixnet/v2/sim/analysis.py +++ b/mixnet/v2/sim/analysis.py @@ -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() diff --git a/mixnet/v2/sim/config.yaml b/mixnet/v2/sim/config.yaml index a81b813..c71d4b1 100644 --- a/mixnet/v2/sim/config.yaml +++ b/mixnet/v2/sim/config.yaml @@ -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 diff --git a/mixnet/v2/sim/docs/bandwidth.png b/mixnet/v2/sim/docs/bandwidth.png index 43cc0bb..382a6e5 100644 Binary files a/mixnet/v2/sim/docs/bandwidth.png and b/mixnet/v2/sim/docs/bandwidth.png differ diff --git a/mixnet/v2/sim/docs/mixed-msgs-over-time.png b/mixnet/v2/sim/docs/mixed-msgs-over-time.png index e44da15..cf2e78c 100644 Binary files a/mixnet/v2/sim/docs/mixed-msgs-over-time.png and b/mixnet/v2/sim/docs/mixed-msgs-over-time.png differ diff --git a/mixnet/v2/sim/docs/msgs-around-interval.png b/mixnet/v2/sim/docs/msgs-around-interval.png index f5fc292..7e46b46 100644 Binary files a/mixnet/v2/sim/docs/msgs-around-interval.png and b/mixnet/v2/sim/docs/msgs-around-interval.png differ