Assign a buffer sizes proportionally to the bandwidth of the interface on which the flush. In particularly, the buffer size will be equal to k*C, where C is the capacity of the link in bps.
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
interfaces : list of tuples, 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)