MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / addToNode

Method addToNode

src/model/ChillerAbsorption.cpp:389–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387 }
388
389 bool ChillerAbsorption_Impl::addToNode(Node& node) {
390
391 boost::optional<PlantLoop> t_plantLoop = node.plantLoop();
392
393 // If trying to add to a node that is on the demand side of a plant loop
394 if (t_plantLoop) {
395 if (t_plantLoop->demandComponent(node.handle())) {
396 // If there is already a condenser water Plant Loop
397 if (boost::optional<PlantLoop> cndLoop = this->condenserWaterLoop()) {
398 // And it's not the same as the node's loop
399 if (t_plantLoop.get() != cndLoop.get()) {
400 // And if there is no generator loop (tertiary)
401 if (!this->generatorLoop().is_initialized()) {
402 // Then try to add it to the tertiary one
403 LOG(Warn, "Calling addToTertiaryNode to connect it to the tertiary (=Generator Loop) loop for " << briefDescription());
404 return this->addToTertiaryNode(node);
405 }
406 }
407 }
408 }
409 }
410
411 // All other cases, call the base class implementation
412 return WaterToWaterComponent_Impl::addToNode(node);
413 }
414
415 bool ChillerAbsorption_Impl::addToTertiaryNode(Node& node) {
416 auto _model = node.model();

Callers

nothing calls this directly

Calls 7

condenserWaterLoopMethod · 0.95
generatorLoopMethod · 0.95
addToTertiaryNodeMethod · 0.95
demandComponentMethod · 0.80
plantLoopMethod · 0.45
handleMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected