add updated figure for hops

This commit is contained in:
Sergei Tikhomirov 2024-03-13 13:38:55 +01:00
parent 33506e4886
commit 7b529807b8
No known key found for this signature in database
GPG Key ID: 6A1F8ED9D6538027
2 changed files with 368 additions and 493 deletions

View File

@ -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())

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 69 KiB