from datetime import date
from epymorph.time import TimeFrame
# For your convenience, there are a number of ways to construct TimeFrames:
# 1. Start January 1st, 2020 and go for 150 days
2020, 1, 1), 150)
TimeFrame(date(
# 2. Equivalent, but accept dates as ISO-8601 strings
"2020-01-01", 150)
TimeFrame.of(
# 3. January through March 2020
range("2020-01-01", "2020-03-31")
TimeFrame.
# 4. Equivalent, but using an exclusive endpoint
"2020-01-01", "2020-04-01")
TimeFrame.rangex(
# 5. The whole of 2020
2020) TimeFrame.year(
TimeFrame
self, start_date, duration_days) time.TimeFrame(
The time frame of a simulation.
Examples
Attributes
start_date: date
-
The first date in the simulation.
duration_days: int
-
The number of days for which to run the simulation.
end_date: date
-
The last date included in the simulation.
select:
TimeSelector
-
Create a time-axis strategy from this time frame.
In most cases, this will be used to process a simulation result and so you should use a selection on the time frame used in the RUME that produced the result.