honeybee_energy.programtype module¶
Complete definition of a zone program, including schedules and loads.
- class honeybee_energy.programtype.ProgramType(identifier, people=None, lighting=None, electric_equipment=None, gas_equipment=None, service_hot_water=None, infiltration=None, ventilation=None, setpoint=None)[source]¶
Bases:
object
Program Type object possessing all schedules and loads defining a program.
- Parameters:
identifier – Text string for a unique ProgramType ID. Must be < 100 characters and not contain any EnergyPlus special characters. This will be used to identify the object across a model and in the exported IDF.
people – A People object to describe the occupancy of the program. If None, no occupancy will be assumed for the program. (Default: None).
lighting – A Lighting object to describe the lighting usage of the program. If None, no lighting will be assumed for the program. (Default: None).
electric_equipment – An ElectricEquipment object to describe the usage of electric equipment within the program. If None, no electric equipment will be assumed for the program. (Default: None).
gas_equipment – A GasEquipment object to describe the usage of gas equipment within the program. If None, no gas equipment will be assumed for the program. (Default: None).
service_hot_water – A ServiceHotWater object to describe the usage of hot water within the program. If None, no hot water will be assumed for the program. (Default: None).
infiltration – An Infiltration object to describe the outdoor air leakage of the program. If None, no infiltration will be assumed for the program. (Default: None).
ventilation – A Ventilation object to describe the minimum outdoor air requirement of the program. If None, no ventilation requirement will be assumed for the program. Default: None
setpoint – A Setpoint object to describe the temperature and humidity setpoints of the program. If None, the ProgramType cannot be assigned to a Room that is conditioned. (Default: None).
- Properties:
identifier
display_name
people
lighting
electric_equipment
gas_equipment
service_hot_water
infiltration
ventilation
setpoint
schedules
schedules_unique
user_data
- static average(identifier, program_types, weights=None, timestep_resolution=1)[source]¶
Get a ProgramType object that’s a weighted average between other objects.
- Parameters:
identifier – A unique ID text string for the new averaged ProgramType. Must be < 100 characters and not contain any EnergyPlus special characters. This will be used to identify the object across a model and in the exported IDF.
program_types – A list of ProgramType objects that will be averaged together to make a new ProgramType.
weights – An optional list of fractional numbers with the same length as the input program_types that sum to 1. These will be used to weight each of the ProgramType objects in the resulting average. If None, the individual objects will be weighted equally. (Default: None).
timestep_resolution – An optional integer for the timestep resolution at which the schedules will be averaged. Any schedule details smaller than this timestep will be lost in the averaging process. (Default: 1).
- diversify(program_count, occupancy_stdev=20, lighting_stdev=20, electric_equip_stdev=20, gas_equip_stdev=20, hot_water_stdev=20, infiltration_stdev=20, schedule_offset=1, timestep=1)[source]¶
Get an array of diversified ProgramTypes derived from this “average” one.
This method is useful when attempting to account for the fact that not all rooms within a building will be used by occupants according to a strict regimen. Some rooms will be used more than expected and others less.
This method uses a random number generator and gaussian distribution to generate loads that vary about the mean program. Note that the randomly generated values can be set to something predictable by using the native Python random.seed() method before running this method.
In addition to diversifying load values, approximately 2/3 of the schedules in the output programs will be offset from the mean by the input schedule_offset (1/3 ahead and another 1/3 behind).
- Parameters:
program_count – An positive integer for the number of diversified programs to generate from this mean program.
occupancy_stdev – A number between 0 and 100 for the percent of the occupancy people_per_area representing one standard deviation of diversification from the mean. (Default 20 percent).
lighting_stdev – A number between 0 and 100 for the percent of the lighting watts_per_area representing one standard deviation of diversification from the mean. (Default 20 percent).
electric_equip_stdev – A number between 0 and 100 for the percent of the electric equipment watts_per_area representing one standard deviation of diversification from the mean. (Default 20 percent).
gas_equip_stdev – A number between 0 and 100 for the percent of the gas equipment watts_per_area representing one standard deviation of diversification from the mean. (Default 20 percent).
hot_water_stdev – A number between 0 and 100 for the percent of the service hot water flow_per_area representing one standard deviation of diversification from the mean. (Default 20 percent).
infiltration_stdev – A number between 0 and 100 for the percent of the infiltration flow_per_exterior_area representing one standard deviation of diversification from the mean. (Default 20 percent).
schedule_offset – A positive integer for the number of timesteps at which all schedules of the resulting programs will be shifted - roughly 1/3 of the programs ahead and another 1/3 behind. (Default: 1).
timestep – An integer for the number of timesteps per hour at which the shifting is occurring. This must be a value between 1 and 60, which is evenly divisible by 60. 1 indicates that each step is an hour while 60 indicates that each step is a minute. (Default: 1).
- classmethod from_dict(data)[source]¶
Create a ProgramType from a dictionary.
Note that the dictionary must be a non-abridged version for this classmethod to work.
- Parameters:
data – Dictionary describing the ProgramType with the format below.
{ "type": 'ProgramType', "identifier": str, # ProgramType identifier "display_name": str, # ProgramType display name 'people': {}, # A People dictionary 'lighting': {}, # A Lighting dictionary 'electric_equipment': {}, # A ElectricEquipment dictionary 'gas_equipment': {}, # A GasEquipment dictionary 'service_hot_water': {}, # A ServiceHotWater dictionary 'infiltration': {}, # A Infliltration dictionary 'ventilation': {}, # A Ventilation dictionary 'setpoint': {} # A Setpoint dictionary }
- classmethod from_dict_abridged(data, schedule_dict)[source]¶
Create a ProgramType object from an abridged dictionary.
- Parameters:
data – A ProgramTypeAbridged dictionary.
schedule_dict – A dictionary with schedule identifiers as keys and honeybee schedule objects as values (either ScheduleRuleset or ScheduleFixedInterval). These will be used to assign the schedules to the ProgramType object.
{ "type": 'ProgramTypeAbridged', "identifier": str, # ProgramType identifier "display_name": str, # ProgramType display name 'people': {}, # A PeopleAbridged dictionary 'lighting': {}, # A LightingAbridged dictionary 'electric_equipment': {}, # A ElectricEquipmentAbridged dictionary 'gas_equipment': {}, # A GasEquipmentAbridged dictionary 'service_hot_water': {}, # A ServiceHotWaterAbridged dictionary 'infiltration': {}, # A InfiltrationAbridged dictionary 'ventilation': {}, # A VentilationAbridged dictionary 'setpoint': {} # A SetpointAbridged dictionary }
- to_dict(abridged=False)[source]¶
Get ProgramType as a dictionary.
- Parameters:
abridged – Boolean noting whether detailed schedule objects should be written into the ProgramType (False) or just an abridged version (True) that references the schedules by identifier. Default: False.
- property display_name¶
Get or set a string for the object name without any character restrictions.
If not set, this will be equal to the identifier.
- property electric_equipment¶
Get or set an ElectricEquipment object to describe the usage of equipment.
- property gas_equipment¶
Get or set a GasEquipment object to describe the usage of equipment.
- property identifier¶
Get or set the text string for a unique program type identifier.
- property infiltration¶
Get or set an Infiltration object to describe the outdoor air leakage.
- property lighting¶
Get or set a Lighting object to describe the lighting usage of the program.
- property people¶
Get or set a People object to describe the occupancy of the program.
- property schedules¶
List of all schedules contained within the ProgramType.
- property schedules_unique¶
List of all unique schedules contained within the ProgramType.
- property service_hot_water¶
Get or set a ServiceHotWater object to describe the usage of hot water.
- property setpoint¶
Get or set a Setpoint object to describe the temperature setpoints.
- property user_data¶
Get or set an optional dictionary for additional meta data for this object.
This will be None until it has been set. All keys and values of this dictionary should be of a standard Python type to ensure correct serialization of the object to/from JSON (eg. str, float, int, list, dict)
- property ventilation¶
Get or set a Ventilation object to describe the minimum outdoor air flow.