module wntr.network.options

class TimeOptions[source]#

Bases: _OptionsBase

Options related to simulation and model timing. These options are named according to the EPANET 2.2 “Times” settings.

  • duration (int) – Simulation duration (seconds), by default 0.

  • hydraulic_timestep (int >= 1) – Hydraulic timestep (seconds), by default 3600 (one hour).

  • quality_timestep (int >= 1) – Water quality timestep (seconds), by default 360 (five minutes).

  • rule_timestep (int >= 1) – Rule timestep (seconds), by default 360 (five minutes).

  • pattern_timestep (int >= 1) – Pattern timestep (seconds), by default 3600 (one hour).

  • pattern_start (int) – Time offset (in seconds) to find the starting pattern step; changes where in pattern the pattern starts out, not what time the pattern starts, by default 0.

  • report_timestep (int >= 1) – Reporting timestep (seconds), by default 3600 (one hour).

  • report_start (int) – Start time of the report (in seconds) from the start of the simulation, by default 0.

  • start_clocktime (int) – Time of day (in seconds from midnight) at which the simulation begins, by default 0 (midnight).

  • statistic (str) – Provide statistics rather than time series report in the report file. Options are “AVERAGED”, “MINIMUM”, “MAXIUM”, “RANGE”, and “NONE” (as defined in the EPANET User Manual). Defaults to “NONE”.

  • pattern_interpolation (bool) – Only used by the WNTRSimulator. Defaults to False. If True, interpolation will be used determine pattern values between pattern timesteps. If False, patterns cause step-like behavior where the pattern value corresponding to the most recent pattern timestep is used until the next pattern timestep. For example, given the pattern [1, 1.2, 1.6], a pattern timestep of 1 hour, and a pattern_interpolation value of False, a value of 1 is used at 0 hours and every time strictly less than 1 hour. A value of 1.2 is used at hour 1 and every time strictly less than 2 hours. With a pattern_interpolation value of True, a value of 1 is used at 0 hours and a value of 1.2 is used at 1 hour. However, at an intermediat time such as 0.5 hours, interpolation is used, resulting in a value of 1.1. Using interpolation with a shorter hydraulic_timestep can make problems with large changes in patterns (e.g., large changes in demand) easier to solve.

__init__(duration=0, hydraulic_timestep=3600, quality_timestep=360, rule_timestep=360, pattern_timestep=3600, pattern_start=0, report_timestep=3600, report_start=0, start_clocktime=0, statistic='NONE', pattern_interpolation=False)[source]#
classmethod factory(val)#

Create an options object based on passing in an instance of the object, a dict, or a tuple