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

Method addToNode

src/model/HeatPumpPlantLoopEIRHeating.cpp:176–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174 }
175
176 bool HeatPumpPlantLoopEIRHeating_Impl::addToNode(Node& node) {
177
178 boost::optional<PlantLoop> t_plantLoop = node.plantLoop();
179
180 // If trying to add to a node that is on the demand side of a plant loop
181 if (t_plantLoop) {
182 if (t_plantLoop->demandComponent(node.handle())) {
183 // If there is already a source side water Plant Loop
184 if (boost::optional<PlantLoop> ssLoop = this->sourceSideWaterLoop()) {
185 // And it's not the same as the node's loop
186 if (t_plantLoop.get() != ssLoop.get()) {
187 // And if there is no generator loop (tertiary)
188 if (!this->heatRecoveryLoop().is_initialized()) {
189 // Then try to add it to the tertiary one
190 LOG(Warn, "Calling addToTertiaryNode to connect it to the tertiary (=Heat Recovery Loop) loop for " << briefDescription());
191 return this->addToTertiaryNode(node);
192 }
193 }
194 }
195 }
196 }
197
198 // All other cases, call the base class implementation
199 // call the base class implementation to connect the component
200 bool ok = WaterToWaterComponent_Impl::addToNode(node);
201
202 // If there's a secondary plant loop, switch the condenser type to "WaterSource"
203 if (this->sourceSideWaterLoop()) {
204 this->setCondenserType("WaterSource");
205 }
206 return ok;
207 }
208
209 bool HeatPumpPlantLoopEIRHeating_Impl::addToTertiaryNode(Node& node) {
210

Callers

nothing calls this directly

Calls 8

sourceSideWaterLoopMethod · 0.95
heatRecoveryLoopMethod · 0.95
addToTertiaryNodeMethod · 0.95
setCondenserTypeMethod · 0.95
demandComponentMethod · 0.80
plantLoopMethod · 0.45
handleMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected