honeybee_doe2.programtype module

honeybee-doe2 program type translators.

honeybee_doe2.programtype.program_type_from_inp(cmd_dict, lib_file_path=None)[source]

Create ProgramType objects from a parsed INP command dictionary.

Spaces are grouped by their C-ACTIVITY-DESC attribute. For each unique activity description, a representative space and its linked zone are used to resolve SET-DEFAULT fallback values and build a ProgramType containing People, Lighting, ElectricEquipment, Infiltration, Setpoint, and Ventilation objects.

Parameters:
  • cmd_dict – The command dictionary returned by command_dict_from_inp.

  • lib_file_path – Optional path to eQUEST library file (eQ_Lib.dat) for resolving library schedules. If None, library schedules won’t be resolved.

Returns:

A list of honeybee-energy ProgramType objects, one per unique C-ACTIVITY-DESC found in the model’s spaces.

honeybee_doe2.programtype.program_type_to_inp(program_type, switch_dict=None)[source]

Translate a ProgramType into a dictionary used to write INP switch statements.

Parameters:
  • program_type – A honeybee-energy ProgramType definition.

  • switch_dict – An optional dictionary with INP keywords as keys (such as PEOPLE-SCHEDULE or AREA/PERSON or LIGHTING-W/AREA). The values of the dictionary should be lists of switch statement text strings, such as ‘case “conf”: #SI(“Small Off Occ”, “SPACE”, “PEOPLE-SCHEDULE”)’. Specifying an input dictionary here can be used to build up switch statements for all program types across a model.

Returns:

An dictionary with INP keywords as keys (such as PEOPLE-SCHEDULE or AREA/PERSON). The values of the dictionary are lists of switch statement text strings, such as ‘case “conf”: #SI(“Small Off Occ”, “SPACE”, “PEOPLE-SCHEDULE”)’.

honeybee_doe2.programtype.switch_dict_to_space_inp(switch_dict)[source]

Translate a switch statement dictionary into INP strings for the SPACE.

Parameters:

switch_dict – An dictionary with INP keywords as keys (such as PEOPLE-SCHEDULE or AREA/PERSON or LIGHTING-W/AREA). The values of the dictionary should be lists of switch statement text strings, such as ‘case “conf”: #SI(“Small Off Occ”, “SPACE”, “PEOPLE-SCHEDULE”)’.

Returns:

A text string to be written into an INP file. This should go at the top of the description of Floors / Spaces.

honeybee_doe2.programtype.switch_dict_to_zone_inp(switch_dict)[source]

Translate a switch statement dictionary into INP strings for the ZONE.

Parameters:

switch_dict – An dictionary with INP keywords as keys (such as HEAT-TEMP-SCH or DESIGN-HEAT-T or OUTSIDE-AIR-FLOW). The values of the dictionary should be lists of switch statement text strings, such as ‘case “conf”: #SI(“Small Off HtgStp”, “SPACE”, “HEAT-TEMP-SCH”)’.

Returns:

A text string to be written into an INP file. This should go at the top of the description of HVAC Systems / Zones.