-
Notifications
You must be signed in to change notification settings - Fork 197
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
Fix AVMList clone between different models #4065
Conversation
what do you think @jmarrec? |
@@ -60,6 +60,8 @@ class MODEL_API AvailabilityManagerAssignmentList : public ModelObject { | |||
*/ | |||
explicit AvailabilityManagerAssignmentList(const Loop& loop); | |||
|
|||
explicit AvailabilityManagerAssignmentList(const Model& model); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kbenne Can we make it protected/private? Or at least ignore in the bindings... I don't like the fact that this becomes public, as users shouldn't have any business creating orphaned ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. I can do that. note that even if you use AvailabilityManagerAssignmentList(const Loop& loop)
the new AVM is still orphaned. The loop argument is actually only used to set the name of the AVM. This itself should probably be considered a bug.
this->setName(loop.name().get() + " AvailabilityManagerAssignmentList"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose to some extent and to echo #4077 AvailabilityManagerAssignmentList doesn't really have any business having a name in the OSM since the user isn't meant to interact with it... It could be created at FT time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly users will appreciate having nice names in the finished EnergyPlus idf. AVMlist named after the loop it belongs to etc.
…List(Model) protected
CI Results for 7438d0d:
|
close #4033
close #4034
Pull request overview
Please read OpenStudio Pull Requests to better understand the OpenStudio Pull Request protocol.
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)src/openstudio_lib/library/OpenStudioPolicy.xml
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.