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.
- honeybee_energy/__init__.py +24 -0
- honeybee_energy/__main__.py +4 -0
- honeybee_energy/_extend_honeybee.py +145 -0
- honeybee_energy/altnumber.py +21 -0
- honeybee_energy/baseline/__init__.py +2 -0
- honeybee_energy/baseline/create.py +608 -0
- honeybee_energy/baseline/data/__init__.py +1 -0
- honeybee_energy/baseline/data/constructions.csv +64 -0
- honeybee_energy/baseline/data/fen_ratios.csv +15 -0
- honeybee_energy/baseline/data/lpd_building.csv +21 -0
- honeybee_energy/baseline/data/pci_2016.csv +22 -0
- honeybee_energy/baseline/data/pci_2019.csv +22 -0
- honeybee_energy/baseline/data/pci_2022.csv +22 -0
- honeybee_energy/baseline/data/shw.csv +21 -0
- honeybee_energy/baseline/pci.py +512 -0
- honeybee_energy/baseline/result.py +371 -0
- honeybee_energy/boundarycondition.py +128 -0
- honeybee_energy/cli/__init__.py +69 -0
- honeybee_energy/cli/baseline.py +475 -0
- honeybee_energy/cli/edit.py +327 -0
- honeybee_energy/cli/lib.py +1154 -0
- honeybee_energy/cli/result.py +810 -0
- honeybee_energy/cli/setconfig.py +124 -0
- honeybee_energy/cli/settings.py +569 -0
- honeybee_energy/cli/simulate.py +380 -0
- honeybee_energy/cli/translate.py +1714 -0
- honeybee_energy/cli/validate.py +224 -0
- honeybee_energy/config.json +11 -0
- honeybee_energy/config.py +842 -0
- honeybee_energy/construction/__init__.py +1 -0
- honeybee_energy/construction/_base.py +374 -0
- honeybee_energy/construction/air.py +325 -0
- honeybee_energy/construction/dictutil.py +89 -0
- honeybee_energy/construction/dynamic.py +607 -0
- honeybee_energy/construction/opaque.py +460 -0
- honeybee_energy/construction/shade.py +319 -0
- honeybee_energy/construction/window.py +1096 -0
- honeybee_energy/construction/windowshade.py +847 -0
- honeybee_energy/constructionset.py +1655 -0
- honeybee_energy/dictutil.py +56 -0
- honeybee_energy/generator/__init__.py +5 -0
- honeybee_energy/generator/loadcenter.py +204 -0
- honeybee_energy/generator/pv.py +535 -0
- honeybee_energy/hvac/__init__.py +21 -0
- honeybee_energy/hvac/_base.py +124 -0
- honeybee_energy/hvac/_template.py +270 -0
- honeybee_energy/hvac/allair/__init__.py +22 -0
- honeybee_energy/hvac/allair/_base.py +349 -0
- honeybee_energy/hvac/allair/furnace.py +168 -0
- honeybee_energy/hvac/allair/psz.py +131 -0
- honeybee_energy/hvac/allair/ptac.py +163 -0
- honeybee_energy/hvac/allair/pvav.py +109 -0
- honeybee_energy/hvac/allair/vav.py +128 -0
- honeybee_energy/hvac/detailed.py +337 -0
- honeybee_energy/hvac/doas/__init__.py +28 -0
- honeybee_energy/hvac/doas/_base.py +345 -0
- honeybee_energy/hvac/doas/fcu.py +127 -0
- honeybee_energy/hvac/doas/radiant.py +329 -0
- honeybee_energy/hvac/doas/vrf.py +81 -0
- honeybee_energy/hvac/doas/wshp.py +91 -0
- honeybee_energy/hvac/heatcool/__init__.py +23 -0
- honeybee_energy/hvac/heatcool/_base.py +177 -0
- honeybee_energy/hvac/heatcool/baseboard.py +61 -0
- honeybee_energy/hvac/heatcool/evapcool.py +72 -0
- honeybee_energy/hvac/heatcool/fcu.py +92 -0
- honeybee_energy/hvac/heatcool/gasunit.py +53 -0
- honeybee_energy/hvac/heatcool/radiant.py +269 -0
- honeybee_energy/hvac/heatcool/residential.py +77 -0
- honeybee_energy/hvac/heatcool/vrf.py +54 -0
- honeybee_energy/hvac/heatcool/windowac.py +70 -0
- honeybee_energy/hvac/heatcool/wshp.py +62 -0
- honeybee_energy/hvac/idealair.py +699 -0
- honeybee_energy/internalmass.py +310 -0
- honeybee_energy/lib/__init__.py +1 -0
- honeybee_energy/lib/_loadconstructions.py +194 -0
- honeybee_energy/lib/_loadconstructionsets.py +117 -0
- honeybee_energy/lib/_loadmaterials.py +83 -0
- honeybee_energy/lib/_loadprogramtypes.py +125 -0
- honeybee_energy/lib/_loadschedules.py +87 -0
- honeybee_energy/lib/_loadtypelimits.py +64 -0
- honeybee_energy/lib/constructions.py +207 -0
- honeybee_energy/lib/constructionsets.py +95 -0
- honeybee_energy/lib/materials.py +67 -0
- honeybee_energy/lib/programtypes.py +125 -0
- honeybee_energy/lib/schedules.py +61 -0
- honeybee_energy/lib/scheduletypelimits.py +31 -0
- honeybee_energy/load/__init__.py +1 -0
- honeybee_energy/load/_base.py +190 -0
- honeybee_energy/load/daylight.py +397 -0
- honeybee_energy/load/dictutil.py +47 -0
- honeybee_energy/load/equipment.py +771 -0
- honeybee_energy/load/hotwater.py +543 -0
- honeybee_energy/load/infiltration.py +460 -0
- honeybee_energy/load/lighting.py +480 -0
- honeybee_energy/load/people.py +497 -0
- honeybee_energy/load/process.py +472 -0
- honeybee_energy/load/setpoint.py +816 -0
- honeybee_energy/load/ventilation.py +550 -0
- honeybee_energy/material/__init__.py +1 -0
- honeybee_energy/material/_base.py +166 -0
- honeybee_energy/material/dictutil.py +59 -0
- honeybee_energy/material/frame.py +367 -0
- honeybee_energy/material/gas.py +1087 -0
- honeybee_energy/material/glazing.py +854 -0
- honeybee_energy/material/opaque.py +1351 -0
- honeybee_energy/material/shade.py +1360 -0
- honeybee_energy/measure.py +472 -0
- honeybee_energy/programtype.py +723 -0
- honeybee_energy/properties/__init__.py +1 -0
- honeybee_energy/properties/aperture.py +333 -0
- honeybee_energy/properties/door.py +342 -0
- honeybee_energy/properties/extension.py +244 -0
- honeybee_energy/properties/face.py +274 -0
- honeybee_energy/properties/model.py +2640 -0
- honeybee_energy/properties/room.py +1747 -0
- honeybee_energy/properties/shade.py +314 -0
- honeybee_energy/properties/shademesh.py +262 -0
- honeybee_energy/reader.py +48 -0
- honeybee_energy/result/__init__.py +1 -0
- honeybee_energy/result/colorobj.py +648 -0
- honeybee_energy/result/emissions.py +290 -0
- honeybee_energy/result/err.py +101 -0
- honeybee_energy/result/eui.py +100 -0
- honeybee_energy/result/generation.py +160 -0
- honeybee_energy/result/loadbalance.py +890 -0
- honeybee_energy/result/match.py +202 -0
- honeybee_energy/result/osw.py +90 -0
- honeybee_energy/result/rdd.py +59 -0
- honeybee_energy/result/zsz.py +190 -0
- honeybee_energy/run.py +1577 -0
- honeybee_energy/schedule/__init__.py +1 -0
- honeybee_energy/schedule/day.py +626 -0
- honeybee_energy/schedule/dictutil.py +59 -0
- honeybee_energy/schedule/fixedinterval.py +1012 -0
- honeybee_energy/schedule/rule.py +619 -0
- honeybee_energy/schedule/ruleset.py +1867 -0
- honeybee_energy/schedule/typelimit.py +310 -0
- honeybee_energy/shw.py +315 -0
- honeybee_energy/simulation/__init__.py +1 -0
- honeybee_energy/simulation/control.py +214 -0
- honeybee_energy/simulation/daylightsaving.py +185 -0
- honeybee_energy/simulation/dictutil.py +51 -0
- honeybee_energy/simulation/output.py +646 -0
- honeybee_energy/simulation/parameter.py +606 -0
- honeybee_energy/simulation/runperiod.py +443 -0
- honeybee_energy/simulation/shadowcalculation.py +295 -0
- honeybee_energy/simulation/sizing.py +546 -0
- honeybee_energy/ventcool/__init__.py +5 -0
- honeybee_energy/ventcool/_crack_data.py +91 -0
- honeybee_energy/ventcool/afn.py +289 -0
- honeybee_energy/ventcool/control.py +269 -0
- honeybee_energy/ventcool/crack.py +126 -0
- honeybee_energy/ventcool/fan.py +493 -0
- honeybee_energy/ventcool/opening.py +365 -0
- honeybee_energy/ventcool/simulation.py +314 -0
- honeybee_energy/writer.py +1078 -0
- honeybee_energy-1.116.106.dist-info/METADATA +113 -0
- honeybee_energy-1.116.106.dist-info/RECORD +162 -0
- honeybee_energy-1.116.106.dist-info/WHEEL +5 -0
- honeybee_energy-1.116.106.dist-info/entry_points.txt +2 -0
- honeybee_energy-1.116.106.dist-info/licenses/LICENSE +661 -0
- 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
|
+
}
|