fnss.netconfig.weights.set_weights_inverse_capacity — FNSS 0.6.1 documentation

### Navigation

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

# fnss.netconfig.weights.set_weights_inverse_capacity

`set_weights_inverse_capacity`(topology)

  Assign link weights to links proportionally to the inverse of their capacity. Weights are normalized so that the minimum weight is 1.

  Parameters: | topology : Topology The topology on which weights are applied.

  Examples

      >>> import fnss
      >>> topology = fnss.Topology()
      >>> topology.add_path([1,2,3,4])
      >>> fnss.set_capacities_constant(topology, 10, 'Mbps')
      >>> fnss.set_weights_inverse_capacity(topology)

### Navigation

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