Closed kbenne closed 6 years ago
@kbenne this seems like it is a bug instead of a feature?
@macumber if that helps get this done then sure. I will agree that there is at least a bug in that a cloned air loop is left in a bad state. Leaving behind some supply components is one thing, but what we have now are cloned air loops that don't even have the required supply / demand inlet / outlet nodes connected up like a new properly constructed air loop will have.
Current tally of people who'd like to see this happen -> https://openstudio.uservoice.com/forums/308629-openstudio/suggestions/13621407-make-airloophvac-clone-work
Also plant_loop.clone would be awesome.
AirLoopHVAC has a clone
method, but it does not clone components, and can also cause segmentation fault errors when you try to, e.g. addBranchForZone to a “cloned” air loop. T
A fully-featured system clone would be really helpful for system libraries.
https://github.com/NREL/OpenStudio/blob/develop/openstudiocore/src/model/AirLoopHVAC.cpp#L575
Migrated from UserVoice
Created a model with three thermal zones, added a "Packaged Rooftop VAV with Reheat" so end up with one air loop hvac, and three plant loop: HW, CHW, and CndW.
Original:
Clone:
Todo:
Central coils should be reconnected to the appropriate PlantLoops Previously it was creating two Sizing:System when cloning, one orphaned
I do realize this issue is explicitly referencing AirLoop::clone
Produces a hard crash after cloning. Only the PlantLoop
, Sizing:Plant
and AvailabilityManagerAssignmentList
. SizingPlant cloned refers to the original loop, not the cloned one.
PlantLoop has many problems: it references the nodes of the original plant, mixer, splitters, spms, etc.
I implemented PlantLoop::clone in #3238 and for AirLoopHVAC Impl I made clone connect the coils to the same plantloop as original ones.
AirLoop::clone needs to follow connections in the supply and demand side and clone those objects foud there and then attach them to the newly cloned AirLoop