honeybee_doe2.schedule module¶
honeybee-doe2 schedule translators.
- honeybee_doe2.schedule.energy_trans_sch_to_transmittance(shade_obj)[source]¶
Try to extract the transmittance from the shade energy properties.
- honeybee_doe2.schedule.extract_all_rules_from_inp_schedule_week(week_inp_string, day_schedule_dict, start_date=None, end_date=None)[source]¶
Extract all ScheduleRule objects from an INP string of a WEEK-SCHEDULE-PD.
- Parameters:
week_inp_string – A text string fully describing a DOE-2 WEEK-SCHEDULE-PD.
day_schedule_dict – A dictionary with the identifiers of ScheduleDay objects as keys and the corresponding ScheduleDay objects as values. These objects will be used to build the ScheduleRules using the week_idf_string.
start_date – A ladybug Date object for the start of the period over which the ScheduleRules apply. If None, Jan 1 will be used.
end_date – A ladybug Date object for the end of the period over which the ScheduleRules apply. If None, Dec 31 will be used.
- Returns:
A tuple with five elements
u_name: The unique name of the WEEK-SCHEDULE-PD.
schedule_rules: A list of ScheduleRule objects that together describe the WEEK-SCHEDULE-PD.
holiday: Text for the name of the SCHEDULE-DAY for the Holiday.
winter_dd: Text for the name of the SCHEDULE-DAY for the Winter Design Day.
summer_dd: Text for the name of the SCHEDULE-DAY for the Summer Design Day.
- honeybee_doe2.schedule.extract_all_schedule_ruleset_from_inp_file(inp_file)[source]¶
Extract all ScheduleRuleset objects from a DOE-2 INP file.
- Parameters:
inp_file – A path to an INP file containing objects for SCHEDULE (or SCHEDULE-PD) and corresponding WEEK-SCHEDULE-PD and DAY-SCHEDULE (or DAY-SCHEDULE-PD) objects. The SCHEDULE will be used to assemble all of these into a ScheduleRuleset.
- Returns:
schedules – A list of all Schedule objects in the INP file as honeybee_energy ScheduleRuleset objects.
- honeybee_doe2.schedule.schedule_day_from_inp(inp_string)[source]¶
Create a Honeybee ScheduleDay from a DOE-2 INP text string.
Note that this method can accept both types of DOE-2 Day Schedules (DAY-SCHEDULE, DAY-SCHEDULE-PD).
- Parameters:
inp_string – A text string fully describing a DOE-2 DAY-SCHEDULE.
- honeybee_doe2.schedule.schedule_day_to_inp(day_schedule, type_limit=None)[source]¶
Convert a ScheduleDay into a DAY-SCHEDULE INP string.
- honeybee_doe2.schedule.schedule_fixed_interval_to_inp(schedule)[source]¶
Convert a ScheduleFixedInterval to INP strings.
Note that true Fixed Interval schedules are not supported by DOE-2 and there is no way to faithfully translate them given that DOE-2 SCHEDULE objects have a hard limit of 12 THRU statements. This method tries to write as best of an approximation for the schedule as possible by averaging the hourly values from each day of the fixed interval schedule. A separate day schedule will be used for each month in an attempt to account for changes in the fixed interval schedule over the year.
All of this will allow the translation to succeed and gives roughly matching behavior of the DOE-2 simulation to the EnergyPlus simulation. However, it is recommended that users replace ScheduleFixedIntervals with ScheduleRulesets that they know best represents the schedule. Or EnergyPlus should be used for the simulation instead of DOE-2.
- Returns:
A tuple with three elements
year_schedule: Text string representation of the SCHEDULE describing this schedule.
week_schedules: A list of WEEK-SCHEDULE text strings that are referenced in the year_schedule.
day_schedules: A list of DAY-SCHEDULE-PD text strings that are referenced in the week_schedules.
- honeybee_doe2.schedule.schedule_ruleset_from_inp(year_inp_string, week_inp_strings, day_inp_strings)[source]¶
Create a ScheduleRuleset from a DOE-2 INP text strings.
- Parameters:
year_inp_string – An INP text string describing a DOE-2 SCHEDULE or SCHEDULE-PD.
week_inp_strings – A list of INP text strings for all of the WEEK-SCHEDULE-PD objects used in the SCHEDULE.
day_inp_strings – A list of text strings for all of the DAY-SCHEDULE or DAY-SCHEDULE-PD objects used in the week_inp_strings.
- honeybee_doe2.schedule.schedule_ruleset_to_inp(schedule)[source]¶
Convert a ScheduleRuleset into a WEEK-SCHEDULE-PD and SCHEDULE INP strings.
Note that this method only outputs SCHEDULE and WEEK-SCHEDULE objects However, to write the full schedule into an INP, the schedules’s day_schedules must also be written.
- Returns:
A tuple with two elements
year_schedule: Text string representation of the SCHEDULE describing this schedule.
week_schedules: A list of WEEK-SCHEDULE-PD text strings that are referenced in the year_schedule.