### Navigation

- index
- modules |
- modules |
- next |
- previous |
- FNSS 0.6.1 documentation »
- API Reference »
- Functions »

# fnss.netconfig.capacities.set_capacities_random_power_law

`set_capacities_random_power_law`(topology, capacities, capacity_unit='Mbps', alpha=1.1)

  Set random link capacities according to a power-law probability density function.

  The probability that a capacity is assigned to a link is:

  Where is the set of allowed capacity, i.e. the `capacities` argument

  Note that this capacity assignment differs from `set_capacities_random_zipf` because, while in Zipf assignment the power law relationship is between the rank of a capacity and the probability of being assigned to a link, in this assignment, the power law is between the value of the capacity and the probability of being assigned to a link.

  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..)

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- FNSS 0.6.1 documentation »
- API Reference »
- Functions »