.set_restrict_link_speed_by_supported_modes(+)

MatsimNetworkWriterSettings method

Description

Flag that indicates if a link’s physical speed limit is to be reduced in case only modes with a lower top speed than the speed limit are included on this link. For example when a bus only network is generated, the bus max speed might be lower than the link speed limit, when set to true the speed limit is the minimum of the physical and mode speed limit. When false the physical speed limit it used.

Signature

.set_restrict_link_speed_by_supported_modes(flag: bool)

with

Parameter Type Unit Default Description
flag bool None False set the flag

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)

# Open Street Map (OSM) network reader        
osm_reader = network_converter.create_reader(NetworkReaderType.OSM, "Australia")
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>")

# activate
matsim_writer.settings.set_restrict_link_speed_by_supported_modes(True)

# perform conversion
network_converter.convert(osm_reader,matsim_writer)

See also

N/A

Source code

Class WriterSettingsWrapper in converterwrappers.py