RUFAS.rufas_time module#
- class RUFAS.rufas_time.RufasTime(start_date: datetime = None, end_date: datetime = None, current_date: datetime = None)#
Bases:
object
- __init__(start_date: datetime = None, end_date: datetime = None, current_date: datetime = None) None #
This object is responsible for creating and tracking time in the simulation.
- advance() None #
Advances the time in the simulation by 1 day.
- property year_start_day: int#
Returns the first Julian day of the current year in integer.
- property year_end_day: int#
Returns the last Julian day of the current year in integer.
- property current_julian_day: int#
Returns the current Julian day of the current year in integer.
- property current_month: int#
Returns the current month in integer.
- property current_simulation_year: int#
Returns the current simulation year in integer.
- property current_calendar_year: int#
Returns the current calendar year in integer.
- property simulation_day: int#
Returns the current simulation day in integer.
- record_time() None #
Records the current day, simulated year, and calendar year of the simulation in the OutputManager.
- convert_simulation_day_to_date(simulation_day: int) datetime #
Convert the simulation day to a date object that is relative to the start date of the simulation.
Parameters#
- simulation_dayint
The simulation day to convert to a date object.
Returns#
- date
The date object that corresponds to the simulation day.