.set_demand_file_location(+)

TntpDemandsReaderSettings method

Description

Set the demands input file location to be used by the TntpDemandsReader. This is a mandatory setting the user is expected to set.

Signature

.set_demand_file_location(input_file_location: str)

with

Parameter Type Unit Default Description
input_file_location str None N/A The demands input file to extract the trips from

Return type

N/A

Example 1

from planit import *

planit_instance = Planit()

# prep a TNTP zoning reader
# tntp_zon_reader = ...

converter = planit_instance.converter_factory.create(ConverterType.DEMANDS)

# TNTP demands reader (pass in zon_reader)
tntp_dem_reader: TntpDemandsReaderWrapper = converter.create_reader(DemandsReaderType.TNTP, tntp_zon_reader)
tntp_dem_reader.settings.set_demand_file_location(DEMAND_FILE_PATH)
tntp_dem_reader.settings.set_start_time_since_midnight(8.0, TimeUnits.HOURS)
tntp_dem_reader.settings.set_time_period_duration(1.0, TimeUnits.HOURS)

# create a demands writer, then convert

See also

N/A

Source code

Class TntpDemandsReaderSettingsWrapper in converterwrappers.py