| 1185 | } |
| 1186 | |
| 1187 | SizingSystem AirLoopHVAC_Impl::sizingSystem() const { |
| 1188 | boost::optional<SizingSystem> sizingSystem; |
| 1189 | |
| 1190 | std::vector<SizingSystem> sizingObjects; |
| 1191 | |
| 1192 | sizingObjects = getObject<AirLoopHVAC>().getModelObjectSources<SizingSystem>(); |
| 1193 | |
| 1194 | for (const auto& sizingObject : sizingObjects) { |
| 1195 | try { |
| 1196 | if (sizingObject.airLoopHVAC().handle() == this->handle()) { |
| 1197 | sizingSystem = sizingObject; |
| 1198 | } |
| 1199 | } catch (...) { |
| 1200 | LOG(Debug, sizingObject.briefDescription() << " is not attached to an AirLoopHVAC object."); |
| 1201 | } |
| 1202 | } |
| 1203 | |
| 1204 | if (sizingSystem) { |
| 1205 | return sizingSystem.get(); |
| 1206 | } else { |
| 1207 | LOG_AND_THROW(briefDescription() << " missing Sizing:System object."); |
| 1208 | } |
| 1209 | } |
| 1210 | |
| 1211 | std::vector<ThermalZone> AirLoopHVAC_Impl::thermalZones() const { |
| 1212 | std::vector<ModelObject> objects = demandComponents(IddObjectType::OS_ThermalZone); |