Time

Time based functionality.

class ambient.time.DayType(value)

Bases: enum.IntEnum

Enumerator for day types.

NORMAL = 1

Treat the days as normal days of the year.

COOLING_DESIGN = 10

Treat the days as cooling design days.

HEATING_DESIGN = 11

Treat the days as heating design days.

VENTILATION_DESIGN = 12

Treat the days as ventilation design days.

OTHER_DESIGN = 13

Treat the days as ventilation design days.

class ambient.time.TimePeriodBase(guid=<factory>, timesteps_per_hour=1, days=<factory>, year=1900)

Bases: ambient.core.BaseElement

Class for a simulation time period.

classmethod from_days_and_months(days, months, timesteps_per_hour=1, year=1900)

Build a time period from days of the month and the months.

Parameters
  • days (array_like) – The days of the month.

  • months (array_like) – The months for each day.

  • timesteps_per_hour (int) – The number of timesteps per hour.

  • year (int) – The year for the days.

Returns

The time period with days derived from the input.

Return type

TimePeriodBase

property timestep

Return the current timestep.

property times_in_hours

Return all timesteps for a day in hours.

property time_in_hours

Return the current time of day in hours.

property day

Return the current day of the year.

property months

Return all the months of the year.

property month

Return the current month of the year.

property is_leap_year

Return true if the current year is a leap year.

property total_timesteps

Return the total number of timesteps from start to end.

class ambient.time.CoolingDesignDay(guid=<factory>, timesteps_per_hour=1, days=<factory>, year=1900)

Bases: ambient.time.TimePeriodBase

Cooling design day time period.

class ambient.time.HeatingDesignDay(guid=<factory>, timesteps_per_hour=1, days=<factory>, year=1900)

Bases: ambient.time.TimePeriodBase

Heating design day time period.