| 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(); |
nothing calls this directly
no test coverage detected