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

Function lastFan

src/model/AirLoopHVAC.cpp:1402–1426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1400 }
1401
1402 boost::optional<HVACComponent> lastFan(const std::vector<ModelObject>& comps) {
1403 boost::optional<HVACComponent> result;
1404
1405 auto constantVolumeFans = subsetCastVector<FanConstantVolume>(comps);
1406 if (!constantVolumeFans.empty()) {
1407 result = constantVolumeFans.back();
1408 } else {
1409 auto variableVolumeFans = subsetCastVector<FanVariableVolume>(comps);
1410 if (!variableVolumeFans.empty()) {
1411 result = variableVolumeFans.back();
1412 } else {
1413 auto systemModelFans = subsetCastVector<FanSystemModel>(comps);
1414 if (!systemModelFans.empty()) {
1415 result = systemModelFans.back();
1416 } else {
1417 auto componentModelFans = subsetCastVector<FanComponentModel>(comps);
1418 if (!componentModelFans.empty()) {
1419 result = componentModelFans.back();
1420 }
1421 }
1422 }
1423 }
1424
1425 return result;
1426 }
1427
1428 boost::optional<HVACComponent> AirLoopHVAC_Impl::supplyFan() const {
1429 boost::optional<HVACComponent> result;

Callers 3

supplyFanMethod · 0.85
returnFanMethod · 0.85
reliefFanMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected