PlanitDemandsReaderSettings

PlanitDemandsReaderSettings instance

The PlanitDemandsReaderSettings instance is accessible via the PlanitDemandsReader its .settings property. It allows the user to configure the PLANitDemandsReader.

Minimum configuration requirements

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

Methods

A PlanitDemandsReaderSettings 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 demands 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

from planit import *

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

# prep required
# zoning_reader = <construct and configure here and below>

# PLANit demands reader        
planit_reader = converter.create_reader(DemandsReaderType.PLANIT, zoning_reader)
planit_reader.settings.set_input_directory("to_dir_with_file")

See also

PlanitDemandsReader PLANit demands reader class these settings reside on

Source code

Class ReaderSettingsWrapper in converterwrappers.py


.set_input_directory(+)

PlanitDemandsReaderSettings method

.set_xml_file_extension(+)

PlanitNetworkReaderSettings method