PlanitNetworkReaderSettings

PlanitNetworkReaderSettings instance

The PlanitNetworkReaderSettings instance is accessible via the PlanitNetworkReader its .settings property. It allows the user to configure the PlanitNetworkReader.

Minimum configuration requirements

All methods marked as Compulsory=YES in the Methods section are expected to be configured by the user explicitly.

Methods

A PlanitNetworkReaderSettings 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_input_directory(+) YES TRUE Set the input directory to search for network XML file
.set_xml_file_extension(+) NO xml Change the file extension to look consider in case the xml file does not use the regular .xml extension

Properties

N/A

Example 1 - Minimum required settings

from planit import *

# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)

# PLANit XML network reader        
planit_reader = network_converter.create_reader(NetworkReaderType.PLANIT)
planit_reader.settings.set_input_directory("<dir_to_input_file>")

# example MATSim network writer
matsim_writer = network_converter.create_writer(NetworkWriterType.MATSIM)
matsim_writer.settings.set_output_directory("<path_to_output_dir>")

# perform conversion
network_converter.convert(planit_reader,matsim_writer)

See also

PlanitNetworkReader PLANit network reader class these settings reside on

Source code

Class ReaderSettingsWrapper in converterwrappers.py


.set_input_directory(+)

PlanitNetworkReaderSettings method

.set_xml_file_extension(+)

PlanitNetworkReaderSettings method