.set_output_file_name(+)

MatsimNetworkWriterSettings method

Description

Set a different file name to use for the network output file, without the extension. The default file name used is output_network. All MATSim output is in XML format, hence the final result would be named output_network.xml.

Signature

.set_output_file_name(output_file_name:str)

with

Parameter Type Unit Default Description
output_file_name String None output_network The output file name (without extension)

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>")

# Set output file name explicitly
matsim_writer.settings.set_output_file_name("my_matsim_network")

# perform conversion
network_converter.convert(osm_reader,matsim_writer)

See also

N/A

Source code

Class WriterSettingsWrapper in converterwrappers.py