dragonfly-doe2 0.12.12__tar.gz → 0.12.14__tar.gz

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 (25) hide show
  1. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/PKG-INFO +1 -1
  2. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2/properties/model.py +26 -8
  3. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2/properties/room2d.py +1 -1
  4. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2.egg-info/PKG-INFO +1 -1
  5. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/CODE_OF_CONDUCT.md +0 -0
  6. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/CONTRIBUTING.md +0 -0
  7. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/LICENSE +0 -0
  8. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/MANIFEST.in +0 -0
  9. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/README.md +0 -0
  10. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dev-requirements.txt +0 -0
  11. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2/__init__.py +0 -0
  12. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2/__main__.py +0 -0
  13. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2/_extend_dragonfly.py +0 -0
  14. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2/cli/__init__.py +0 -0
  15. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2/cli/translate.py +0 -0
  16. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2/properties/__init__.py +0 -0
  17. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2/writer.py +0 -0
  18. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2.egg-info/SOURCES.txt +0 -0
  19. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2.egg-info/dependency_links.txt +0 -0
  20. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2.egg-info/entry_points.txt +0 -0
  21. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2.egg-info/requires.txt +0 -0
  22. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/dragonfly_doe2.egg-info/top_level.txt +0 -0
  23. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/requirements.txt +0 -0
  24. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/setup.cfg +0 -0
  25. {dragonfly_doe2-0.12.12 → dragonfly_doe2-0.12.14}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dragonfly-doe2
3
- Version: 0.12.12
3
+ Version: 0.12.14
4
4
  Summary: Dragonfly extension for the DOE-2 energy simulation engine.
5
5
  Home-page: https://github.com/ladybug-tools/dragonfly-doe2
6
6
  Author: Ladybug Tools
@@ -19,7 +19,7 @@ class ModelDoe2Properties(object):
19
19
  ERROR_MAP = {
20
20
  '030101': 'check_room_2d_floor_plate_vertex_count',
21
21
  '030102': 'check_no_room_2d_floor_plate_holes',
22
- '030103': 'check_no_story_courtyards'
22
+ '030103': 'check_story_floor_plates'
23
23
  }
24
24
 
25
25
  def __init__(self, host):
@@ -72,7 +72,7 @@ class ModelDoe2Properties(object):
72
72
  # perform checks that are specific to DOE-2
73
73
  msgs.append(self.check_room_2d_floor_plate_vertex_count(False, detailed))
74
74
  msgs.append(self.check_no_room_2d_floor_plate_holes(False, detailed))
75
- msgs.append(self.check_no_story_courtyards(tol, False, detailed))
75
+ msgs.append(self.check_story_floor_plates(tol, False, detailed))
76
76
 
77
77
  # output a final report of errors or raise an exception
78
78
  full_msgs = [msg for msg in msgs if msg]
@@ -134,7 +134,7 @@ class ModelDoe2Properties(object):
134
134
  # perform checks for specific doe-2 simulation rules
135
135
  msgs.append(self.check_room_2d_floor_plate_vertex_count(False, detailed))
136
136
  msgs.append(self.check_no_room_2d_floor_plate_holes(False, detailed))
137
- msgs.append(self.check_no_story_courtyards(tol, False, detailed))
137
+ msgs.append(self.check_story_floor_plates(tol, False, detailed))
138
138
  # output a final report of errors or raise an exception
139
139
  full_msgs = [msg for msg in msgs if msg]
140
140
  if detailed:
@@ -207,11 +207,11 @@ class ModelDoe2Properties(object):
207
207
  raise ValueError(full_msg)
208
208
  return full_msg
209
209
 
210
- def check_no_story_courtyards(
210
+ def check_story_floor_plates(
211
211
  self, tolerance=None, raise_exception=True, detailed=False):
212
- """Check that Story floor plates do not contain courtyards.
212
+ """Check Story floor plates for courtyards and that they are less than 120 vertices.
213
213
 
214
- EQuest currently has no way to represent such courtyards so, if the issue
214
+ EQuest currently has no way to represent courtyards so, if the issue
215
215
  is not addressed, the courtyards will simply be removed as part of the
216
216
  process of exporting to an INP file.
217
217
 
@@ -236,8 +236,10 @@ class ModelDoe2Properties(object):
236
236
  for story in bldg.unique_stories:
237
237
  floor_geos = [room.floor_geometry for room in story.room_2ds]
238
238
  joined_geos = _grouped_floor_boundary(floor_geos, tolerance)
239
- c_count = 0
239
+ c_count, vert_len = 0, None
240
240
  for geo in joined_geos:
241
+ if len(geo.boundary) > 120:
242
+ vert_len = len(geo.boundary)
241
243
  if geo.has_holes:
242
244
  for hole in geo.holes:
243
245
  try:
@@ -266,10 +268,26 @@ class ModelDoe2Properties(object):
266
268
  'message': msg
267
269
  }
268
270
  story_msgs.append(msg)
271
+ if vert_len is not None:
272
+ msg = 'Story "{}" has a floor plate with {} vertices, which is more ' \
273
+ 'than the maximum 120 vertices supported by DOE-2.'.format(
274
+ story.display_name, vert_len)
275
+ if detailed:
276
+ msg = {
277
+ 'type': 'ValidationError',
278
+ 'code': '030101',
279
+ 'error_type': 'Floor Plate Exceeds Maximum Vertex Count',
280
+ 'extension_type': 'DOE2',
281
+ 'element_type': 'Room2D',
282
+ 'element_id': [r.identifier for r in story.room_2ds],
283
+ 'element_name': [r.display_name for r in story.room_2ds],
284
+ 'message': msg
285
+ }
286
+ story_msgs.append(msg)
269
287
  if detailed:
270
288
  return story_msgs
271
289
  if story_msgs != []:
272
- msg = 'The following Stories have courtyards in their floor plates' \
290
+ msg = 'The following Stories have issues with their floor plates' \
273
291
  ':\n{}'.format('\n'.join(story_msgs))
274
292
  if raise_exception:
275
293
  raise ValueError(msg)
@@ -143,7 +143,7 @@ class Room2DDoe2Properties(object):
143
143
  raise ValueError(msg)
144
144
  full_msg = self.host._validation_message_child(
145
145
  msg, self.host, detailed, '030101', extension='DOE2',
146
- error_type='Room Exceeds Maximum Vertex Count')
146
+ error_type='Floor Plate Exceeds Maximum Vertex Count')
147
147
  if detailed:
148
148
  return [full_msg]
149
149
  if raise_exception:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dragonfly-doe2
3
- Version: 0.12.12
3
+ Version: 0.12.14
4
4
  Summary: Dragonfly extension for the DOE-2 energy simulation engine.
5
5
  Home-page: https://github.com/ladybug-tools/dragonfly-doe2
6
6
  Author: Ladybug Tools