### Navigation

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

# fnss.netconfig.capacities.set_capacities_constant

`set_capacities_constant`(topology, capacity, capacity_unit='Mbps', links=None)

  Set constant link capacities

  Parameters: | topology : Topology The topology to which link capacities will be set capacity : float The value of capacity to set links : iterable, optional Iterable container of links, represented as (u, v) tuples to which capacity will be set. If None or not specified, the capacity will be applied to all links. capacity_unit : str, optional The unit in which capacity value is expressed (e.g. Mbps, Gbps etc..)

  Examples

      >>> import fnss
      >>> topology = fnss.erdos_renyi_topology(50, 0.1)
      >>> fnss.set_capacities_constant(topology, 10, 'Mbps')

### Navigation

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