.set_log_services_without_trips(+)
PlanitRoutedServicesWriterSettings method
Description
It might happen that some services get no trips assigned to them. This may indicate an issue in how the service was created or something else. By switching this option on such situations are logged to the output for the user to verify afterwards if desired.
Signature
.set_log_services_without_trips(flag: bool)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
flag |
bool |
None |
False |
The flag to set |
Return type
N/A
Example 1
from planit import *
# create an intermodal converter
planit_instance = Planit()
intermodal_converter = planit_instance.converter_factory.create(ConverterType.INTERMODAL)
# Open Street Map (OSM) intermodal reader
osm_reader = intermodal_converter.create_reader(IntermodalReaderType.OSM, "<country_name>")
osm_reader.settings.set_input_file("<path_to_input_file>")
# PLANit intermodal writer
planit_writer = intermodal_converter.create_writer(IntermodalWriterType.PLANIT)
planit_writer.settings.set_output_directory("<path_to_output_dir>")
# Log empty services
planit_writer.settings.routed_services_settings.set_log_services_without_trips(True)
# perform conversion
intermodal_converter.convert(osm_reader,planit_writer)
See also
N/A
Source code
Class WriterSettingsWrapper
in converterwrappers.py