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,224 @@
1
+ """honeybee-energy validation commands."""
2
+ import click
3
+ import sys
4
+ import logging
5
+ import json
6
+
7
+ from honeybee.model import Model
8
+
9
+ from honeybee_energy.simulation.parameter import SimulationParameter
10
+ from honeybee_energy.programtype import ProgramType
11
+ from honeybee_energy.schedule.ruleset import ScheduleRuleset
12
+ from honeybee_energy.schedule.fixedinterval import ScheduleFixedInterval
13
+ from honeybee_energy.schedule.typelimit import ScheduleTypeLimit
14
+ from honeybee_energy.constructionset import ConstructionSet
15
+
16
+ _logger = logging.getLogger(__name__)
17
+ try:
18
+ import honeybee_schema.energy.programtype as schema_programtype
19
+ import honeybee_schema.energy.schedule as schema_schedule
20
+ import honeybee_schema.energy.constructionset as schema_constructionset
21
+ except ImportError:
22
+ _logger.exception(
23
+ 'honeybee_schema is not installed and validation commands are unavailable.\n'
24
+ 'You must use Python 3.7 or above to run validation commands.'
25
+ )
26
+
27
+
28
+ @click.group(help='Commands for validating Honeybee energy JSON files.')
29
+ def validate():
30
+ pass
31
+
32
+
33
+ @validate.command('model-properties')
34
+ @click.argument('model-json', type=click.Path(
35
+ exists=True, file_okay=True, dir_okay=False, resolve_path=True))
36
+ @click.option(
37
+ '--output-file', '-f', help='Optional file to output the full report '
38
+ 'of any errors detected. By default it will be printed out to stdout',
39
+ type=click.File('w'), default='-')
40
+ def validate_model_properties(model_json, output_file):
41
+ """Validate the energy properties of a Model JSON against the Honeybee schema.
42
+
43
+ This includes basic re-serialization, which accounts for missing objects,
44
+ and unique identifier checks.
45
+
46
+ \b
47
+ Args:
48
+ model_json: Full path to a Model JSON file.
49
+ """
50
+ try:
51
+ click.echo('Validating Model JSON ...')
52
+ # re-serialize the Model to make sure no errors are found in re-serialization
53
+ parsed_model = Model.from_hbjson(model_json)
54
+ click.echo('Python re-serialization passed.')
55
+ # perform several other checks for key honeybee model schema rules
56
+ report = parsed_model.properties.energy.check_all(raise_exception=False)
57
+ # check the report and write the summary of errors
58
+ if report == '':
59
+ output_file.write(
60
+ 'Congratulations! The energy properties of your Model JSON are valid!')
61
+ else:
62
+ error_msg = '\nYour Model is invalid for the following reasons:'
63
+ output_file.write('\n'.join([error_msg, report]))
64
+ except Exception as e:
65
+ _logger.exception('Model validation failed.\n{}'.format(e))
66
+ sys.exit(1)
67
+ else:
68
+ sys.exit(0)
69
+
70
+
71
+ @validate.command('sim-par')
72
+ @click.argument('sim-par-json', type=click.Path(
73
+ exists=True, file_okay=True, dir_okay=False, resolve_path=True))
74
+ def validate_sim_par(sim_par_json):
75
+ """Validate all properties of a SimulationParameter JSON against the Honeybee schema.
76
+
77
+ \b
78
+ Args:
79
+ sim_par_json: Full path to a SimulationParameter JSON file.
80
+ """
81
+ try:
82
+ click.echo('Validating SimulationParameter JSON ...')
83
+ # re-serialize to make sure no errors are found in re-serialization
84
+ with open(sim_par_json) as json_file:
85
+ data = json.load(json_file)
86
+ SimulationParameter.from_dict(data)
87
+ click.echo('Python re-serialization passed.')
88
+ # if we made it to this point, report that the object is valid
89
+ click.echo('Congratulations! Your SimulationParameter JSON is valid!')
90
+ except Exception as e:
91
+ _logger.exception('SimulationParameter validation failed.\n{}'.format(e))
92
+ sys.exit(1)
93
+ else:
94
+ sys.exit(0)
95
+
96
+
97
+ @validate.command('program-type')
98
+ @click.argument('program-type-json', type=click.Path(
99
+ exists=True, file_okay=True, dir_okay=False, resolve_path=True))
100
+ def validate_program_type(program_type_json):
101
+ """Validate all properties of a ProgramType or ProgramTypeAbridged JSON.
102
+
103
+ \b
104
+ Args:
105
+ program_type_json: Full path to a ProgramType or ProgramTypeAbridged JSON file.
106
+ """
107
+ try:
108
+ # first check the JSON against the OpenAPI specification
109
+ with open(program_type_json) as json_file:
110
+ data = json.load(json_file)
111
+ if data['type'] == 'ProgramType':
112
+ click.echo('Validating ProgramType JSON ...')
113
+ ProgramType.from_dict(data)
114
+ click.echo('Python re-serialization passed.')
115
+ else: # assume it's a ProgramTypeAbridged schema
116
+ click.echo('Validating ProgramTypeAbridged JSON ...')
117
+ schema_programtype.ProgramTypeAbridged.parse_file(program_type_json)
118
+ click.echo('Pydantic validation passed.')
119
+ # if we made it to this point, report that the object is valid
120
+ click.echo('Congratulations! Your Program JSON is valid!')
121
+ except Exception as e:
122
+ _logger.exception('ProgramType validation failed.\n{}'.format(e))
123
+ sys.exit(1)
124
+ else:
125
+ sys.exit(0)
126
+
127
+
128
+ @validate.command('schedule')
129
+ @click.argument('schedule-json', type=click.Path(
130
+ exists=True, file_okay=True, dir_okay=False, resolve_path=True))
131
+ def validate_schedule(schedule_json):
132
+ """Validate all properties of a schedule or abridged schedule JSON.
133
+
134
+ \b
135
+ Args:
136
+ schedule_json: Full path to a either ScheduleRuleset, ScheduleRulesetAbridged
137
+ ScheduleFixedInterval, or ScheduleFixedIntervalAbridged JSON file.
138
+ """
139
+ try:
140
+ # first check the JSON against the OpenAPI specification
141
+ with open(schedule_json) as json_file:
142
+ data = json.load(json_file)
143
+ if data['type'] == 'ScheduleRuleset':
144
+ click.echo('Validating ScheduleRuleset JSON ...')
145
+ ScheduleRuleset.from_dict(data)
146
+ click.echo('Python re-serialization passed.')
147
+ elif data['type'] == 'ScheduleFixedInterval':
148
+ click.echo('Validating ScheduleFixedInterval JSON ...')
149
+ ScheduleFixedInterval.from_dict(data)
150
+ click.echo('Python re-serialization passed.')
151
+ elif data['type'] == 'ScheduleRulesetAbridged':
152
+ click.echo('Validating ScheduleRulesetAbridged JSON ...')
153
+ schema_schedule.ScheduleRulesetAbridged.parse_file(schedule_json)
154
+ click.echo('Pydantic validation passed.')
155
+ else: # assume it's a ScheduleFixedIntervalAbridged schema
156
+ click.echo('Validating ScheduleFixedIntervalAbridged JSON ...')
157
+ schema_schedule.ScheduleFixedIntervalAbridged.parse_file(schedule_json)
158
+ click.echo('Pydantic validation passed.')
159
+ # if we made it to this point, report that the object is valid
160
+ click.echo('Congratulations! Your Schedule JSON is valid!')
161
+ except Exception as e:
162
+ _logger.exception('Schedule validation failed.\n{}'.format(e))
163
+ sys.exit(1)
164
+ else:
165
+ sys.exit(0)
166
+
167
+
168
+ @validate.command('schedule-type-limit')
169
+ @click.argument('schedule-type-limit-json', type=click.Path(
170
+ exists=True, file_okay=True, dir_okay=False, resolve_path=True))
171
+ def validate_schedule_type_limit(schedule_type_limit_json):
172
+ """Validate all properties of a ScheduleTypeLimit JSON against the Honeybee schema.
173
+
174
+ \b
175
+ Args:
176
+ schedule_type_limit_json: Full path to a ScheduleTypeLimit JSON file.
177
+ """
178
+ try:
179
+ click.echo('Validating ScheduleTypeLimit JSON ...')
180
+ # re-serialize to make sure no errors are found in re-serialization
181
+ with open(schedule_type_limit_json) as json_file:
182
+ data = json.load(json_file)
183
+ ScheduleTypeLimit.from_dict(data)
184
+ click.echo('Python re-serialization passed.')
185
+ # if we made it to this point, report that the object is valid
186
+ click.echo('Congratulations! Your ScheduleTypeLimit JSON is valid!')
187
+ except Exception as e:
188
+ _logger.exception('ScheduleTypeLimit validation failed.\n{}'.format(e))
189
+ sys.exit(1)
190
+ else:
191
+ sys.exit(0)
192
+
193
+
194
+ @validate.command('construction-set')
195
+ @click.argument('construction-set-json', type=click.Path(
196
+ exists=True, file_okay=True, dir_okay=False, resolve_path=True))
197
+ def validate_construction_set(construction_set_json):
198
+ """Validate all properties of a ConstructionSet or ConstructionSetAbridged JSON.
199
+
200
+ \b
201
+ Args:
202
+ construction_set_json: Full path to a ConstructionSet or ConstructionSetAbridged
203
+ JSON file.
204
+ """
205
+ try:
206
+ # first check the JSON against the OpenAPI specification
207
+ with open(construction_set_json) as json_file:
208
+ data = json.load(json_file)
209
+ if data['type'] == 'ConstructionSet':
210
+ click.echo('Validating ConstructionSet JSON ...')
211
+ ConstructionSet.from_dict(data)
212
+ click.echo('Python re-serialization passed.')
213
+ else: # assume it's a ConstructionSetAbridged schema
214
+ click.echo('Validating ConstructionSetAbridged JSON ...')
215
+ schema_constructionset.ConstructionSetAbridged.parse_file(
216
+ construction_set_json)
217
+ click.echo('Pydantic validation passed.')
218
+ # if we made it to this point, report that the object is valid
219
+ click.echo('Congratulations! Your Program JSON is valid!')
220
+ except Exception as e:
221
+ _logger.exception('ConstructionSet validation failed.\n{}'.format(e))
222
+ sys.exit(1)
223
+ else:
224
+ sys.exit(0)
@@ -0,0 +1,11 @@
1
+ {
2
+ "__comment__": "Add full paths to folders (eg. C:/EnergyPlusV9-0-1, /usr/local/energyplus).",
3
+ "energyplus_path": "",
4
+ "openstudio_path": "",
5
+ "lbt_measures_path": "",
6
+ "honeybee_openstudio_gem_path": "",
7
+ "ironbug_path": "",
8
+ "standards_data_folder": "",
9
+ "standards_extension_folders": [],
10
+ "defaults_file": ""
11
+ }