| 237 | } |
| 238 | |
| 239 | bool AirLoopHVACReturnPlenum_Impl::addBranchForZoneImpl(openstudio::model::ThermalZone& thermalZone, boost::optional<HVACComponent>& terminal) { |
| 240 | boost::optional<Splitter> splitter; |
| 241 | boost::optional<Mixer> mixer = getObject<AirLoopHVACReturnPlenum>(); |
| 242 | |
| 243 | boost::optional<AirLoopHVAC> t_airLoopHVAC = airLoopHVAC(); |
| 244 | |
| 245 | if (!t_airLoopHVAC) { |
| 246 | return false; |
| 247 | } |
| 248 | |
| 249 | std::vector<ModelObject> supplyPlenums; |
| 250 | supplyPlenums = t_airLoopHVAC->demandComponents(t_airLoopHVAC->demandInletNode(), mixer.get(), AirLoopHVACSupplyPlenum::iddObjectType()); |
| 251 | |
| 252 | if (supplyPlenums.size() == 1u) { |
| 253 | splitter = supplyPlenums.front().cast<Splitter>(); |
| 254 | } else { |
| 255 | splitter = t_airLoopHVAC->zoneSplitter(); |
| 256 | } |
| 257 | |
| 258 | OS_ASSERT(splitter); |
| 259 | OS_ASSERT(mixer); |
| 260 | |
| 261 | return AirLoopHVAC_Impl::addBranchForZoneImpl(thermalZone, t_airLoopHVAC.get(), splitter.get(), mixer.get(), true, terminal); |
| 262 | } |
| 263 | |
| 264 | std::vector<IdfObject> AirLoopHVACReturnPlenum_Impl::remove() { |
| 265 | Model t_model = model(); |
nothing calls this directly
no test coverage detected