honeybee-energy 1.116.106__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. honeybee_energy/__init__.py +24 -0
  2. honeybee_energy/__main__.py +4 -0
  3. honeybee_energy/_extend_honeybee.py +145 -0
  4. honeybee_energy/altnumber.py +21 -0
  5. honeybee_energy/baseline/__init__.py +2 -0
  6. honeybee_energy/baseline/create.py +608 -0
  7. honeybee_energy/baseline/data/__init__.py +1 -0
  8. honeybee_energy/baseline/data/constructions.csv +64 -0
  9. honeybee_energy/baseline/data/fen_ratios.csv +15 -0
  10. honeybee_energy/baseline/data/lpd_building.csv +21 -0
  11. honeybee_energy/baseline/data/pci_2016.csv +22 -0
  12. honeybee_energy/baseline/data/pci_2019.csv +22 -0
  13. honeybee_energy/baseline/data/pci_2022.csv +22 -0
  14. honeybee_energy/baseline/data/shw.csv +21 -0
  15. honeybee_energy/baseline/pci.py +512 -0
  16. honeybee_energy/baseline/result.py +371 -0
  17. honeybee_energy/boundarycondition.py +128 -0
  18. honeybee_energy/cli/__init__.py +69 -0
  19. honeybee_energy/cli/baseline.py +475 -0
  20. honeybee_energy/cli/edit.py +327 -0
  21. honeybee_energy/cli/lib.py +1154 -0
  22. honeybee_energy/cli/result.py +810 -0
  23. honeybee_energy/cli/setconfig.py +124 -0
  24. honeybee_energy/cli/settings.py +569 -0
  25. honeybee_energy/cli/simulate.py +380 -0
  26. honeybee_energy/cli/translate.py +1714 -0
  27. honeybee_energy/cli/validate.py +224 -0
  28. honeybee_energy/config.json +11 -0
  29. honeybee_energy/config.py +842 -0
  30. honeybee_energy/construction/__init__.py +1 -0
  31. honeybee_energy/construction/_base.py +374 -0
  32. honeybee_energy/construction/air.py +325 -0
  33. honeybee_energy/construction/dictutil.py +89 -0
  34. honeybee_energy/construction/dynamic.py +607 -0
  35. honeybee_energy/construction/opaque.py +460 -0
  36. honeybee_energy/construction/shade.py +319 -0
  37. honeybee_energy/construction/window.py +1096 -0
  38. honeybee_energy/construction/windowshade.py +847 -0
  39. honeybee_energy/constructionset.py +1655 -0
  40. honeybee_energy/dictutil.py +56 -0
  41. honeybee_energy/generator/__init__.py +5 -0
  42. honeybee_energy/generator/loadcenter.py +204 -0
  43. honeybee_energy/generator/pv.py +535 -0
  44. honeybee_energy/hvac/__init__.py +21 -0
  45. honeybee_energy/hvac/_base.py +124 -0
  46. honeybee_energy/hvac/_template.py +270 -0
  47. honeybee_energy/hvac/allair/__init__.py +22 -0
  48. honeybee_energy/hvac/allair/_base.py +349 -0
  49. honeybee_energy/hvac/allair/furnace.py +168 -0
  50. honeybee_energy/hvac/allair/psz.py +131 -0
  51. honeybee_energy/hvac/allair/ptac.py +163 -0
  52. honeybee_energy/hvac/allair/pvav.py +109 -0
  53. honeybee_energy/hvac/allair/vav.py +128 -0
  54. honeybee_energy/hvac/detailed.py +337 -0
  55. honeybee_energy/hvac/doas/__init__.py +28 -0
  56. honeybee_energy/hvac/doas/_base.py +345 -0
  57. honeybee_energy/hvac/doas/fcu.py +127 -0
  58. honeybee_energy/hvac/doas/radiant.py +329 -0
  59. honeybee_energy/hvac/doas/vrf.py +81 -0
  60. honeybee_energy/hvac/doas/wshp.py +91 -0
  61. honeybee_energy/hvac/heatcool/__init__.py +23 -0
  62. honeybee_energy/hvac/heatcool/_base.py +177 -0
  63. honeybee_energy/hvac/heatcool/baseboard.py +61 -0
  64. honeybee_energy/hvac/heatcool/evapcool.py +72 -0
  65. honeybee_energy/hvac/heatcool/fcu.py +92 -0
  66. honeybee_energy/hvac/heatcool/gasunit.py +53 -0
  67. honeybee_energy/hvac/heatcool/radiant.py +269 -0
  68. honeybee_energy/hvac/heatcool/residential.py +77 -0
  69. honeybee_energy/hvac/heatcool/vrf.py +54 -0
  70. honeybee_energy/hvac/heatcool/windowac.py +70 -0
  71. honeybee_energy/hvac/heatcool/wshp.py +62 -0
  72. honeybee_energy/hvac/idealair.py +699 -0
  73. honeybee_energy/internalmass.py +310 -0
  74. honeybee_energy/lib/__init__.py +1 -0
  75. honeybee_energy/lib/_loadconstructions.py +194 -0
  76. honeybee_energy/lib/_loadconstructionsets.py +117 -0
  77. honeybee_energy/lib/_loadmaterials.py +83 -0
  78. honeybee_energy/lib/_loadprogramtypes.py +125 -0
  79. honeybee_energy/lib/_loadschedules.py +87 -0
  80. honeybee_energy/lib/_loadtypelimits.py +64 -0
  81. honeybee_energy/lib/constructions.py +207 -0
  82. honeybee_energy/lib/constructionsets.py +95 -0
  83. honeybee_energy/lib/materials.py +67 -0
  84. honeybee_energy/lib/programtypes.py +125 -0
  85. honeybee_energy/lib/schedules.py +61 -0
  86. honeybee_energy/lib/scheduletypelimits.py +31 -0
  87. honeybee_energy/load/__init__.py +1 -0
  88. honeybee_energy/load/_base.py +190 -0
  89. honeybee_energy/load/daylight.py +397 -0
  90. honeybee_energy/load/dictutil.py +47 -0
  91. honeybee_energy/load/equipment.py +771 -0
  92. honeybee_energy/load/hotwater.py +543 -0
  93. honeybee_energy/load/infiltration.py +460 -0
  94. honeybee_energy/load/lighting.py +480 -0
  95. honeybee_energy/load/people.py +497 -0
  96. honeybee_energy/load/process.py +472 -0
  97. honeybee_energy/load/setpoint.py +816 -0
  98. honeybee_energy/load/ventilation.py +550 -0
  99. honeybee_energy/material/__init__.py +1 -0
  100. honeybee_energy/material/_base.py +166 -0
  101. honeybee_energy/material/dictutil.py +59 -0
  102. honeybee_energy/material/frame.py +367 -0
  103. honeybee_energy/material/gas.py +1087 -0
  104. honeybee_energy/material/glazing.py +854 -0
  105. honeybee_energy/material/opaque.py +1351 -0
  106. honeybee_energy/material/shade.py +1360 -0
  107. honeybee_energy/measure.py +472 -0
  108. honeybee_energy/programtype.py +723 -0
  109. honeybee_energy/properties/__init__.py +1 -0
  110. honeybee_energy/properties/aperture.py +333 -0
  111. honeybee_energy/properties/door.py +342 -0
  112. honeybee_energy/properties/extension.py +244 -0
  113. honeybee_energy/properties/face.py +274 -0
  114. honeybee_energy/properties/model.py +2640 -0
  115. honeybee_energy/properties/room.py +1747 -0
  116. honeybee_energy/properties/shade.py +314 -0
  117. honeybee_energy/properties/shademesh.py +262 -0
  118. honeybee_energy/reader.py +48 -0
  119. honeybee_energy/result/__init__.py +1 -0
  120. honeybee_energy/result/colorobj.py +648 -0
  121. honeybee_energy/result/emissions.py +290 -0
  122. honeybee_energy/result/err.py +101 -0
  123. honeybee_energy/result/eui.py +100 -0
  124. honeybee_energy/result/generation.py +160 -0
  125. honeybee_energy/result/loadbalance.py +890 -0
  126. honeybee_energy/result/match.py +202 -0
  127. honeybee_energy/result/osw.py +90 -0
  128. honeybee_energy/result/rdd.py +59 -0
  129. honeybee_energy/result/zsz.py +190 -0
  130. honeybee_energy/run.py +1577 -0
  131. honeybee_energy/schedule/__init__.py +1 -0
  132. honeybee_energy/schedule/day.py +626 -0
  133. honeybee_energy/schedule/dictutil.py +59 -0
  134. honeybee_energy/schedule/fixedinterval.py +1012 -0
  135. honeybee_energy/schedule/rule.py +619 -0
  136. honeybee_energy/schedule/ruleset.py +1867 -0
  137. honeybee_energy/schedule/typelimit.py +310 -0
  138. honeybee_energy/shw.py +315 -0
  139. honeybee_energy/simulation/__init__.py +1 -0
  140. honeybee_energy/simulation/control.py +214 -0
  141. honeybee_energy/simulation/daylightsaving.py +185 -0
  142. honeybee_energy/simulation/dictutil.py +51 -0
  143. honeybee_energy/simulation/output.py +646 -0
  144. honeybee_energy/simulation/parameter.py +606 -0
  145. honeybee_energy/simulation/runperiod.py +443 -0
  146. honeybee_energy/simulation/shadowcalculation.py +295 -0
  147. honeybee_energy/simulation/sizing.py +546 -0
  148. honeybee_energy/ventcool/__init__.py +5 -0
  149. honeybee_energy/ventcool/_crack_data.py +91 -0
  150. honeybee_energy/ventcool/afn.py +289 -0
  151. honeybee_energy/ventcool/control.py +269 -0
  152. honeybee_energy/ventcool/crack.py +126 -0
  153. honeybee_energy/ventcool/fan.py +493 -0
  154. honeybee_energy/ventcool/opening.py +365 -0
  155. honeybee_energy/ventcool/simulation.py +314 -0
  156. honeybee_energy/writer.py +1078 -0
  157. honeybee_energy-1.116.106.dist-info/METADATA +113 -0
  158. honeybee_energy-1.116.106.dist-info/RECORD +162 -0
  159. honeybee_energy-1.116.106.dist-info/WHEEL +5 -0
  160. honeybee_energy-1.116.106.dist-info/entry_points.txt +2 -0
  161. honeybee_energy-1.116.106.dist-info/licenses/LICENSE +661 -0
  162. honeybee_energy-1.116.106.dist-info/top_level.txt +1 -0
@@ -0,0 +1,56 @@
1
+ # coding=utf-8
2
+ """Utilities to convertint any dictionary to Python objects.
3
+
4
+ Note that importing this module will import almost all modules within the
5
+ library in order to be able to re-serialize almost any dictionary produced
6
+ from the library.
7
+ """
8
+ from honeybee_energy.programtype import ProgramType
9
+ from honeybee_energy.constructionset import ConstructionSet
10
+ from honeybee_energy.material.dictutil import dict_to_material, MATERIAL_TYPES
11
+ from honeybee_energy.construction.dictutil import dict_to_construction, \
12
+ CONSTRUCTION_TYPES
13
+ from honeybee_energy.schedule.dictutil import dict_to_schedule, SCHEDULE_TYPES
14
+ from honeybee_energy.load.dictutil import dict_to_load, LOAD_TYPES
15
+ from honeybee_energy.simulation.dictutil import dict_to_simulation, SIMULATION_TYPES
16
+
17
+
18
+ def dict_to_object(honeybee_energy_dict, raise_exception=True):
19
+ """Re-serialize a dictionary of almost any object within honeybee_energy.
20
+
21
+ This includes any Material, Construction, ConstructionSet, Schedule, Load,
22
+ ProgramType, or Simulation object.
23
+
24
+ Args:
25
+ honeybee_energy_dict: A dictionary of any Honeybee energy object. Note
26
+ that this should be a non-abridged dictionary to be valid.
27
+ raise_exception: Boolean to note whether an exception should be raised
28
+ if the object is not identified as a part of honeybee_energy.
29
+ Default: True.
30
+
31
+ Returns:
32
+ A Python object derived from the input honeybee_energy_dict.
33
+ """
34
+ try: # get the type key from the dictionary
35
+ obj_type = honeybee_energy_dict['type']
36
+ except KeyError:
37
+ raise ValueError('Honeybee_energy dictionary lacks required "type" key.')
38
+
39
+ if obj_type == 'ProgramType':
40
+ return ProgramType.from_dict(honeybee_energy_dict)
41
+ elif obj_type == 'ConstructionSet':
42
+ return ConstructionSet.from_dict(honeybee_energy_dict)
43
+ elif obj_type in SCHEDULE_TYPES:
44
+ return dict_to_schedule(honeybee_energy_dict)
45
+ elif obj_type in CONSTRUCTION_TYPES:
46
+ return dict_to_construction(honeybee_energy_dict)
47
+ elif obj_type in MATERIAL_TYPES:
48
+ return dict_to_material(honeybee_energy_dict)
49
+ elif obj_type in LOAD_TYPES:
50
+ return dict_to_load(honeybee_energy_dict)
51
+ elif obj_type in SIMULATION_TYPES:
52
+ return dict_to_simulation(honeybee_energy_dict)
53
+ elif raise_exception:
54
+ raise ValueError(
55
+ '{} is not a recognized honeybee energy object'.format(obj_type)
56
+ )
@@ -0,0 +1,5 @@
1
+ """honeybee-energy electricity generator definitions.
2
+
3
+ This includes photovoltaic panels, wind/hydro turbines, battery storage devices,
4
+ and combustion engines.
5
+ """
@@ -0,0 +1,204 @@
1
+ # coding=utf-8
2
+ """Definitions for central parameters used in electric generator simulation."""
3
+ from __future__ import division
4
+
5
+ from honeybee._lockable import lockable
6
+ from honeybee.typing import float_in_range, float_positive
7
+
8
+ from ..properties.extension import ElectricLoadCenterProperties
9
+ from ..writer import generate_idf_string
10
+
11
+
12
+ @lockable
13
+ class ElectricLoadCenter(object):
14
+ """Parameters used to specify the properties of the model's electric loads center.
15
+
16
+ Args:
17
+ inverter_efficiency: A number between 0 and 1 for the load centers's
18
+ inverter nominal rated DC-to-AC conversion efficiency. An inverter
19
+ converts DC power, such as that output by photovoltaic panels, to
20
+ AC power, such as that distributed by the electrical grid and is available
21
+ from standard electrical outlets. Inverter efficiency is defined
22
+ as the inverter's rated AC power output divided by its rated DC power
23
+ output. (Default: 0.96).
24
+ inverter_dc_to_ac_size_ratio: A positive number (typically greater than 1) for
25
+ the ratio of the inverter's DC rated size to its AC rated size. Typically,
26
+ inverters are not sized to convert the full DC output under standard
27
+ test conditions (STC) as such conditions rarely occur in reality and
28
+ therefore unnecessarily add to the size/cost of the inverter. For a
29
+ system with a high DC to AC size ratio, during times when the
30
+ DC power output exceeds the inverter's rated DC input size, the inverter
31
+ limits the array's power output by increasing the DC operating voltage,
32
+ which moves the arrays operating point down its current-voltage (I-V)
33
+ curve. The default value of 1.1 is reasonable for most systems. A
34
+ typical range is 1.1 to 1.25, although some large-scale systems have
35
+ ratios of as high as 1.5. The optimal value depends on the system's
36
+ location, array orientation, and module cost. (Default: 1.1).
37
+
38
+ Properties:
39
+ * inverter_efficiency
40
+ * inverter_dc_to_ac_size_ratio
41
+ """
42
+ __slots__ = ('_inverter_efficiency', '_inverter_dc_to_ac_size_ratio', '_locked', '_properties')
43
+
44
+ def __init__(self, inverter_efficiency=0.96, inverter_dc_to_ac_size_ratio=1.1):
45
+ """Initialize ElectricLoadCenter."""
46
+ self.inverter_efficiency = inverter_efficiency
47
+ self.inverter_dc_to_ac_size_ratio = inverter_dc_to_ac_size_ratio
48
+ # TODO: Add properties for battery storage to this object
49
+ self._properties = ElectricLoadCenterProperties(self)
50
+
51
+ @property
52
+ def inverter_efficiency(self):
53
+ """Get or set a number for the nominal rated efficiency of the inverter."""
54
+ return self._inverter_efficiency
55
+
56
+ @inverter_efficiency.setter
57
+ def inverter_efficiency(self, value):
58
+ self._inverter_efficiency = float_in_range(
59
+ value, 0.0, 1.0, 'inverter rated efficiency')
60
+
61
+ @property
62
+ def inverter_dc_to_ac_size_ratio(self):
63
+ """Get or set a number for the nominal rated efficiency of the inverter."""
64
+ return self._inverter_dc_to_ac_size_ratio
65
+
66
+ @inverter_dc_to_ac_size_ratio.setter
67
+ def inverter_dc_to_ac_size_ratio(self, value):
68
+ self._inverter_dc_to_ac_size_ratio = float_positive(
69
+ value, 'inverter DC to AC size ratio')
70
+
71
+ @property
72
+ def properties(self):
73
+ """Get the properties of the ElectricLoadCenter."""
74
+ return self._properties
75
+
76
+ @classmethod
77
+ def from_dict(cls, data):
78
+ """Create a ElectricLoadCenter object from a dictionary.
79
+
80
+ Args:
81
+ data: A ElectricLoadCenter dictionary following the format below.
82
+
83
+ .. code-block:: python
84
+
85
+ {
86
+ "type": "ElectricLoadCenter"
87
+ "inverter_efficiency": 0.95, # rated inverter efficiency
88
+ "inverter_dc_to_ac_size_ratio": 1.2 # ratio between inverter DC and AC size
89
+ }
90
+ """
91
+ assert data['type'] == 'ElectricLoadCenter', 'Expected ' \
92
+ 'ElectricLoadCenter dictionary. Got {}.'.format(data['type'])
93
+
94
+ eff = data['inverter_efficiency'] if 'inverter_efficiency' in data \
95
+ and data['inverter_efficiency'] is not None else 0.96
96
+ dc_to_ac = data['inverter_dc_to_ac_size_ratio'] \
97
+ if 'inverter_dc_to_ac_size_ratio' in data \
98
+ and data['inverter_dc_to_ac_size_ratio'] is not None else 1.1
99
+ new_obj = cls(eff, dc_to_ac)
100
+ if 'properties' in data and data['properties'] is not None:
101
+ new_obj.properties._load_extension_attr_from_dict(data['properties'])
102
+ return new_obj
103
+
104
+ def to_dict(self):
105
+ """ElectricLoadCenter dictionary representation."""
106
+ base = {'type': 'ElectricLoadCenter'}
107
+ base['inverter_efficiency'] = self.inverter_efficiency
108
+ base['inverter_dc_to_ac_size_ratio'] = self.inverter_dc_to_ac_size_ratio
109
+ prop_dict = self.properties.to_dict()
110
+ if prop_dict is not None:
111
+ base['properties'] = prop_dict
112
+ return base
113
+
114
+ def to_idf(self, generator_objects):
115
+ """IDF string representation of the electric loads center.
116
+
117
+ Note that this method only outputs the ElectricLoadCenter:Generators list,
118
+ the ElectricLoadCenter:Inverter object and the ElectricLoadCenter:Distribution
119
+ specification. However, to write the full set of generation objects into
120
+ an IDF, the individual generators must also be written.
121
+
122
+ Args:
123
+ generator_objects: A list of honeybee objects representing electrical
124
+ generators that are included in the system. For example, this can be
125
+ a list of Shade objects with PVProperties assigned to them.
126
+
127
+ Returns:
128
+ A tuple with three elements
129
+
130
+ - generators: Text string representation of the ElectricLoadCenter:
131
+ Generators list.
132
+
133
+ - inverter: Text string representation of the ElectricLoadCenter:
134
+ Inverter list.
135
+
136
+ - distribution: Text string representation of the ElectricLoadCenter:
137
+ Distribution specification.
138
+ """
139
+ # create the ElectricLoadCenter:Generators list
140
+ generators_vals = ['Model Load Center Generators']
141
+ generators_comments = ['name']
142
+ for i, g_obj in enumerate(generator_objects):
143
+ g_id = '{}..{}'.format(
144
+ g_obj.properties.energy.pv_properties.identifier, g_obj.identifier)
145
+ generators_vals.append(g_id)
146
+ generators_comments.append('generator {} name'.format(i + 1))
147
+ generators_vals.append('Generator:PVWatts')
148
+ generators_comments.append('generator {} object type'.format(i + 1))
149
+ generators_vals.extend(('', '', ''))
150
+ generators_comments.extend(
151
+ ('power output', 'availability', 'thermal to electric'))
152
+ generators = generate_idf_string(
153
+ 'ElectricLoadCenter:Generators', generators_vals, generators_comments)
154
+ # create the ElectricLoadCenter:Inverter object
155
+ inverter_values = (
156
+ 'Photovoltaic Inverter', self.inverter_dc_to_ac_size_ratio,
157
+ self.inverter_efficiency)
158
+ inverter_comments = (
159
+ 'inverter name', 'DC to AC size ratio', 'inverter efficiency')
160
+ inverter = generate_idf_string(
161
+ 'ElectricLoadCenter:Inverter:PVWatts', inverter_values, inverter_comments)
162
+ # create the ElectricLoadCenter:Distribution specification
163
+ values = ('Model Load Center Distribution', 'Model Load Center Generators',
164
+ 'Baseload', '', '', '', 'DirectCurrentWithInverter',
165
+ 'Photovoltaic Inverter')
166
+ comments = (
167
+ 'distribution name', 'generator list name', 'generator operation type',
168
+ 'purchased electric demand limit', 'track schedule', 'track meter',
169
+ 'electrical buss type', 'inverter name')
170
+ distribution = generate_idf_string(
171
+ 'ElectricLoadCenter:Distribution', values, comments)
172
+ return generators, inverter, distribution
173
+
174
+ def duplicate(self):
175
+ """Get a copy of this object."""
176
+ return self.__copy__()
177
+
178
+ def __copy__(self):
179
+ new_obj = ElectricLoadCenter(
180
+ self.inverter_efficiency, self.inverter_dc_to_ac_size_ratio)
181
+ new_obj._properties._duplicate_extension_attr(self._properties)
182
+ return new_obj
183
+
184
+ def __key(self):
185
+ """A tuple based on the object properties, useful for hashing."""
186
+ return (self.inverter_efficiency, self.inverter_dc_to_ac_size_ratio)
187
+
188
+ def __hash__(self):
189
+ return hash(self.__key())
190
+
191
+ def __eq__(self, other):
192
+ return isinstance(other, ElectricLoadCenter) and \
193
+ self.__key() == other.__key()
194
+
195
+ def __ne__(self, other):
196
+ return not self.__eq__(other)
197
+
198
+ def ToString(self):
199
+ """Overwrite .NET ToString."""
200
+ return self.__repr__()
201
+
202
+ def __repr__(self):
203
+ return 'ElectricLoadCenter: [inverter efficiency: {}]'.format(
204
+ self.inverter_efficiency)