src/energyplus/ForwardTranslator/ForwardTranslateAirLoopHVAC.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "../ForwardTranslator.hpp" | ||
| 7 | #include "../../model/Model.hpp" | ||
| 8 | #include "../../model/AirLoopHVAC.hpp" | ||
| 9 | #include "../../model/AirLoopHVAC_Impl.hpp" | ||
| 10 | |||
| 11 | #include "../../model/AvailabilityManagerAssignmentList.hpp" | ||
| 12 | #include "../../model/AvailabilityManagerAssignmentList_Impl.hpp" | ||
| 13 | #include "../../model/AvailabilityManager.hpp" | ||
| 14 | #include "../../model/AvailabilityManager_Impl.hpp" | ||
| 15 | #include "../../model/AvailabilityManagerHybridVentilation.hpp" | ||
| 16 | #include "../../model/AvailabilityManagerHybridVentilation_Impl.hpp" | ||
| 17 | #include "../../model/SizingSystem.hpp" | ||
| 18 | #include "../../model/SizingSystem_Impl.hpp" | ||
| 19 | #include "../../model/CoilCoolingWater.hpp" | ||
| 20 | #include "../../model/CoilCoolingWater_Impl.hpp" | ||
| 21 | #include "../../model/CoilSystemCoolingWater.hpp" | ||
| 22 | #include "../../model/CoilSystemCoolingWater_Impl.hpp" | ||
| 23 | #include "../../model/CoilSystemCoolingWaterHeatExchangerAssisted.hpp" | ||
| 24 | #include "../../model/CoilSystemCoolingWaterHeatExchangerAssisted_Impl.hpp" | ||
| 25 | #include "../../model/CoilHeatingWater.hpp" | ||
| 26 | #include "../../model/CoilHeatingWater_Impl.hpp" | ||
| 27 | #include "../../model/ControllerWaterCoil.hpp" | ||
| 28 | #include "../../model/ControllerWaterCoil_Impl.hpp" | ||
| 29 | #include "../../model/AirLoopHVACZoneSplitter.hpp" | ||
| 30 | #include "../../model/AirLoopHVACZoneSplitter_Impl.hpp" | ||
| 31 | #include "../../model/AirLoopHVACZoneMixer.hpp" | ||
| 32 | #include "../../model/AirLoopHVACZoneMixer_Impl.hpp" | ||
| 33 | #include "../../model/AirLoopHVACOutdoorAirSystem.hpp" | ||
| 34 | #include "../../model/AirLoopHVACOutdoorAirSystem_Impl.hpp" | ||
| 35 | #include "../../model/Node.hpp" | ||
| 36 | #include "../../model/Node_Impl.hpp" | ||
| 37 | #include "../../model/Schedule.hpp" | ||
| 38 | #include "../../model/Schedule_Impl.hpp" | ||
| 39 | #include "../../model/ScheduleCompact.hpp" | ||
| 40 | #include "../../model/ScheduleCompact_Impl.hpp" | ||
| 41 | #include "../../model/SetpointManager.hpp" | ||
| 42 | #include "../../model/SetpointManager_Impl.hpp" | ||
| 43 | #include "../../model/SetpointManagerMixedAir.hpp" | ||
| 44 | #include "../../model/StraightComponent.hpp" | ||
| 45 | #include "../../model/StraightComponent_Impl.hpp" | ||
| 46 | #include "../../model/WaterToAirComponent.hpp" | ||
| 47 | #include "../../model/WaterToAirComponent_Impl.hpp" | ||
| 48 | #include "../../model/ThermalZone.hpp" | ||
| 49 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 50 | #include "../../model/FanConstantVolume.hpp" | ||
| 51 | #include "../../model/FanConstantVolume_Impl.hpp" | ||
| 52 | #include "../../model/FanVariableVolume.hpp" | ||
| 53 | #include "../../model/FanVariableVolume_Impl.hpp" | ||
| 54 | #include "../../model/LifeCycleCost.hpp" | ||
| 55 | #include "../../model/AirLoopHVACUnitarySystem.hpp" | ||
| 56 | #include "../../model/AirLoopHVACUnitarySystem_Impl.hpp" | ||
| 57 | #include "../../model/AirLoopHVACUnitaryHeatPumpAirToAir.hpp" | ||
| 58 | #include "../../model/AirLoopHVACUnitaryHeatPumpAirToAir_Impl.hpp" | ||
| 59 | #include "../../model/AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.hpp" | ||
| 60 | #include "../../model/AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed_Impl.hpp" | ||
| 61 | #include "../../model/AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass.hpp" | ||
| 62 | #include "../../model/AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass_Impl.hpp" | ||
| 63 | #include "../../model/ZoneHVACTerminalUnitVariableRefrigerantFlow.hpp" | ||
| 64 | #include "../../model/ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl.hpp" | ||
| 65 | |||
| 66 | #include "../../utilities/idf/IdfExtensibleGroup.hpp" | ||
| 67 | #include <utilities/idd/AirLoopHVAC_FieldEnums.hxx> | ||
| 68 | #include <utilities/idd/AirLoopHVAC_ControllerList_FieldEnums.hxx> | ||
| 69 | #include <utilities/idd/AirLoopHVAC_OutdoorAirSystem_FieldEnums.hxx> | ||
| 70 | #include <utilities/idd/AirLoopHVAC_SupplyPath_FieldEnums.hxx> | ||
| 71 | #include <utilities/idd/AirLoopHVAC_ReturnPath_FieldEnums.hxx> | ||
| 72 | #include <utilities/idd/AvailabilityManagerAssignmentList_FieldEnums.hxx> | ||
| 73 | #include <utilities/idd/AvailabilityManager_Scheduled_FieldEnums.hxx> | ||
| 74 | #include <utilities/idd/AvailabilityManager_NightCycle_FieldEnums.hxx> | ||
| 75 | #include <utilities/idd/BranchList_FieldEnums.hxx> | ||
| 76 | #include <utilities/idd/NodeList_FieldEnums.hxx> | ||
| 77 | #include <utilities/idd/Branch_FieldEnums.hxx> | ||
| 78 | #include <utilities/idd/Schedule_Compact_FieldEnums.hxx> | ||
| 79 | #include <utilities/idd/SetpointManager_ReturnAirBypassFlow_FieldEnums.hxx> | ||
| 80 | #include <utilities/idd/Sizing_System_FieldEnums.hxx> | ||
| 81 | #include <utilities/idd/ConnectorList_FieldEnums.hxx> | ||
| 82 | #include <utilities/idd/Connector_Splitter_FieldEnums.hxx> | ||
| 83 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 84 | #include <utilities/idd/IddEnums.hxx> | ||
| 85 | #include <utilities/idd/IddFactory.hxx> | ||
| 86 | #include "../../utilities/core/Containers.hpp" | ||
| 87 | |||
| 88 | using namespace openstudio::model; | ||
| 89 | |||
| 90 | using namespace std; | ||
| 91 | |||
| 92 | namespace openstudio { | ||
| 93 | |||
| 94 | namespace energyplus { | ||
| 95 | |||
| 96 | // Attempt to add all required setpoint managers upstream of the supply outlet node. | ||
| 97 | // This algorithm requires there to be a setpoint manager on the supply outlet node. | ||
| 98 | // This is a good method to consider adding to Model, as a method of AirLoopHVAC class. | ||
| 99 | 200 | void addRequiredSetpointManagers(const AirLoopHVAC& airLoopHVAC) { | |
| 100 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
200 | std::vector<SetpointManager> _supplyOutletSetpointManagers = airLoopHVAC.supplyOutletNode().setpointManagers(); |
| 101 |
2/2✓ Branch 1 taken 42 times.
✓ Branch 2 taken 158 times.
|
200 | if (!_supplyOutletSetpointManagers.empty()) { |
| 102 |
1/1✓ Branch 1 taken 42 times.
|
42 | auto t_model = airLoopHVAC.model(); |
| 103 |
3/3✓ Branch 1 taken 42 times.
✓ Branch 4 taken 42 times.
✓ Branch 7 taken 42 times.
|
84 | auto supplyComponents = airLoopHVAC.supplyComponents(); |
| 104 | |||
| 105 |
1/1✓ Branch 1 taken 42 times.
|
42 | auto fanOrUnitary = airLoopHVAC.supplyFan(); |
| 106 | |||
| 107 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 2 taken 38 times.
|
42 | if (!fanOrUnitary) { |
| 108 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto airLoopHVACUnitarySystems = subsetCastVector<AirLoopHVACUnitarySystem>(supplyComponents); |
| 109 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
|
4 | if (!airLoopHVACUnitarySystems.empty()) { |
| 110 | ✗ | auto unitary = airLoopHVACUnitarySystems.back(); | |
| 111 | ✗ | if (unitary.supplyFan()) { | |
| 112 | ✗ | fanOrUnitary = unitary; | |
| 113 | } | ||
| 114 | ✗ | } | |
| 115 | 4 | } | |
| 116 | |||
| 117 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 2 taken 38 times.
|
42 | if (!fanOrUnitary) { |
| 118 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto airLoopHVACUnitaryHeatCoolVAVChangeoverBypass = subsetCastVector<AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass>(supplyComponents); |
| 119 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
|
4 | if (!airLoopHVACUnitaryHeatCoolVAVChangeoverBypass.empty()) { |
| 120 | ✗ | fanOrUnitary = airLoopHVACUnitaryHeatCoolVAVChangeoverBypass.back(); | |
| 121 | } | ||
| 122 | 4 | } | |
| 123 | |||
| 124 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 2 taken 38 times.
|
42 | if (!fanOrUnitary) { |
| 125 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto airLoopHVACUnitaryHeatPumpAirToAir = subsetCastVector<AirLoopHVACUnitaryHeatPumpAirToAir>(supplyComponents); |
| 126 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
|
4 | if (!airLoopHVACUnitaryHeatPumpAirToAir.empty()) { |
| 127 | ✗ | fanOrUnitary = airLoopHVACUnitaryHeatPumpAirToAir.back(); | |
| 128 | } | ||
| 129 | 4 | } | |
| 130 | |||
| 131 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 2 taken 38 times.
|
42 | if (!fanOrUnitary) { |
| 132 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto airLoopHVACUnitaryHeatPumpAirToAirMultiSpeed = subsetCastVector<AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed>(supplyComponents); |
| 133 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
|
4 | if (!airLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.empty()) { |
| 134 | ✗ | fanOrUnitary = airLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.back(); | |
| 135 | } | ||
| 136 | 4 | } | |
| 137 | |||
| 138 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 2 taken 38 times.
|
42 | if (!fanOrUnitary) { |
| 139 |
1/1✓ Branch 1 taken 4 times.
|
4 | auto zoneHVACTerminalUnitVariableRefrigerantFlow = subsetCastVector<ZoneHVACTerminalUnitVariableRefrigerantFlow>(supplyComponents); |
| 140 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 2 taken 3 times.
|
4 | if (!zoneHVACTerminalUnitVariableRefrigerantFlow.empty()) { |
| 141 |
1/1✓ Branch 2 taken 1 time.
|
1 | fanOrUnitary = zoneHVACTerminalUnitVariableRefrigerantFlow.back(); |
| 142 | } | ||
| 143 | 4 | } | |
| 144 | |||
| 145 | 42 | std::vector<Node> upperNodes; | |
| 146 | 42 | std::vector<Node> lowerNodes; | |
| 147 |
2/2✓ Branch 0 taken 39 times.
✓ Branch 1 taken 3 times.
|
42 | if (fanOrUnitary) { |
| 148 |
6/6✓ Branch 1 taken 39 times.
✓ Branch 4 taken 39 times.
✓ Branch 7 taken 39 times.
✓ Branch 10 taken 39 times.
✓ Branch 13 taken 39 times.
✓ Branch 16 taken 39 times.
|
78 | upperNodes = subsetCastVector<Node>(airLoopHVAC.supplyComponents(airLoopHVAC.supplyInletNode(), fanOrUnitary.get())); |
| 149 |
1/1✓ Branch 3 taken 39 times.
|
39 | upperNodes.erase(upperNodes.begin()); |
| 150 |
6/6✓ Branch 1 taken 39 times.
✓ Branch 4 taken 39 times.
✓ Branch 7 taken 39 times.
✓ Branch 10 taken 39 times.
✓ Branch 13 taken 39 times.
✓ Branch 16 taken 39 times.
|
78 | lowerNodes = subsetCastVector<Node>(airLoopHVAC.supplyComponents(fanOrUnitary.get(), airLoopHVAC.supplyOutletNode())); |
| 151 |
1/1✓ Branch 4 taken 39 times.
|
39 | lowerNodes.erase(lowerNodes.end() - 1); |
| 152 | } else { | ||
| 153 | // Note if we don't have a fan this is going to be a problem for EnergyPlus, | ||
| 154 | // but at this point it will be allowed in OS | ||
| 155 |
1/1✓ Branch 1 taken 3 times.
|
3 | lowerNodes = subsetCastVector<Node>(supplyComponents); |
| 156 | // We should at least have a supply inlet and outlet node | ||
| 157 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
|
3 | OS_ASSERT(lowerNodes.size() >= 2); |
| 158 |
1/1✓ Branch 3 taken 3 times.
|
3 | lowerNodes.erase(lowerNodes.begin()); |
| 159 |
1/1✓ Branch 4 taken 3 times.
|
3 | lowerNodes.erase(lowerNodes.end() - 1); |
| 160 | } | ||
| 161 | |||
| 162 |
3/3✓ Branch 1 taken 124 times.
✓ Branch 4 taken 124 times.
✓ Branch 7 taken 124 times.
|
372 | auto isTemperatureControl = [](const SetpointManager& spm) -> bool { return istringEqual("Temperature", spm.controlVariable()); }; |
| 163 | |||
| 164 |
2/2✓ Branch 5 taken 93 times.
✓ Branch 6 taken 42 times.
|
135 | for (auto& upperNode : upperNodes) { |
| 165 |
1/1✓ Branch 1 taken 93 times.
|
93 | std::vector<SetpointManager> _setpointManagers = upperNode.setpointManagers(); |
| 166 |
3/3✓ Branch 4 taken 93 times.
✓ Branch 7 taken 18 times.
✓ Branch 8 taken 75 times.
|
93 | if (std::find_if(_setpointManagers.begin(), _setpointManagers.end(), isTemperatureControl) == _setpointManagers.end()) { |
| 167 |
1/1✓ Branch 1 taken 18 times.
|
18 | SetpointManagerMixedAir spm(t_model); |
| 168 |
1/1✓ Branch 1 taken 18 times.
|
18 | spm.addToNode(upperNode); |
| 169 |
4/4✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✓ Branch 7 taken 18 times.
✓ Branch 10 taken 18 times.
|
18 | spm.setName(upperNode.name().get() + " OS Default SPM"); |
| 170 | 18 | } | |
| 171 | 93 | } | |
| 172 | |||
| 173 |
2/2✓ Branch 5 taken 23 times.
✓ Branch 6 taken 42 times.
|
65 | for (auto& lowerNode : lowerNodes) { |
| 174 |
1/1✓ Branch 1 taken 23 times.
|
23 | std::vector<SetpointManager> _setpointManagers = lowerNode.setpointManagers(); |
| 175 |
2/3✓ Branch 4 taken 23 times.
✓ Branch 7 taken 23 times.
✗ Branch 8 not taken.
|
23 | if (std::find_if(_setpointManagers.begin(), _setpointManagers.end(), isTemperatureControl) == _setpointManagers.end()) { |
| 176 |
2/2✓ Branch 5 taken 24 times.
✓ Branch 6 taken 23 times.
|
47 | for (const auto& _setpointManager : _supplyOutletSetpointManagers) { |
| 177 |
3/3✓ Branch 1 taken 24 times.
✓ Branch 3 taken 23 times.
✓ Branch 4 taken 1 time.
|
24 | if (isTemperatureControl(_setpointManager)) { |
| 178 |
3/3✓ Branch 1 taken 23 times.
✓ Branch 4 taken 23 times.
✓ Branch 7 taken 23 times.
|
23 | auto spmClone = _setpointManager.clone(t_model).cast<SetpointManager>(); |
| 179 |
1/1✓ Branch 1 taken 23 times.
|
23 | spmClone.addToNode(lowerNode); |
| 180 |
4/4✓ Branch 1 taken 23 times.
✓ Branch 4 taken 23 times.
✓ Branch 7 taken 23 times.
✓ Branch 10 taken 23 times.
|
23 | spmClone.setName(lowerNode.name().get() + " OS Default SPM"); |
| 181 | 23 | } | |
| 182 | } | ||
| 183 | } | ||
| 184 | 23 | } | |
| 185 | |||
| 186 |
3/3✓ Branch 1 taken 42 times.
✓ Branch 3 taken 39 times.
✓ Branch 4 taken 3 times.
|
84 | if (boost::optional<AirLoopHVACOutdoorAirSystem> oaSystem = airLoopHVAC.airLoopHVACOutdoorAirSystem()) { |
| 187 |
2/2✓ Branch 1 taken 39 times.
✓ Branch 4 taken 39 times.
|
39 | boost::optional<Node> outboardOANode = oaSystem->outboardOANode(); |
| 188 |
5/5✓ Branch 1 taken 39 times.
✓ Branch 4 taken 39 times.
✓ Branch 7 taken 39 times.
✓ Branch 10 taken 39 times.
✓ Branch 13 taken 39 times.
|
117 | std::vector<Node> oaNodes = subsetCastVector<Node>(oaSystem->oaComponents()); |
| 189 |
1/2✓ Branch 0 taken 39 times.
✗ Branch 1 not taken.
|
39 | if (outboardOANode) { |
| 190 |
2/2✓ Branch 5 taken 67 times.
✓ Branch 6 taken 39 times.
|
106 | for (auto& oaNode : oaNodes) { |
| 191 |
4/4✓ Branch 1 taken 67 times.
✓ Branch 4 taken 67 times.
✓ Branch 6 taken 28 times.
✓ Branch 7 taken 39 times.
|
67 | if (oaNode != outboardOANode.get()) { |
| 192 |
1/1✓ Branch 1 taken 28 times.
|
28 | std::vector<SetpointManager> _setpointManagers = oaNode.setpointManagers(); |
| 193 |
3/3✓ Branch 4 taken 28 times.
✓ Branch 7 taken 3 times.
✓ Branch 8 taken 25 times.
|
28 | if (std::find_if(_setpointManagers.begin(), _setpointManagers.end(), isTemperatureControl) == _setpointManagers.end()) { |
| 194 |
1/1✓ Branch 1 taken 3 times.
|
3 | SetpointManagerMixedAir spm(t_model); |
| 195 |
1/1✓ Branch 1 taken 3 times.
|
3 | spm.addToNode(oaNode); |
| 196 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | spm.setName(oaNode.name().get() + " OS Default SPM"); |
| 197 | 3 | } | |
| 198 | 28 | } | |
| 199 | } | ||
| 200 | } | ||
| 201 | 81 | } | |
| 202 | 42 | } | |
| 203 | 200 | } | |
| 204 | |||
| 205 | 200 | boost::optional<IdfObject> ForwardTranslator::translateAirLoopHVAC(AirLoopHVAC& airLoopHVAC) { | |
| 206 |
1/1✓ Branch 1 taken 200 times.
|
200 | Model t_model = airLoopHVAC.model(); |
| 207 | |||
| 208 |
1/1✓ Branch 1 taken 200 times.
|
200 | addRequiredSetpointManagers(airLoopHVAC); |
| 209 | |||
| 210 | // Create a new IddObjectType::AirLoopHVAC | ||
| 211 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
200 | IdfObject idfObject(IddObjectType::AirLoopHVAC); |
| 212 |
1/1✓ Branch 1 taken 200 times.
|
200 | m_idfObjects.push_back(idfObject); |
| 213 | |||
| 214 |
2/4✓ Branch 1 taken 200 times.
✗ Branch 7 not taken.
✗ Branch 11 not taken.
✓ Branch 12 taken 200 times.
|
200 | for (LifeCycleCost lifeCycleCost : airLoopHVAC.lifeCycleCosts()) { |
| 215 | ✗ | translateAndMapModelObject(lifeCycleCost); | |
| 216 | 200 | } | |
| 217 | |||
| 218 | 200 | OptionalModelObject temp; | |
| 219 | 200 | OptionalString optS; | |
| 220 | 200 | boost::optional<double> val; | |
| 221 | 200 | boost::optional<IdfObject> nightCycleIdf; | |
| 222 | 200 | std::string s; | |
| 223 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
✓ Branch 7 taken 200 times.
|
200 | std::string airLoopHVACName = airLoopHVAC.name().get(); |
| 224 | |||
| 225 | // Name | ||
| 226 |
1/1✓ Branch 1 taken 200 times.
|
200 | idfObject.setName(airLoopHVACName); |
| 227 | |||
| 228 | // Supply Side Inlet Node Name | ||
| 229 |
4/4✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
✓ Branch 7 taken 200 times.
✓ Branch 10 taken 200 times.
|
200 | idfObject.setString(openstudio::AirLoopHVACFields::SupplySideInletNodeName, airLoopHVAC.supplyInletNode().name().get()); |
| 230 | |||
| 231 | // Supply Side Outlet Node Names | ||
| 232 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
200 | IdfObject supplyOutletNodeList(IddObjectType::NodeList); |
| 233 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
200 | supplyOutletNodeList.setName(airLoopHVACName + " Supply Outlet Nodes"); |
| 234 |
1/1✓ Branch 1 taken 200 times.
|
200 | m_idfObjects.push_back(supplyOutletNodeList); |
| 235 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
✓ Branch 7 taken 200 times.
|
200 | idfObject.setString(openstudio::AirLoopHVACFields::SupplySideOutletNodeNames, supplyOutletNodeList.name().get()); |
| 236 | |||
| 237 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 8 taken 205 times.
✓ Branch 9 taken 200 times.
|
405 | for (const auto& node : airLoopHVAC.supplyOutletNodes()) { |
| 238 |
1/1✓ Branch 1 taken 205 times.
|
205 | auto eg = supplyOutletNodeList.pushExtensibleGroup(); |
| 239 |
3/3✓ Branch 1 taken 205 times.
✓ Branch 4 taken 205 times.
✓ Branch 7 taken 205 times.
|
205 | eg.setString(NodeListExtensibleFields::NodeName, node.name().get()); |
| 240 | 405 | } | |
| 241 | |||
| 242 | // Demand Side Inlet Node Names | ||
| 243 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
200 | IdfObject demandInletNodeList(IddObjectType::NodeList); |
| 244 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
200 | demandInletNodeList.setName(airLoopHVACName + " Demand Inlet Nodes"); |
| 245 |
1/1✓ Branch 1 taken 200 times.
|
200 | m_idfObjects.push_back(demandInletNodeList); |
| 246 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
✓ Branch 7 taken 200 times.
|
200 | idfObject.setString(openstudio::AirLoopHVACFields::DemandSideInletNodeNames, demandInletNodeList.name().get()); |
| 247 | |||
| 248 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 8 taken 205 times.
✓ Branch 9 taken 200 times.
|
405 | for (const auto& node : airLoopHVAC.demandInletNodes()) { |
| 249 |
1/1✓ Branch 1 taken 205 times.
|
205 | auto eg = demandInletNodeList.pushExtensibleGroup(); |
| 250 |
3/3✓ Branch 1 taken 205 times.
✓ Branch 4 taken 205 times.
✓ Branch 7 taken 205 times.
|
205 | eg.setString(NodeListExtensibleFields::NodeName, node.name().get()); |
| 251 | 405 | } | |
| 252 | |||
| 253 | // Demand Side Outlet Node Name | ||
| 254 |
4/4✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
✓ Branch 7 taken 200 times.
✓ Branch 10 taken 200 times.
|
200 | idfObject.setString(openstudio::AirLoopHVACFields::DemandSideOutletNodeName, airLoopHVAC.demandOutletNode().name().get()); |
| 255 | |||
| 256 | // Always On Schedule | ||
| 257 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
200 | Schedule alwaysOn = airLoopHVAC.model().alwaysOnDiscreteSchedule(); |
| 258 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
✓ Branch 7 taken 200 times.
|
200 | IdfObject alwaysOnIdf = translateAndMapModelObject(alwaysOn).get(); |
| 259 | |||
| 260 | // Sizing System | ||
| 261 |
1/1✓ Branch 1 taken 200 times.
|
200 | SizingSystem sizingSystem = airLoopHVAC.sizingSystem(); |
| 262 |
1/1✓ Branch 1 taken 200 times.
|
200 | translateAndMapModelObject(sizingSystem); |
| 263 | |||
| 264 | // Controllers | ||
| 265 | 200 | std::vector<ModelObject> controllers; | |
| 266 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
✓ Branch 7 taken 200 times.
|
400 | auto supplyComponents = airLoopHVAC.supplyComponents(); |
| 267 | |||
| 268 |
2/2✓ Branch 5 taken 815 times.
✓ Branch 6 taken 200 times.
|
1015 | for (const auto& supplyComponent : supplyComponents) { |
| 269 | 815 | boost::optional<ControllerWaterCoil> controller; | |
| 270 | |||
| 271 |
6/7✓ Branch 1 taken 815 times.
✓ Branch 4 taken 815 times.
✓ Branch 7 taken 815 times.
✓ Branch 10 taken 1 time.
✗ Branch 11 not taken.
✓ Branch 12 taken 2 times.
✓ Branch 13 taken 812 times.
|
815 | switch (supplyComponent.iddObject().type().value()) { |
| 272 | 1 | case openstudio::IddObjectType::OS_Coil_Cooling_Water: { | |
| 273 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | controller = supplyComponent.cast<CoilCoolingWater>().controllerWaterCoil(); |
| 274 | 1 | break; | |
| 275 | } | ||
| 276 | ✗ | case openstudio::IddObjectType::OS_Coil_Heating_Water: { | |
| 277 | ✗ | controller = supplyComponent.cast<CoilHeatingWater>().controllerWaterCoil(); | |
| 278 | ✗ | break; | |
| 279 | } | ||
| 280 | 2 | case openstudio::IddObjectType::OS_CoilSystem_Cooling_Water_HeatExchangerAssisted: { | |
| 281 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | auto coolingCoil = supplyComponent.cast<CoilSystemCoolingWaterHeatExchangerAssisted>().coolingCoil(); |
| 282 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | if (auto coilCoolingWater = coolingCoil.optionalCast<CoilCoolingWater>()) { |
| 283 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | controller = coilCoolingWater->controllerWaterCoil(); |
| 284 | 2 | } | |
| 285 | 2 | break; | |
| 286 | 2 | } | |
| 287 | // case openstudio::IddObjectType::OS_CoilSystem_Cooling_Water: { | ||
| 288 | // // No-op: this has its own controller | ||
| 289 | // break; | ||
| 290 | // } | ||
| 291 | 812 | default: { | |
| 292 | 812 | break; | |
| 293 | } | ||
| 294 | } | ||
| 295 | |||
| 296 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 812 times.
|
815 | if (controller) { |
| 297 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | controllers.push_back(controller.get()); |
| 298 | } | ||
| 299 | 815 | } | |
| 300 | |||
| 301 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 2 taken 197 times.
|
200 | if (!controllers.empty()) { |
| 302 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | IdfObject _controllerList(IddObjectType::AirLoopHVAC_ControllerList); |
| 303 |
1/1✓ Branch 1 taken 3 times.
|
3 | _controllerList.clearExtensibleGroups(); |
| 304 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | _controllerList.setName(airLoopHVAC.name().get() + " Controllers"); |
| 305 |
1/1✓ Branch 1 taken 3 times.
|
3 | m_idfObjects.push_back(_controllerList); |
| 306 | |||
| 307 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
3 | idfObject.setString(AirLoopHVACFields::ControllerListName, _controllerList.name().get()); |
| 308 | |||
| 309 | 3 | int i = 1; | |
| 310 | |||
| 311 |
2/2✓ Branch 5 taken 3 times.
✓ Branch 6 taken 3 times.
|
6 | for (auto& elem : controllers) { |
| 312 |
1/1✓ Branch 1 taken 3 times.
|
3 | boost::optional<IdfObject> _controller = translateAndMapModelObject(elem); |
| 313 | |||
| 314 |
1/2✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
|
3 | if (_controller) { |
| 315 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | _controllerList.setString(i, _controller->iddObject().name()); |
| 316 |
4/4✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
|
3 | _controllerList.setString(i + 1, _controller->name().get()); |
| 317 | |||
| 318 | 3 | i++; | |
| 319 | 3 | i++; | |
| 320 | } | ||
| 321 | 3 | } | |
| 322 | 3 | } | |
| 323 | |||
| 324 | // AvailabilityManagerAssignmentList | ||
| 325 | { | ||
| 326 | // The AvailabilityManagerAssignment list is translated by itself, we just need to set its name on the right IDF field | ||
| 327 | AvailabilityManagerAssignmentList avmList = | ||
| 328 |
1/1✓ Branch 3 taken 200 times.
|
200 | airLoopHVAC.getImpl<openstudio::model::detail::AirLoopHVAC_Impl>()->availabilityManagerAssignmentList(); |
| 329 | |||
| 330 | // If the avmList isn't empty of just with an HybridVentilation, it should have been translated | ||
| 331 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 3 taken 6 times.
✓ Branch 4 taken 194 times.
|
400 | if (boost::optional<IdfObject> _avmList = this->translateAndMapModelObject(avmList)) { |
| 332 |
4/4✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 10 taken 6 times.
|
6 | idfObject.setString(AirLoopHVACFields::AvailabilityManagerListName, _avmList->name().get()); |
| 333 | } | ||
| 334 | // Otherwise, we default to the old behavior | ||
| 335 | else { | ||
| 336 |
2/2✓ Branch 1 taken 194 times.
✓ Branch 4 taken 194 times.
|
194 | IdfObject availabilityManagerAssignmentListIdf(openstudio::IddObjectType::AvailabilityManagerAssignmentList); |
| 337 |
2/2✓ Branch 1 taken 194 times.
✓ Branch 4 taken 194 times.
|
194 | availabilityManagerAssignmentListIdf.setName(airLoopHVACName + "Availability Manager List"); |
| 338 |
1/1✓ Branch 1 taken 194 times.
|
194 | m_idfObjects.push_back(availabilityManagerAssignmentListIdf); |
| 339 | |||
| 340 |
3/3✓ Branch 1 taken 194 times.
✓ Branch 4 taken 194 times.
✓ Branch 7 taken 194 times.
|
194 | idfObject.setString(openstudio::AirLoopHVACFields::AvailabilityManagerListName, availabilityManagerAssignmentListIdf.name().get()); |
| 341 | |||
| 342 |
2/2✓ Branch 1 taken 194 times.
✓ Branch 4 taken 194 times.
|
194 | IdfObject idf(IddObjectType::AvailabilityManager_Scheduled); |
| 343 |
2/2✓ Branch 1 taken 194 times.
✓ Branch 4 taken 194 times.
|
194 | idf.setName(airLoopHVACName + " Availability Manager"); |
| 344 |
1/1✓ Branch 1 taken 194 times.
|
194 | m_idfObjects.push_back(idf); |
| 345 | |||
| 346 |
4/4✓ Branch 1 taken 194 times.
✓ Branch 4 taken 194 times.
✓ Branch 7 taken 194 times.
✓ Branch 10 taken 194 times.
|
194 | idf.setString(openstudio::AvailabilityManager_ScheduledFields::ScheduleName, airLoopHVAC.availabilitySchedule().name().get()); |
| 347 | |||
| 348 |
1/1✓ Branch 1 taken 194 times.
|
194 | auto eg = availabilityManagerAssignmentListIdf.pushExtensibleGroup(); |
| 349 |
3/3✓ Branch 1 taken 194 times.
✓ Branch 4 taken 194 times.
✓ Branch 7 taken 194 times.
|
194 | eg.setString(AvailabilityManagerAssignmentListExtensibleFields::AvailabilityManagerObjectType, idf.iddObject().name()); |
| 350 |
3/3✓ Branch 1 taken 194 times.
✓ Branch 4 taken 194 times.
✓ Branch 7 taken 194 times.
|
194 | eg.setString(AvailabilityManagerAssignmentListExtensibleFields::AvailabilityManagerName, idf.name().get()); |
| 351 | 394 | } | |
| 352 | 200 | } | |
| 353 | |||
| 354 | // Design Supply Air Flow Rate | ||
| 355 |
2/3✓ Branch 1 taken 200 times.
✓ Branch 3 taken 200 times.
✗ Branch 4 not taken.
|
200 | if (airLoopHVAC.isDesignSupplyAirFlowRateAutosized()) { |
| 356 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
400 | idfObject.setString(openstudio::AirLoopHVACFields::DesignSupplyAirFlowRate, "AutoSize"); |
| 357 | ✗ | } else if ((val = airLoopHVAC.designSupplyAirFlowRate())) { | |
| 358 | ✗ | idfObject.setDouble(openstudio::AirLoopHVACFields::DesignSupplyAirFlowRate, val.get()); | |
| 359 | } | ||
| 360 | |||
| 361 | // Design Return Air Flow Fraction of Supply Air Flow | ||
| 362 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
200 | idfObject.setDouble(openstudio::AirLoopHVACFields::DesignReturnAirFlowFractionofSupplyAirFlow, |
| 363 | airLoopHVAC.designReturnAirFlowFractionofSupplyAirFlow()); | ||
| 364 | |||
| 365 | // Branch List Name | ||
| 366 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
400 | IdfObject branchList(openstudio::IddObjectType::BranchList); |
| 367 |
2/2✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
|
200 | branchList.setName(airLoopHVACName + " Supply Branches"); |
| 368 |
1/1✓ Branch 1 taken 200 times.
|
200 | m_idfObjects.push_back(branchList); |
| 369 | |||
| 370 |
1/1✓ Branch 1 taken 200 times.
|
400 | auto supplyInletNode = airLoopHVAC.supplyInletNode(); |
| 371 |
1/1✓ Branch 1 taken 200 times.
|
400 | auto supplyOutletNodes = airLoopHVAC.supplyOutletNodes(); |
| 372 |
1/1✓ Branch 1 taken 200 times.
|
400 | auto splitter = airLoopHVAC.supplySplitter(); |
| 373 |
2/2✓ Branch 0 taken 5 times.
✓ Branch 1 taken 195 times.
|
200 | if (splitter) { |
| 374 | // Dual Duct - There will be three branches, and two outlet nodes | ||
| 375 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
|
5 | OS_ASSERT(supplyOutletNodes.size() == 2u); |
| 376 | |||
| 377 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject _connectorList(IddObjectType::ConnectorList); |
| 378 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | _connectorList.setName(airLoopHVACName + " Connector List"); |
| 379 |
1/1✓ Branch 1 taken 5 times.
|
5 | m_idfObjects.push_back(_connectorList); |
| 380 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | idfObject.setString(AirLoopHVACFields::ConnectorListName, _connectorList.name().get()); |
| 381 | |||
| 382 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject _supplySplitter(IddObjectType::Connector_Splitter); |
| 383 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | _supplySplitter.setName(airLoopHVACName + " Supply Splitter"); |
| 384 |
1/1✓ Branch 1 taken 5 times.
|
5 | m_idfObjects.push_back(_supplySplitter); |
| 385 | |||
| 386 | { | ||
| 387 |
1/1✓ Branch 1 taken 5 times.
|
5 | auto eg = _connectorList.pushExtensibleGroup(); |
| 388 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | eg.setString(ConnectorListExtensibleFields::ConnectorObjectType, _supplySplitter.iddObject().name()); |
| 389 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | eg.setString(ConnectorListExtensibleFields::ConnectorName, _supplySplitter.name().get()); |
| 390 | 5 | } | |
| 391 | |||
| 392 | { | ||
| 393 |
4/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 10 taken 5 times.
|
10 | auto comps = airLoopHVAC.supplyComponents(supplyInletNode, splitter.get()); |
| 394 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject branch(openstudio::IddObjectType::Branch); |
| 395 |
1/1✓ Branch 1 taken 5 times.
|
5 | m_idfObjects.push_back(branch); |
| 396 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | branch.setName(airLoopHVACName + " Main Branch"); |
| 397 |
1/1✓ Branch 1 taken 5 times.
|
5 | populateBranch(branch, comps, airLoopHVAC, true); |
| 398 | |||
| 399 |
1/1✓ Branch 1 taken 5 times.
|
5 | auto eg = branchList.pushExtensibleGroup(); |
| 400 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | eg.setString(BranchListExtensibleFields::BranchName, branch.name().get()); |
| 401 | |||
| 402 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | _supplySplitter.setString(Connector_SplitterFields::InletBranchName, branch.name().get()); |
| 403 | 5 | } | |
| 404 | |||
| 405 | { | ||
| 406 |
4/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 8 taken 5 times.
✓ Branch 11 taken 5 times.
|
10 | auto comps = airLoopHVAC.supplyComponents(splitter.get(), supplyOutletNodes[0]); |
| 407 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject branch(openstudio::IddObjectType::Branch); |
| 408 |
1/1✓ Branch 1 taken 5 times.
|
5 | m_idfObjects.push_back(branch); |
| 409 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | branch.setName(airLoopHVACName + " Dual Duct Branch 1"); |
| 410 |
1/1✓ Branch 1 taken 5 times.
|
5 | populateBranch(branch, comps, airLoopHVAC, true); |
| 411 | |||
| 412 |
1/1✓ Branch 1 taken 5 times.
|
5 | auto eg = branchList.pushExtensibleGroup(); |
| 413 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | eg.setString(BranchListExtensibleFields::BranchName, branch.name().get()); |
| 414 | |||
| 415 |
1/1✓ Branch 1 taken 5 times.
|
5 | auto splitterEg = _supplySplitter.pushExtensibleGroup(); |
| 416 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | splitterEg.setString(Connector_SplitterExtensibleFields::OutletBranchName, branch.name().get()); |
| 417 | 5 | } | |
| 418 | |||
| 419 | { | ||
| 420 |
4/4✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 8 taken 5 times.
✓ Branch 11 taken 5 times.
|
10 | auto comps = airLoopHVAC.supplyComponents(splitter.get(), supplyOutletNodes[1]); |
| 421 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | IdfObject branch(openstudio::IddObjectType::Branch); |
| 422 |
1/1✓ Branch 1 taken 5 times.
|
5 | m_idfObjects.push_back(branch); |
| 423 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
5 | branch.setName(airLoopHVACName + " Dual Duct Branch 2"); |
| 424 |
1/1✓ Branch 1 taken 5 times.
|
5 | populateBranch(branch, comps, airLoopHVAC, true); |
| 425 | |||
| 426 |
1/1✓ Branch 1 taken 5 times.
|
5 | auto branchListEg = branchList.pushExtensibleGroup(); |
| 427 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | branchListEg.setString(BranchListExtensibleFields::BranchName, branch.name().get()); |
| 428 | |||
| 429 |
1/1✓ Branch 1 taken 5 times.
|
5 | auto splitterEg = _supplySplitter.pushExtensibleGroup(); |
| 430 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
5 | splitterEg.setString(Connector_SplitterExtensibleFields::OutletBranchName, branch.name().get()); |
| 431 | 5 | } | |
| 432 | 5 | } else { | |
| 433 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 195 times.
✗ Branch 4 not taken.
|
195 | OS_ASSERT(supplyOutletNodes.size() == 1u); |
| 434 | // Single Duct - Everything goes on one branch | ||
| 435 |
3/3✓ Branch 1 taken 195 times.
✓ Branch 4 taken 195 times.
✓ Branch 8 taken 195 times.
|
390 | auto comps = airLoopHVAC.supplyComponents(supplyInletNode, supplyOutletNodes[0]); |
| 436 | |||
| 437 |
2/2✓ Branch 1 taken 195 times.
✓ Branch 4 taken 195 times.
|
195 | IdfObject branch(openstudio::IddObjectType::Branch); |
| 438 |
1/1✓ Branch 1 taken 195 times.
|
195 | m_idfObjects.push_back(branch); |
| 439 |
2/2✓ Branch 1 taken 195 times.
✓ Branch 4 taken 195 times.
|
195 | branch.setName(airLoopHVACName + " Main Branch"); |
| 440 |
1/1✓ Branch 1 taken 195 times.
|
195 | populateBranch(branch, comps, airLoopHVAC, true); |
| 441 | |||
| 442 |
1/1✓ Branch 1 taken 195 times.
|
195 | auto eg = branchList.pushExtensibleGroup(); |
| 443 |
3/3✓ Branch 1 taken 195 times.
✓ Branch 4 taken 195 times.
✓ Branch 7 taken 195 times.
|
195 | eg.setString(BranchListExtensibleFields::BranchName, branch.name().get()); |
| 444 | 195 | } | |
| 445 | |||
| 446 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
✓ Branch 7 taken 200 times.
|
200 | idfObject.setString(openstudio::AirLoopHVACFields::BranchListName, branchList.name().get()); |
| 447 | |||
| 448 | // Convert demand side components | ||
| 449 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 7 taken 205 times.
✓ Branch 8 taken 200 times.
|
405 | for (const auto& demandInletNode : airLoopHVAC.demandInletNodes()) { |
| 450 |
1/1✓ Branch 1 taken 205 times.
|
205 | createAirLoopHVACSupplyPath(demandInletNode); |
| 451 | 200 | } | |
| 452 |
1/1✓ Branch 1 taken 200 times.
|
200 | createAirLoopHVACReturnPath(airLoopHVAC); |
| 453 | |||
| 454 |
3/3✓ Branch 1 taken 200 times.
✓ Branch 4 taken 200 times.
✓ Branch 7 taken 200 times.
|
600 | std::vector<ModelObject> demandComponents = airLoopHVAC.demandComponents(); |
| 455 |
2/2✓ Branch 4 taken 1386 times.
✓ Branch 5 taken 200 times.
|
1586 | for (auto& demandComponent : demandComponents) { |
| 456 |
1/1✓ Branch 1 taken 1386 times.
|
1386 | translateAndMapModelObject(demandComponent); |
| 457 | } | ||
| 458 | |||
| 459 |
1/1✓ Branch 1 taken 200 times.
|
400 | return boost::optional<IdfObject>(idfObject); |
| 460 | 200 | } | |
| 461 | |||
| 462 | } // namespace energyplus | ||
| 463 | |||
| 464 | } // namespace openstudio | ||
| 465 |