.set_start_time_since_midnight(+)

TntpDemandsReaderSettings method

Description

Set the start time offset from midnight for the trips as well as the unit to use as this is not explicitly defined in the TNTP format.

Signature

.set_start_time_since_midnight(start_time: Union[float, int], time_units: TimeUnits)

with

Parameter Type Unit Default Description
start_time float or int None 8.0 The start time (without unit)
time_units TimeUnits None HOURS The start time unit

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