honeybee_energy.simulation.runperiod module

EnergyPlus Simulation Run Period.

class honeybee_energy.simulation.runperiod.RunPeriod(start_date=01 Jan, end_date=31 Dec, start_day_of_week='Sunday', holidays=None, daylight_saving_time=None)[source]

Bases: object

EnergyPlus Simulation Run Period.

Parameters:
  • start_date – A ladybug Date for the start of the run period. (Default: 1 Jan)

  • end_date – A ladybug Date for the end of the run period. (Default: 31 Dec)

  • start_day_of_week

    Text for the day of the week on which the simulation starts. Default: ‘Sunday’. Choose from the following:

    • Sunday

    • Monday

    • Tuesday

    • Wednesday

    • Thursday

    • Friday

    • Saturday

  • holidays – A list of Ladybug Date objects for the holidays within the simulation. If None, no holidays are applied. Default: None.

  • daylight_saving_time – A DaylightSavingTime object to dictate the start and end dates of daylight saving time. If None, no daylight saving time is applied to the simulation. Default: None.

Properties:
  • start_date

  • end_date

  • start_day_of_week

  • holidays

  • daylight_saving_time

  • is_leap_year

ToString()[source]

Overwrite .NET ToString.

duplicate()[source]

Get a copy of this object.

classmethod from_analysis_period(analysis_period=None, start_day_of_week='Sunday', holidays=None, daylight_saving_time=None)[source]

Initialize a RunPeriod object from a ladybug AnalysisPeriod.

Note that the st_hour and end_hour properties of the AnalysisPeriod are completely ignored when using this classmethod since EnergyPlus cannot start or end a simulation at an interval less than a day.

Parameters:
  • analysis_period – A ladybug AnalysisPeriod object that has the start and end dates for the simulation. Default: an AnalysisPeriod for the whole year.

  • start_day_of_week

    Text for the day of the week on which the simulation starts. Default: ‘Sunday’. Choose from the following:

    • Sunday

    • Monday

    • Tuesday

    • Wednesday

    • Thursday

    • Friday

    • Saturday

  • holidays – A list of Ladybug Date objects for the holidays within the simulation. If None, no holidays are applied. Default: None.

  • daylight_saving_time – A DaylightSavingTime object to dictate the start and end dates of daylight saving time. If None, no daylight saving time is applied to the simulation. Default: None.

classmethod from_dict(data)[source]

Create a RunPeriod object from a dictionary.

Parameters:

data – A RunPeriod dictionary in following the format below.

{
"type": "RunPeriod",
"start_date": (1, 1),
"end_date": (12, 31),
"start_day_of_week": 'Monday',
"holidays": [(1, 1), (7, 4)],
"daylight_saving_time": {}, # DaylightSavingTime dictionary representation
"leap_year": False
}
classmethod from_idf(idf_string, holiday_strings=None, daylight_saving_string=None)[source]

Create a RunPeriod object from an EnergyPlus IDF text string.

Parameters:
  • idf_string – A text string fully describing an EnergyPlus RunPeriod definition.

  • holiday_strings – A list of IDF RunPeriodControl:SpecialDays strings that represent the holidays applied to the simulation.

  • daylight_saving_string – An IDF RunPeriodControl:DaylightSavingTime string that notes the start and ends dates of Daylight Savings time.

classmethod from_string(run_period_string)[source]

Create an RunPeriod object from an RunPeriod string.

to_dict()[source]

RunPeriod dictionary representation.

to_idf()[source]

Get an EnergyPlus string representation of the RunPeriod.

Returns:

A tuple with three elements

  • run_period: An IDF string representation of the RunPeriod object.

  • holidays: A list of IDF RunPeriodControl:SpecialDays strings that represent the holidays applied to the simulation. Will be None if no holidays are applied to this RunPeriod.

  • daylight_saving_time: An IDF RunPeriodControl:DaylightSavingTime string that notes the start and ends dates of Daylight Savings time. Will be None if no daylight_saving_time is applied to this RunPeriod.

RunPeriod,  ! Winter Simulation
    Winter Simulation,  !- Name
    12,  !- Begin Month
    1,   !- Begin Day of Month
    ,    !- Begin Year
    3,   !- End Month
    31,  !- End Day of Month
    ,    !- End Year
    UseWeatherFile,  !- Day of Week for Start Day
    Yes,  !- Use Weather File Holidays and Special Days
    Yes,  !- Use Weather File Daylight Saving Period
    No,   !- Apply Weekend Holiday Rule
    Yes,  !- Use Weather File Rain Indicators
    Yes;  !- Use Weather File Snow Indicators
DAYS_OF_THE_WEEK = ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')
property daylight_saving_time

Get or set a DaylightSavingTime object for start and end of daylight savings.

property end_date

Get or set a ladybug Date object for the end of the run period.

property holidays

Get or set a list of ladybug Date objects for holidays.

property is_leap_year

Get or set a boolean noting whether the RunPeriod is for a leap year simulation.

property start_date

Get or set a ladybug Date object for the start of the run period.

property start_day_of_week

Get or set text for the day of the week on which the simulation starts.

Choose from the following:

  • Sunday

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday