.settings
MatsimNetworkWriter property
The MatsimNetworkWriter
class instance can be created via the NetworkConverter
.
It provides the functionality to persist a network in MATSIM format . Once created the user can configure its settings.
All configuration of this writer is performed via its .settings
property, providing access to the
MatsimNetworkWriterSettings
.
The Matsim writer relies on defaults whenever explicit configuration is absent. Detailed information on the adopted defaults can be found under; Defaults in the MatsimNetworkWriter. These mainly pertain to the mapping of Planit modes to Matsim modes.
If, after reading the documentation, you are still unsure what defaults are adopted, have a look at the generated logs. The majority of the adopted defaults are logged when performing the MATSim network writing.
The user is required to explicitly configure at least the following settings on a MatsimNetworkWriter
:
.settings.set_output_directory(+)
N/A
This class exposes the following properties:
Property | Availability | Description |
---|---|---|
.settings |
Always | Access to MatsimNetworkWriterSettings to configure the writer |
from planit import *
# create a network converter
planit_instance = Planit()
network_converter = planit_instance.converter_factory.create(ConverterType.NETWORK)
# Open Street Map (OSM) network reader
osm_reader = network_converter.create_reader(NetworkReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")
# 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(osm_reader,matsim_writer)
MatsimNetworkWriterSettings
for configuration of the OSM network writer
ConverterFactory
for the converter factory to create other types of converters
NetworkReaderType
for the supported network reader types
NetworkWriterType
for the supported network writer types
Matsim Network Writer Defaults detailing defaults
Class MatsimNetworkWriterWrapper
in converterwrappers.py
MatsimNetworkWriter property
Detailed information on the adopted defaults