dragonfly-doe2 0.12.3__py2.py3-none-any.whl → 0.12.5__py2.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.
- dragonfly_doe2/properties/model.py +55 -3
- {dragonfly_doe2-0.12.3.dist-info → dragonfly_doe2-0.12.5.dist-info}/METADATA +1 -1
- {dragonfly_doe2-0.12.3.dist-info → dragonfly_doe2-0.12.5.dist-info}/RECORD +7 -7
- {dragonfly_doe2-0.12.3.dist-info → dragonfly_doe2-0.12.5.dist-info}/LICENSE +0 -0
- {dragonfly_doe2-0.12.3.dist-info → dragonfly_doe2-0.12.5.dist-info}/WHEEL +0 -0
- {dragonfly_doe2-0.12.3.dist-info → dragonfly_doe2-0.12.5.dist-info}/entry_points.txt +0 -0
- {dragonfly_doe2-0.12.3.dist-info → dragonfly_doe2-0.12.5.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
2
|
"""Model DOE-2 Properties."""
|
|
3
|
+
from ladybug_geometry.geometry3d import Face3D
|
|
4
|
+
from honeybee.units import parse_distance_string
|
|
5
|
+
|
|
3
6
|
from honeybee_doe2.grouping import _grouped_floor_boundary
|
|
4
7
|
|
|
5
8
|
|
|
@@ -74,6 +77,37 @@ class ModelDoe2Properties(object):
|
|
|
74
77
|
raise ValueError(full_msg)
|
|
75
78
|
return full_msg
|
|
76
79
|
|
|
80
|
+
def check_generic(self, raise_exception=True, detailed=False):
|
|
81
|
+
"""Check generic of the aspects of the Model DOE-2 properties.
|
|
82
|
+
|
|
83
|
+
This includes checks for everything except holes in floor plates and
|
|
84
|
+
courtyard stories.
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
raise_exception: Boolean to note whether a ValueError should be raised
|
|
88
|
+
if any errors are found. If False, this method will simply
|
|
89
|
+
return a text string with all errors that were found.
|
|
90
|
+
detailed: Boolean for whether the returned object is a detailed list of
|
|
91
|
+
dicts with error info or a string with a message. (Default: False).
|
|
92
|
+
|
|
93
|
+
Returns:
|
|
94
|
+
A text string with all errors that were found or a list if detailed is True.
|
|
95
|
+
This string (or list) will be empty if no errors were found.
|
|
96
|
+
"""
|
|
97
|
+
# set up defaults to ensure the method runs correctly
|
|
98
|
+
detailed = False if raise_exception else detailed
|
|
99
|
+
msgs = []
|
|
100
|
+
# perform checks for specific doe-2 simulation rules
|
|
101
|
+
msgs.append(self.check_room_2d_floor_plate_vertex_count(False, detailed))
|
|
102
|
+
# output a final report of errors or raise an exception
|
|
103
|
+
full_msgs = [msg for msg in msgs if msg]
|
|
104
|
+
if detailed:
|
|
105
|
+
return [m for msg in full_msgs for m in msg]
|
|
106
|
+
full_msg = '\n'.join(full_msgs)
|
|
107
|
+
if raise_exception and len(full_msgs) != 0:
|
|
108
|
+
raise ValueError(full_msg)
|
|
109
|
+
return full_msg
|
|
110
|
+
|
|
77
111
|
def check_all(self, raise_exception=True, detailed=False):
|
|
78
112
|
"""Check all of the aspects of the Model DOE-2 properties.
|
|
79
113
|
|
|
@@ -91,8 +125,11 @@ class ModelDoe2Properties(object):
|
|
|
91
125
|
# set up defaults to ensure the method runs correctly
|
|
92
126
|
detailed = False if raise_exception else detailed
|
|
93
127
|
msgs = []
|
|
94
|
-
|
|
128
|
+
tol = self.host.tolerance
|
|
129
|
+
# perform checks for specific doe-2 simulation rules
|
|
95
130
|
msgs.append(self.check_room_2d_floor_plate_vertex_count(False, detailed))
|
|
131
|
+
msgs.append(self.check_no_room_2d_floor_plate_holes(False, detailed))
|
|
132
|
+
msgs.append(self.check_no_story_courtyards(tol, False, detailed))
|
|
96
133
|
# output a final report of errors or raise an exception
|
|
97
134
|
full_msgs = [msg for msg in msgs if msg]
|
|
98
135
|
if detailed:
|
|
@@ -185,14 +222,29 @@ class ModelDoe2Properties(object):
|
|
|
185
222
|
Returns:
|
|
186
223
|
A string with the message or a list with a dictionary if detailed is True.
|
|
187
224
|
"""
|
|
225
|
+
# establish the tolerance and gap width at which point it is clearly a courtyard
|
|
188
226
|
tolerance = self.host.tolerance if tolerance is None else tolerance
|
|
227
|
+
court_width = parse_distance_string('2ft', self.host.units)
|
|
228
|
+
# loop through the stories and identify any courtyards
|
|
189
229
|
story_msgs = []
|
|
190
230
|
for bldg in self.host.buildings:
|
|
191
231
|
for story in bldg.unique_stories:
|
|
192
232
|
floor_geos = [room.floor_geometry for room in story.room_2ds]
|
|
193
233
|
joined_geos = _grouped_floor_boundary(floor_geos, tolerance)
|
|
194
|
-
|
|
195
|
-
|
|
234
|
+
c_count = 0
|
|
235
|
+
for geo in joined_geos:
|
|
236
|
+
if geo.has_holes:
|
|
237
|
+
for hole in geo.holes:
|
|
238
|
+
try:
|
|
239
|
+
h_geo = Face3D(hole)
|
|
240
|
+
h_geo = h_geo.remove_colinear_vertices(court_width)
|
|
241
|
+
max_len = max(s.length for s in h_geo.boundary_segments)
|
|
242
|
+
tol_area = max_len * court_width
|
|
243
|
+
if h_geo.area > tol_area:
|
|
244
|
+
c_count += 1
|
|
245
|
+
except (AssertionError, ValueError):
|
|
246
|
+
pass # gap is too small to be a true courtyard
|
|
247
|
+
if c_count != 0:
|
|
196
248
|
hole_msg = 'a courtyard' if c_count == 1 \
|
|
197
249
|
else '{} courtyards'.format(c_count)
|
|
198
250
|
msg = 'The geometry of Story "{}" contains {}, which eQuest ' \
|
|
@@ -5,11 +5,11 @@ dragonfly_doe2/writer.py,sha256=Yfs9fEEhX8WrDqhy4nIxeOwMPDKHvu3RoeInz94pGO8,6224
|
|
|
5
5
|
dragonfly_doe2/cli/__init__.py,sha256=OwTHSsOOEoJjbw5CqPig8Yo7jk1f6m53OFnhuZgPthE,391
|
|
6
6
|
dragonfly_doe2/cli/translate.py,sha256=gVpMSL074B6YPOe26cD0njGL_durS9lugrenbLoZiUw,7989
|
|
7
7
|
dragonfly_doe2/properties/__init__.py,sha256=0JiyMYGeRlPLcxh1PSr6eJzDGgfrbMivcO9dS1h7wEU,33
|
|
8
|
-
dragonfly_doe2/properties/model.py,sha256=
|
|
8
|
+
dragonfly_doe2/properties/model.py,sha256=7vxx4KgVfXVSPVkZciVQtlmbJQEEdFt9-QzNBun-tXY,14281
|
|
9
9
|
dragonfly_doe2/properties/room2d.py,sha256=ghKKhcX2TSgPUAdcQk-PPHo_5AilSmTiLElxb8--dkE,12773
|
|
10
|
-
dragonfly_doe2-0.12.
|
|
11
|
-
dragonfly_doe2-0.12.
|
|
12
|
-
dragonfly_doe2-0.12.
|
|
13
|
-
dragonfly_doe2-0.12.
|
|
14
|
-
dragonfly_doe2-0.12.
|
|
15
|
-
dragonfly_doe2-0.12.
|
|
10
|
+
dragonfly_doe2-0.12.5.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
11
|
+
dragonfly_doe2-0.12.5.dist-info/METADATA,sha256=4Mwwn_nfeGMul6wOidv6FYcWapSeCCSndfQlVGDSBkE,2690
|
|
12
|
+
dragonfly_doe2-0.12.5.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
|
|
13
|
+
dragonfly_doe2-0.12.5.dist-info/entry_points.txt,sha256=oBzZOsc8Bs40iHKtuyWGrz_nfLZu1-6cHrBej05ZqrY,59
|
|
14
|
+
dragonfly_doe2-0.12.5.dist-info/top_level.txt,sha256=6CLCvUyl1H2vrbXmeA0ND_znFz4a2oOclc7NMBZxR6c,15
|
|
15
|
+
dragonfly_doe2-0.12.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|