From 7b529807b8259e04c90901be0f6fd3c3dd5a64de Mon Sep 17 00:00:00 2001 From: Sergei Tikhomirov Date: Wed, 13 Mar 2024 13:38:55 +0100 Subject: [PATCH] add updated figure for hops --- rln-delay-simulations/message_hops.py | 11 +- rln-delay-simulations/message_hops.svg | 850 +++++++++++-------------- 2 files changed, 368 insertions(+), 493 deletions(-) diff --git a/rln-delay-simulations/message_hops.py b/rln-delay-simulations/message_hops.py index b4afb7e..2e74ec0 100644 --- a/rln-delay-simulations/message_hops.py +++ b/rln-delay-simulations/message_hops.py @@ -12,9 +12,12 @@ N3 = 100000 # number of nodes in the network (3) def delay_last_hop(n, d, l): # multiply by l for latencies - return ceil(log(n)/log(d)) + numerator = log(((n - 1) * (d - 2) / d) + 1) + denominator = log(d - 1) + return ceil(numerator / denominator) -ds = np.arange(2,15) + +ds = np.arange(3,15) ls = np.ones(len(ds))*L # astype(int) is ok since ceil() returns integers @@ -39,8 +42,8 @@ with plt.style.context(['science', 'ieee']): ax2.set(**dict(ylabel='\nBandwidth amplification')) # Set the limits of the x-axis and y-axis - ax1.set_xlim(2, 14) - ax1.set_ylim(2, ax1.get_ylim()[1]) # Ensure that the lower limit is 2 + ax1.set_xlim(3, 14) + ax1.set_ylim(3, ax1.get_ylim()[1]) # Ensure that the lower limit is 2 # Set the limits of the second y-axis to match the first y-axis ax2.set_ylim(ax1.get_ylim()) diff --git a/rln-delay-simulations/message_hops.svg b/rln-delay-simulations/message_hops.svg index 2527a06..e18aa64 100644 --- a/rln-delay-simulations/message_hops.svg +++ b/rln-delay-simulations/message_hops.svg @@ -6,7 +6,7 @@ - 2024-03-05T16:33:36.471747 + 2024-03-13T13:38:23.988327 image/svg+xml @@ -41,66 +41,27 @@ z - - + - - + - - - - - - - - - - - - - - - - - - - - - - + - + + - + - + - + - + - + - + + - + - + - + - + - + - + + - + - + - + - + - + - + + - + - + - + - + - + + + + - - + + - + - + - + - + @@ -302,233 +284,209 @@ z - - + + - - + - + - - + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -750,285 +708,244 @@ z - + - - + - - - - - - - - - - - - - - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - - + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1532,53 +1449,50 @@ z - - + + - - + + - + +L 51.149081 89.905446 +L 67.889081 111.228523 +L 84.629081 121.890062 +L 101.369081 121.890062 +L 118.109081 132.5516 +L 134.849081 132.5516 +L 151.589081 132.5516 +L 168.329081 143.213138 +L 185.069081 143.213138 +L 201.809081 143.213138 +L 218.549081 143.213138 +" clip-path="url(#p7071456e51)" style="fill: none; stroke-dasharray: 1,1.65; stroke-dashoffset: 0; stroke: #0000ff"/> - + @@ -1806,13 +1720,13 @@ z - + - + @@ -1826,13 +1740,13 @@ L 68.340281 37.139826 - + - + @@ -1847,13 +1761,13 @@ L 68.340281 48.465289 - + - + @@ -1873,286 +1787,245 @@ L 68.340281 59.790752 - - + + - - + - - - - - - - - - - - - - - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -2216,21 +2089,20 @@ z - + +L 51.149081 153.874677 +L 67.889081 143.213138 +L 84.629081 132.5516 +L 101.369081 121.890062 +L 118.109081 111.228523 +L 134.849081 100.566985 +L 151.589081 89.905446 +L 168.329081 79.243908 +L 185.069081 68.582369 +L 201.809081 57.920831 +L 218.549081 47.259292 +" clip-path="url(#p7071456e51)" style="fill: none; stroke: #bfbf00; stroke-linecap: square"/> - + - + @@ -2292,7 +2164,7 @@ L 145.679081 48.232559 - +