-
Notifications
You must be signed in to change notification settings - Fork 195
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 #4544 - CoilCoolingDX::clone crashes when called with another model #4576
base: develop
Are you sure you want to change the base?
Changes from all commits
a329f5e
c19e317
cdcfa0a
78dfcf1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,8 +85,8 @@ namespace model { | |
|
||
std::vector<ModelObject> CoilCoolingDXCurveFitOperatingMode_Impl::children() const { | ||
// These are ResourceObjects, so they shouldn't really be children except for OS App / IG | ||
std::vector<ModelObject> result = subsetCastVector<ModelObject>(speeds()); | ||
|
||
// std::vector<ModelObject> result = subsetCastVector<ModelObject>(speeds()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just remove this line instead of a comment? |
||
std::vector<ModelObject> result; | ||
return result; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,13 +99,13 @@ namespace model { | |
std::vector<ModelObject> result; | ||
|
||
// These are ResourceObjects, so they shouldn't really be children except for OS App / IG | ||
result.push_back(baseOperatingMode()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I rebased the change(s) onto my codebase and rebuild and cause the failure of serveral tests.
Do you mind review the tests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I'm still not sure how to fix it properly. I need to revisit this at some point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I deep dived into the unittests and find the issue is happening in
Which the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have access to Jenkins FYI, so I have access to the failed runs to see the failures. The solution to having both clone to same model and clone to another is not trivial though. I'll eventually get back to this PR, it's a minor bug with a rather expensive solution: one that requires reimplementing or overriding the internals of ResourceObject and ParentObject (getRecursiveResources / getRecursiveChildren) and how things are added at Workspace level (addObjects). That portion of the sdk is complicated and finicky. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If someone is burning to fix this though please go ahead. I think I have a jupyter notebook somewhere where I've rewritten the getRecursiveXXX stuff to be able to test changes, I could try to locate it. |
||
if (auto _mode = alternativeOperatingMode1()) { | ||
result.push_back(_mode.get()); | ||
} | ||
if (auto _mode = alternativeOperatingMode2()) { | ||
result.push_back(_mode.get()); | ||
} | ||
// result.push_back(baseOperatingMode()); | ||
// if (auto _mode = alternativeOperatingMode1()) { | ||
// result.push_back(_mode.get()); | ||
// } | ||
// if (auto _mode = alternativeOperatingMode2()) { | ||
// result.push_back(_mode.get()); | ||
// } | ||
|
||
return result; | ||
} | ||
|
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.
What is the strategy over in the App if performance objects are no longer children? Is there a corresponding change to App to specialize the IG for this type? Or maybe instead it is just ok to not show the performance data? I'm just asking out of curiousity. I agree that the main impact of this PR pertains to the App's inspector.