.set_capacity_period(+)
TntpNetworkReaderSettings method
Description
Set the period and unit for how the capacity on each link is defined. The time unit is defined in the custom TNTP
TimeUnits
enum.
Signature
.set_capacity_period(duration: float, time_unit: TimeUnits)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
duration |
float |
N/A | 1 | The duration in the time unit given |
time_unit |
TimeUnits |
N/A | HOURS |
The time unit |
Return type
N/A
Example 1
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# TNTP network reader
reader = network_converter.create_reader(NetworkReaderType.TNTP)
reader.settings.set_capacity_period(1.0, TimeUnits.HOURS)
See also
N/A
Source code
Class TntpNetworkReaderSettingsWrapper
in converterwrappers.py