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

Cloning of construction types doesn't happen #246

Open
jmarrec opened this issue May 23, 2017 · 1 comment
Open

Cloning of construction types doesn't happen #246

jmarrec opened this issue May 23, 2017 · 1 comment

Comments

@jmarrec
Copy link
Collaborator

jmarrec commented May 23, 2017

https://github.com/NREL/openstudio-standards/blob/master/openstudio-standards/lib/openstudio-standards/standards/Standards.Model.rb#L3419

It doesn't clone it.

If you take a construction set from the OS Library, for eg 90.1-2010 MidriseApartment, the same construction is applied to the ground contract walls, ceiling and floors (and ExteriorFloor)
After applying model.apply_prm_construction_types('90.1-2013'), it just changed the existing one with the latest in the loop (GroundContactWall is last added, #L3500), and not cloning happened

 OS:StandardsInformation:Construction,
   {f84c35d2-f1ea-430e-86a5-40f829e6bf82}, !- Handle
   {ca0b8402-a973-458c-a138-eacbdf3dea5d}, !- Construction Name
-  ExteriorFloor,                          !- Intended Surface Type
-  ,                                       !- Standards Construction Type
+  GroundContactWall,                      !- Intended Surface Type
+  Mass,                                   !- Standards Construction Type
@mdahlhausen
Copy link
Collaborator

Going through old bugs and making notes:

This method deals with assigned standard constructions to surfaces in the PRM. Seems like a fix for PNNL @weilixu @lymereJ .

The method model_apply_prm_construction_types sets standards information for constructions, in case they were not set before.
The method model_apply_standard_constructions goes through each construction for a list of types and assigns the standard values to it.
The issue is that some constructions apply to multiple kinds of surfaces in the model. In this case, the same construction will get edited, and ultimately end up with the values for the last surface type / construction type pair in the loop, regardless if it is appropriate for all surface types. At the extreme, imagine a model with the same construction for all surfaces. In that case, the method will set construction properties for that construction to the last surface type / construction pair, which will impact all surfaces in the model.

The fix is to clone existing constructions to create a new standards construction for each surface type / construction type pair, and then apply it to those constructions.

It would also be nice to use the 90.1-2019 PRM methods as the defaultmodel_apply_prm_construction_types and model_apply_standard_constructions, adding extra arguments if necessary.

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

3 participants