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

Method containingHVACComponent

src/model/FanComponentModel.cpp:370–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368 }
369
370 boost::optional<HVACComponent> FanComponentModel_Impl::containingHVACComponent() const {
371 auto t_handle = handle();
372
373 // AirLoopHVACUnitarySystem
374 std::vector<AirLoopHVACUnitarySystem> airLoopHVACUnitarySystems = this->model().getConcreteModelObjects<AirLoopHVACUnitarySystem>();
375
376 for (const auto& airLoopHVACUnitarySystem : airLoopHVACUnitarySystems) {
377 if (boost::optional<HVACComponent> fan = airLoopHVACUnitarySystem.supplyFan()) {
378 if (fan->handle() == t_handle) {
379 return airLoopHVACUnitarySystem;
380 }
381 }
382 }
383
384 return boost::none;
385 }
386
387 boost::optional<ZoneHVACComponent> FanComponentModel_Impl::containingZoneHVACComponent() const {
388

Callers

nothing calls this directly

Calls 3

modelMethod · 0.45
supplyFanMethod · 0.45
handleMethod · 0.45

Tested by

no test coverage detected