Assign a buffer sizes proportionally to the bandwidth of the interface on
which the flush. In particularly, the buffer size will be equal to
, where
is the capacity of the link in bps.
This assignment is equal to the bandwidth-delay product if is the
average RTT in seconds.
To use this function, all links of the topology must have a capacity attribute. If the length of a link cannot be determined, it is applied the delay equal default_delay if specified, otherwise an error is returned.
Parameters : | topology : Topology or DirectedTopology
k : float, optional
default_size : float, optional
buffer_unit : string, unit
packet_size : int, optional
|
---|
Examples
>>> import fnss
>>> topology = fnss.erdos_renyi_topology(50, 0.1)
>>> fnss.set_capacities_constant(topology, 10, 'Mbps')
>>> fnss.set_delays_constant(topology, 2, 'ms')
>>> fnss.set_buffer_sizes_link_bandwidth(topology, k=1.0)