Skip to content

Commit

Permalink
fix(run): Ensure negative numbers of IDs don't halt gbXML export
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Sep 16, 2024
1 parent 35a8911 commit 8a896d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions honeybee_energy/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ def measure_compatible_model_json(
parsed_model.reset_ids()
if use_resource_names:
parsed_model.properties.energy.reset_resource_ids()
if simplify_window_cons: # simpler format that cannot handle certain identifiers
for room in parsed_model.rooms:
if room.story is not None and room.story.startswith('-'):
room.story = 'neg{}'.format(room.story[1:])

# get the dictionary representation of the Model and add auto-calculated properties
model_dict = parsed_model.to_dict(triangulate_sub_faces=triangulate_sub_faces)
Expand Down Expand Up @@ -298,6 +302,8 @@ def trace_compatible_model_json(
ap.display_name = None
for dr in face.apertures:
dr.display_name = None
if room.story is not None and room.story.startswith('-'):
room.story = 'neg{}'.format(room.story[1:])

# remove the HVAC from any Rooms lacking setpoints
rem_msgs = parsed_model.properties.energy.remove_hvac_from_no_setpoints()
Expand Down

0 comments on commit 8a896d6

Please sign in to comment.