.set_capacity_period(+)
TntpNetworkReaderSettings method
The TntpNetworkReaderSettings
instance is accessible via the TntpNetworkReader
its .settings
property. It allows the user to configure the TntpNetworkReader.
The user is required to explicitly configure at least the following settings on TntpNetworkReader:
.set_network_file(+)
.set_node_coordinate_file(+)
since the TNTP format is not very rigorously defined it is most likely you also explicitly need to provide the column mapping information to correctly parse the data, as well as defining the units in which the information is provided via
.set_network_file_columns(+)
.set_speed_units(+)
A TntpNetworkReaderSettings
instance exposes the following methods. The Compulsory column indicates it the user is
expected to configure this setting explicitly or not.
Name | Compulsory | Default | Description |
---|---|---|---|
.set_network_file(+) |
YES | N/A | Set the network input file location |
.set_node_coordinate_file(+) |
YES | N/A | Set the network node locations file location |
.set_network_file_columns(+) |
YES | N/A | Define the network column configuration |
.set_speed_units(+) |
NO | km/h |
Define the speed units |
.set_length_units(+) |
NO | km |
Define the length units |
.set_capacity_period(+) |
NO | [1, h ] |
Define the period and unit of how capacity is defined |
.set_free_flow_travel_time_units(+) |
NO | h |
Define the time unit for the free flow travel time |
.set_default_maximum_speed(+) |
YES | N/A | Define the default maximum speed to apply |
In future versions an appropriate default maximum speed should be available so it is not needed to be defined anymore. Currently, this is not the case yet.
Various getters for the documented setters are available, e.g.,
.get_capacity_period_duration()
etc., they are not yet documented though, have a look in the source code for specifics
N/A
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# TNTP network reader
tntp_reader = network_converter.create_reader(NetworkReaderType.TNTP)
tntp_reader.settings.set_network_file(NETWORK_FILE_PATH)
tntp_reader.settings.set_node_coordinate_file(NODE_COORD_FILE_PATH)
#PLANit network writer
planit_writer = network_converter.create_writer(NetworkWriterType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")
# perform conversion
network_converter.convert(tntp_reader, planit_writer)
TntpNetworkReader
TNTP network reader class these settings reside on
Class TntpNetworkReaderSettingsWrapper
in converterwrappers.py
TntpNetworkReaderSettings method
TntpNetworkReaderSettings method
TntpNetworkReaderSettings method
TntpNetworkReaderSettings method
TntpNetworkReaderSettings method
TntpNetworkReaderSettings method
TntpNetworkReaderSettings method
TntpNetworkReaderSettings method