Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling model_add_construction_set method for an ASHRAE 90.1-2004 on an empty model results in divide by 0 error #1343

Closed
DavidGoldwasser opened this issue Jul 21, 2022 · 1 comment
Assignees

Comments

@DavidGoldwasser
Copy link
Collaborator

DavidGoldwasser commented Jul 21, 2022

I found this when adding new spec tests to extension gem for space type mapping issue.
NREL/openstudio-extension-gem#149 (comment)

When calling model_add_construction_set for 90.1-2004 it eventually calls model_get_window_area_info and if the model has no geometry, which is often case for space type and construction set wizard, it gets a divide by zero when checking windows.

Log shown below

 ZeroDivisionError:
   divided by 0
 # ./.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.16/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb:2725:in `/'
 # ./.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.16/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb:2725:in `model_get_window_area_info'
 # ./.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.16/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.Model.rb:17:in `model_get_percent_of_surface_range'
 # ./.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.16/lib/openstudio-standards/standards/Standards.Model.rb:2527:in `model_find_and_add_construction'
 # ./.bundle/install/ruby/2.7.0/gems/openstudio-standards-0.2.16/lib/openstudio-standards/standards/Standards.Model.rb:2708:in `model_add_construction_set'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants