pywr.core.Timestep
- class pywr.core.Timestep(period, int index, double days)
A representation of a simulation time-step.
- Attributes:
- periodpandas.Period
Read-only global scenario index that this ScenarioIndex refers to.
- indexint
The time-step index of the simulation.
- daysint
The time-step length in days.
- dayofyearint
The day of the year (from pandas.Period.dayofyear).
- dayofyear_indexint
A zero-based index for the day of the year. This begins at 0 and ends at 366. The 29th of February is skipped if it is not a leap year.
- dayint
The day of the month.
- week_indexint
A zero-based index for the week of the year. The last week of the year (index 51) is always slightly longer than 7 days.
- monthint
The month number (1 - 12).
- yearint
The year.
- is_leap_yearbool
True if the current year is a leap year; false otherwise.
- __init__(*args, **kwargs)
Methods
__init__
(*args, **kwargs)days_in_current_year
(self)Returns the number of days of the current timestep that fall in the current year
days_in_next_year
(self)Returns the number of days of the current timestep that fall in the next year
Attributes
datetime
Timestep representation as a datetime.datetime object
day
dayofyear
dayofyear_index
days
end_year
index
is_leap_year
month
period
week_index
year