| 94 | } |
| 95 | |
| 96 | boost::optional<PlantLoop> HVACComponent_Impl::plantLoop() const { |
| 97 | if (m_plantLoop) { |
| 98 | return m_plantLoop; |
| 99 | } else { |
| 100 | std::vector<PlantLoop> plantLoops = this->model().getConcreteModelObjects<PlantLoop>(); |
| 101 | |
| 102 | for (auto& plantLoop : plantLoops) { |
| 103 | if (plantLoop.component(this->handle())) { |
| 104 | m_plantLoop = plantLoop; |
| 105 | return plantLoop; |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | return boost::none; |
| 111 | } |
| 112 | |
| 113 | bool HVACComponent_Impl::removeFromLoop(const HVACComponent& systemStartComponent, const HVACComponent& systemEndComponent, |
| 114 | unsigned componentInletPort, unsigned componentOutletPort) { |