.set_demand_file_location(+)
TntpDemandsReaderSettings method
The TntpDemandsReaderSettings instance is accessible via the TntpDemandsReader
its .settings property. It allows the user to configure the TntpDemandsReader.
The user is required to explicitly configure at least the following settings on TntpDemandsReader:
.set_demand_file_location(+)A TntpDemandsReaderSettings 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_demand_file_location(+) |
YES | N/A | Set the demand input file location |
.set_start_time_since_midnight(+) |
NO | 8:00 AM | Set the start time relative to midnight |
.set_time_period_duration(+) |
NO | 1 hour | Set the duration of demand period in relevant unit |
Various getters for the documented setters are available, e.g.,
.set_demand_file_location()etc., they are not yet documented though, have a look in the source code for specifics.
N/A
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
TntpDemandsReader TNTP demands reader class these settings reside on
Class TntpDemandsReaderSettingsWrapper in converterwrappers.py
TntpDemandsReaderSettings method
TntpDemandsReaderSettings method
TntpDemandsReaderSettings method