fnss.netconfig.capacities.set_capacities_random_zipf_mandelbrot¶
-
set_capacities_random_zipf_mandelbrot
(topology, capacities, capacity_unit='Mbps', alpha=1.1, q=0.0, reverse=False)[source]¶ Set random link capacities according to a Zipf-Mandelbrot probability density function.
This capacity allocation consists in the following steps:
- All capacities are sorted in descending or order (or ascending if reverse is True)
- The i-th value of the sorted capacities list is then assigned to a link with probability
Parameters: - topology : Topology
The topology to which link capacities will be set
- capacities : list
A list of all possible capacity values
- capacity_unit : str, optional
The unit in which capacity value is expressed (e.g. Mbps, Gbps etc..)
- alpha : float, default 1.1
The :math`lpha` parameter of the Zipf-Mandlebrot density function
- q : float, default 0
The :math`q` parameter of the Zipf-Mandlebrot density function
- reverse : bool, optional
If False, lower capacity links are the most frequent, if True, higher capacity links are more frequent