GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 99.0% 312 / 0 / 315
Functions: 100.0% 1 / 0 / 1
Branches: 83.2% 635 / 0 / 763

src/energyplus/ForwardTranslator/ForwardTranslateAirConditionerVariableRefrigerantFlow.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/Schedule.hpp"
9 #include "../../model/Schedule_Impl.hpp"
10 #include "../../model/Node.hpp"
11 #include "../../model/Node_Impl.hpp"
12 #include "../../model/PlantLoop.hpp"
13 #include "../../model/PlantLoop_Impl.hpp"
14 #include "../../model/ThermalZone.hpp"
15 #include "../../model/ThermalZone_Impl.hpp"
16 #include "../../model/AirConditionerVariableRefrigerantFlow.hpp"
17 #include "../../model/AirConditionerVariableRefrigerantFlow_Impl.hpp"
18 #include "../../model/ZoneHVACTerminalUnitVariableRefrigerantFlow.hpp"
19 #include "../../model/ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl.hpp"
20 #include "../../model/Curve.hpp"
21 #include "../../model/Curve_Impl.hpp"
22 #include "../../utilities/core/Logger.hpp"
23 #include "../../utilities/core/Assert.hpp"
24 #include <utilities/idd/AirConditioner_VariableRefrigerantFlow_FieldEnums.hxx>
25 #include <utilities/idd/ZoneTerminalUnitList_FieldEnums.hxx>
26 #include "../../utilities/idd/IddEnums.hpp"
27 #include <utilities/idd/IddEnums.hxx>
28 #include "../../utilities/idf/IdfExtensibleGroup.hpp"
29
30 using namespace openstudio::model;
31
32 using namespace std;
33
34 namespace openstudio {
35
36 namespace energyplus {
37
38 12 boost::optional<IdfObject> ForwardTranslator::translateAirConditionerVariableRefrigerantFlow(AirConditionerVariableRefrigerantFlow& modelObject) {
39 12 boost::optional<std::string> s;
40 12 boost::optional<double> value;
41
42
1/1
✓ Branch 1 taken 12 times.
12 std::vector<ZoneHVACTerminalUnitVariableRefrigerantFlow> terminals = modelObject.terminals();
43
2/2
✓ Branch 1 taken 2 times.
✓ Branch 2 taken 10 times.
12 if (terminals.empty()) {
44
7/7
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 14 taken 2 times.
✓ Branch 17 taken 2 times.
✓ Branch 20 taken 2 times.
2 LOG(Warn, modelObject.briefDescription() << " will not be translated as it has no terminals.");
45 2 return boost::none;
46 }
47
48 // Heat Pump Name
49
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::AirConditioner_VariableRefrigerantFlow, modelObject);
50
51 // AvailabilityScheduleName
52
53
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 8 taken 10 times.
✗ Branch 9 not taken.
20 if (boost::optional<model::Schedule> schedule = modelObject.availabilitySchedule()) {
54
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) {
55
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::AvailabilityScheduleName, _schedule->name().get());
56 10 }
57 10 }
58
59 // RatedTotalCoolingCapacity
60
61
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 9 times.
✓ Branch 4 taken 1 time.
10 if (modelObject.isGrossRatedTotalCoolingCapacityAutosized()) {
62
2/2
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
18 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::GrossRatedTotalCoolingCapacity, "Autosize");
63
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 } else if ((value = modelObject.grossRatedTotalCoolingCapacity())) {
64
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::GrossRatedTotalCoolingCapacity, value.get());
65 }
66
67 // RatedCoolingCOP
68
69
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.grossRatedCoolingCOP())) {
70
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::GrossRatedCoolingCOP, value.get());
71 }
72
73 // MinimumCondenserInletNodeTemperatureinCoolingMode
74
75
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.minimumOutdoorTemperatureinCoolingMode())) {
76
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::MinimumCondenserInletNodeTemperatureinCoolingMode, value.get());
77 }
78
79 // MaximumCondenserInletNodeTemperatureinCoolingMode
80
81
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.maximumOutdoorTemperatureinCoolingMode())) {
82
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::MaximumCondenserInletNodeTemperatureinCoolingMode, value.get());
83 }
84
85 // CoolingCapacityRatioModifierFunctionofLowTemperatureCurveName
86
87
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingCapacityRatioModifierFunctionofLowTemperatureCurve()) {
88
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
89 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingCapacityRatioModifierFunctionofLowTemperatureCurveName,
90
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
91 10 }
92 10 }
93
94 // CoolingCapacityRatioBoundaryCurveName
95
96
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingCapacityRatioBoundaryCurve()) {
97
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
98
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingCapacityRatioBoundaryCurveName, _curve->name().get());
99 10 }
100 10 }
101
102 // CoolingCapacityRatioModifierFunctionofHighTemperatureCurveName
103
104
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingCapacityRatioModifierFunctionofHighTemperatureCurve()) {
105
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
106 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingCapacityRatioModifierFunctionofHighTemperatureCurveName,
107
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
108 10 }
109 10 }
110
111 // CoolingEnergyInputRatioModifierFunctionofLowTemperatureCurveName
112
113
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingEnergyInputRatioModifierFunctionofLowTemperatureCurve()) {
114
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
115 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingEnergyInputRatioModifierFunctionofLowTemperatureCurveName,
116
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
117 10 }
118 10 }
119
120 // CoolingEnergyInputRatioBoundaryCurveName
121
122
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingEnergyInputRatioBoundaryCurve()) {
123
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
124
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingEnergyInputRatioBoundaryCurveName, _curve->name().get());
125 10 }
126 10 }
127
128 // CoolingEnergyInputRatioModifierFunctionofHighTemperatureCurveName
129
130
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingEnergyInputRatioModifierFunctionofHighTemperatureCurve()) {
131
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
132 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingEnergyInputRatioModifierFunctionofHighTemperatureCurveName,
133
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
134 10 }
135 10 }
136
137 // CoolingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurveName
138
139
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurve()) {
140
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
141 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurveName,
142
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
143 10 }
144 10 }
145
146 // CoolingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurveName
147
148
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurve()) {
149
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
150 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurveName,
151
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
152 10 }
153 10 }
154
155 // CoolingCombinationRatioCorrectionFactorCurveName
156
157
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingCombinationRatioCorrectionFactorCurve()) {
158
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
159
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingCombinationRatioCorrectionFactorCurveName, _curve->name().get());
160 10 }
161 10 }
162
163 // CoolingPartLoadFractionCorrelationCurveName
164
165
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.coolingPartLoadFractionCorrelationCurve()) {
166
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
167
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CoolingPartLoadFractionCorrelationCurveName, _curve->name().get());
168 10 }
169 10 }
170
171 // RatedTotalHeatingCapacity
172
173
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 9 times.
✓ Branch 4 taken 1 time.
10 if (modelObject.isGrossRatedHeatingCapacityAutosized()) {
174
2/2
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
18 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::GrossRatedHeatingCapacity, "Autosize");
175
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 } else if ((value = modelObject.grossRatedHeatingCapacity())) {
176
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::GrossRatedHeatingCapacity, value.get());
177 }
178
179 // RatedTotalHeatingCapacitySizingRatio
180
181
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.ratedHeatingCapacitySizingRatio())) {
182
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::RatedHeatingCapacitySizingRatio, value.get());
183 }
184
185 // RatedHeatingCOP
186
187
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.ratedHeatingCOP())) {
188
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::GrossRatedHeatingCOP, value.get());
189 }
190
191 // MinimumCondenserInletNodeTemperatureinHeatingMode
192
193
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.minimumOutdoorTemperatureinHeatingMode())) {
194
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::MinimumCondenserInletNodeTemperatureinHeatingMode, value.get());
195 }
196
197 // MaximumCondenserInletNodeTemperatureinHeatingMode
198
199
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.maximumOutdoorTemperatureinHeatingMode())) {
200
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::MaximumCondenserInletNodeTemperatureinHeatingMode, value.get());
201 }
202
203 // HeatingCapacityRatioModifierFunctionofLowTemperatureCurveName
204
205
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingCapacityRatioModifierFunctionofLowTemperatureCurve()) {
206
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
207 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingCapacityRatioModifierFunctionofLowTemperatureCurveName,
208
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
209 10 }
210 10 }
211
212 // HeatingCapacityRatioBoundaryCurveName
213
214
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingCapacityRatioBoundaryCurve()) {
215
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
216
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingCapacityRatioBoundaryCurveName, _curve->name().get());
217 10 }
218 10 }
219
220 // HeatingCapacityRatioModifierFunctionofHighTemperatureCurveName
221
222
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingCapacityRatioModifierFunctionofHighTemperatureCurve()) {
223
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
224 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingCapacityRatioModifierFunctionofHighTemperatureCurveName,
225
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
226 10 }
227 10 }
228
229 // HeatingEnergyInputRatioModifierFunctionofLowTemperatureCurveName
230
231
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingEnergyInputRatioModifierFunctionofLowTemperatureCurve()) {
232
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
233 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingEnergyInputRatioModifierFunctionofLowTemperatureCurveName,
234
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
235 10 }
236 10 }
237
238 // HeatingEnergyInputRatioBoundaryCurveName
239
240
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingEnergyInputRatioBoundaryCurve()) {
241
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
242
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingEnergyInputRatioBoundaryCurveName, _curve->name().get());
243 10 }
244 10 }
245
246 // HeatingEnergyInputRatioModifierFunctionofHighTemperatureCurveName
247
248
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingEnergyInputRatioModifierFunctionofHighTemperatureCurve()) {
249
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
250 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingEnergyInputRatioModifierFunctionofHighTemperatureCurveName,
251
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
252 10 }
253 10 }
254
255 // HeatingPerformanceCurveOutdoorTemperatureType
256
257
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 8 taken 10 times.
✗ Branch 9 not taken.
20 if ((s = modelObject.heatingPerformanceCurveOutdoorTemperatureType())) {
258
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingPerformanceCurveOutdoorTemperatureType, s.get());
259 }
260
261 // HeatingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurveName
262
263
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurve()) {
264
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
265 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingEnergyInputRatioModifierFunctionofLowPartLoadRatioCurveName,
266
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
267 10 }
268 10 }
269
270 // HeatingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurveName
271
272
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurve()) {
273
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
274 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingEnergyInputRatioModifierFunctionofHighPartLoadRatioCurveName,
275
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
276 10 }
277 10 }
278
279 // HeatingCombinationRatioCorrectionFactorCurveName
280
281
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingCombinationRatioCorrectionFactorCurve()) {
282
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
283
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingCombinationRatioCorrectionFactorCurveName, _curve->name().get());
284 10 }
285 10 }
286
287 // HeatingPartLoadFractionCorrelationCurveName
288
289
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.heatingPartLoadFractionCorrelationCurve()) {
290
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
291
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatingPartLoadFractionCorrelationCurveName, _curve->name().get());
292 10 }
293 10 }
294
295 // MinimumHeatPumpPartLoadRatio
296
297
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.minimumHeatPumpPartLoadRatio())) {
298
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::MinimumHeatPumpPartLoadRatio, value.get());
299 }
300
301 // ZoneNameforMasterThermostatLocation
302
303
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 9 times.
20 if (boost::optional<model::ThermalZone> zone = modelObject.zoneforMasterThermostatLocation()) {
304
4/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
1 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::ZoneNameforMasterThermostatLocation, zone->name().get());
305 10 }
306
307 // MasterThermostatPriorityControlType
308
309
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 8 taken 10 times.
✗ Branch 9 not taken.
20 if ((s = modelObject.masterThermostatPriorityControlType())) {
310
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::MasterThermostatPriorityControlType, s.get());
311 }
312
313 // ThermostatPriorityScheduleName
314
315
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 9 times.
20 if (boost::optional<model::Schedule> schedule = modelObject.thermostatPrioritySchedule()) {
316
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) {
317
4/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
1 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::ThermostatPriorityScheduleName, _schedule->name().get());
318 1 }
319 10 }
320
321 // HeatPumpWasteHeatRecovery
322
323
2/3
✓ Branch 1 taken 10 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 10 times.
10 if (modelObject.heatPumpWasteHeatRecovery()) {
324 ✗ idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatPumpWasteHeatRecovery, "Yes");
325 } else {
326
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
20 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatPumpWasteHeatRecovery, "No");
327 }
328
329 // EquivalentPipingLengthusedforPipingCorrectionFactorinCoolingMode
330
331
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.equivalentPipingLengthusedforPipingCorrectionFactorinCoolingMode())) {
332 10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::EquivalentPipingLengthusedforPipingCorrectionFactorinCoolingMode,
333
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 value.get());
334 }
335
336 // VerticalHeightusedforPipingCorrectionFactor
337
338
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.verticalHeightusedforPipingCorrectionFactor())) {
339
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::VerticalHeightusedforPipingCorrectionFactor, value.get());
340 }
341
342 // PipingCorrectionFactorforLengthinCoolingModeCurveName
343
344
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 if (boost::optional<model::Curve> curve = modelObject.pipingCorrectionFactorforLengthinCoolingModeCurve()) {
345
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 6 taken 10 times.
✗ Branch 7 not taken.
20 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
346 10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::PipingCorrectionFactorforLengthinCoolingModeCurveName,
347
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 _curve->name().get());
348 10 }
349 10 }
350
351 // PipingCorrectionFactorforHeightinCoolingModeCoefficient
352
353
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.pipingCorrectionFactorforHeightinCoolingModeCoefficient())) {
354
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::PipingCorrectionFactorforHeightinCoolingModeCoefficient, value.get());
355 }
356
357 // EquivalentPipingLengthusedforPipingCorrectionFactorinHeatingMode
358
359
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.equivalentPipingLengthusedforPipingCorrectionFactorinHeatingMode())) {
360 10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::EquivalentPipingLengthusedforPipingCorrectionFactorinHeatingMode,
361
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 value.get());
362 }
363
364 // PipingCorrectionFactorforLengthinHeatingModeCurveName
365
366
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 9 times.
20 if (boost::optional<model::Curve> curve = modelObject.pipingCorrectionFactorforLengthinHeatingModeCurve()) {
367
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
368 1 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::PipingCorrectionFactorforLengthinHeatingModeCurveName,
369
4/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
1 _curve->name().get());
370 1 }
371 10 }
372
373 // PipingCorrectionFactorforHeightinHeatingModeCoefficient
374
375
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.pipingCorrectionFactorforHeightinHeatingModeCoefficient())) {
376
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::PipingCorrectionFactorforHeightinHeatingModeCoefficient, value.get());
377 }
378
379 // CrankcaseHeaterPowerperCompressor
380
381
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.crankcaseHeaterPowerperCompressor())) {
382
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::CrankcaseHeaterPowerperCompressor, value.get());
383 }
384
385 // NumberofCompressors
386
387 {
388
1/1
✓ Branch 1 taken 10 times.
10 int number = modelObject.numberofCompressors();
389
390
1/1
✓ Branch 1 taken 10 times.
10 idfObject.setUnsigned(AirConditioner_VariableRefrigerantFlowFields::NumberofCompressors, (unsigned)number);
391 }
392
393 // RatioofCompressorSizetoTotalCompressorCapacity
394
395
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.ratioofCompressorSizetoTotalCompressorCapacity())) {
396
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::RatioofCompressorSizetoTotalCompressorCapacity, value.get());
397 }
398
399 // MaximumOutdoorDryBulbTemperatureforCrankcaseHeater
400
401
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.maximumOutdoorDrybulbTemperatureforCrankcaseHeater())) {
402
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeater, value.get());
403 }
404
405 // DefrostStrategy
406
407
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 8 taken 10 times.
✗ Branch 9 not taken.
20 if ((s = modelObject.defrostStrategy())) {
408
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::DefrostStrategy, s.get());
409 }
410
411 // DefrostControl
412
413
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 8 taken 10 times.
✗ Branch 9 not taken.
20 if ((s = modelObject.defrostControl())) {
414
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::DefrostControl, s.get());
415 }
416
417 // DefrostEnergyInputRatioModifierFunctionofTemperatureCurveName
418
419
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 9 times.
20 if (boost::optional<model::Curve> curve = modelObject.defrostEnergyInputRatioModifierFunctionofTemperatureCurve()) {
420
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
421 1 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::DefrostEnergyInputRatioModifierFunctionofTemperatureCurveName,
422
4/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
1 _curve->name().get());
423 1 }
424 10 }
425
426 // DefrostTimePeriodFraction
427
428
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.defrostTimePeriodFraction())) {
429
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::DefrostTimePeriodFraction, value.get());
430 }
431
432 // ResistiveDefrostHeaterCapacity
433
434
2/3
✓ Branch 1 taken 10 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 10 times.
10 if (modelObject.isResistiveDefrostHeaterCapacityAutosized()) {
435 ✗ idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::ResistiveDefrostHeaterCapacity, "Autosize");
436
2/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 10 times.
✗ Branch 4 not taken.
20 } else if ((value = modelObject.resistiveDefrostHeaterCapacity())) {
437
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::ResistiveDefrostHeaterCapacity, value.get());
438 }
439
440 // MaximumOutdoorDrybulbTemperatureforDefrostOperation
441
442
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.maximumOutdoorDrybulbTemperatureforDefrostOperation())) {
443
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::MaximumOutdoorDrybulbTemperatureforDefrostOperation, value.get());
444 }
445
446 // Condenser Type
447 // It was decided that the "smart" logic shouldn't be in the model itself.
448 // So now, we do two things:
449 // * If condenserType is set, respect that, but issue Errors if it's wrong
450 // * If condenserType is not set, we default it (default is done in the model actually)
451 // * If VRF connected to a PlantLoop => WaterCooled, else "AirCooled" ("EvaporativelyCooled" is less common and will be reserved for people who
452 // know what they are doing and are hardsetting it)
453
1/1
✓ Branch 1 taken 10 times.
10 std::string condenserType = modelObject.condenserType();
454
455
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 7 times.
10 if (modelObject.isCondenserTypeDefaulted()) {
456 // We log an Info anyways, might be useful
457
3/4
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 3 times.
6 if (openstudio::istringEqual(condenserType, "EvaporativelyCooled")) {
458 ✗ LOG(Info, modelObject.briefDescription() << " is connected to a PlantLoop, defaulting condenserType to 'WaterCooled'.");
459 } else {
460
7/7
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 3 times.
✓ Branch 14 taken 3 times.
✓ Branch 17 taken 3 times.
✓ Branch 20 taken 3 times.
3 LOG(Info, modelObject.briefDescription() << " is not connected to a PlantLoop, defaulting condenserType to 'AirCooled'.");
461 }
462 } else {
463
1/1
✓ Branch 1 taken 7 times.
7 boost::optional<PlantLoop> _plant = modelObject.plantLoop();
464
465
11/21
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
✓ Branch 9 taken 3 times.
✓ Branch 10 taken 2 times.
✓ Branch 12 taken 5 times.
✓ Branch 13 taken 2 times.
✓ Branch 14 taken 7 times.
✗ Branch 15 not taken.
✓ Branch 17 taken 7 times.
✗ Branch 18 not taken.
✓ Branch 19 taken 2 times.
✓ Branch 20 taken 5 times.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
✗ Branch 29 not taken.
✗ Branch 30 not taken.
31 if ((openstudio::istringEqual(condenserType, "AirCooled") || openstudio::istringEqual(condenserType, "EvaporativelyCooled"))
466
7/7
✓ Branch 1 taken 7 times.
✓ Branch 3 taken 5 times.
✓ Branch 4 taken 2 times.
✓ Branch 6 taken 2 times.
✓ Branch 7 taken 3 times.
✓ Branch 8 taken 5 times.
✓ Branch 9 taken 2 times.
19 && _plant.is_initialized()) {
467
9/9
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 13 taken 2 times.
✓ Branch 16 taken 2 times.
✓ Branch 20 taken 2 times.
✓ Branch 23 taken 2 times.
✓ Branch 26 taken 2 times.
2 LOG(Error,
468 modelObject.briefDescription() << " has an hardcoded condenserType '" << condenserType << "' while it is connected to a PlantLoop.");
469
10/16
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 6 taken 2 times.
✓ Branch 7 taken 3 times.
✓ Branch 9 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 11 taken 5 times.
✗ Branch 12 not taken.
✓ Branch 14 taken 5 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 1 time.
✓ Branch 17 taken 4 times.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
15 } else if (openstudio::istringEqual(condenserType, "WaterCooled") && !_plant.is_initialized()) {
470
9/9
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 20 taken 1 time.
✓ Branch 23 taken 1 time.
✓ Branch 26 taken 1 time.
1 LOG(Error,
471 modelObject.briefDescription() << " has an hardcoded condenserType '" << condenserType << "' while it is NOT connected to a PlantLoop.");
472 }
473 7 }
474
1/1
✓ Branch 1 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CondenserType, condenserType);
475
476 // CondenserInletNodeName
477
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 6 times.
20 if (boost::optional<ModelObject> mo = modelObject.inletModelObject()) {
478
3/4
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 6 taken 4 times.
✗ Branch 7 not taken.
8 if (boost::optional<Node> node = mo->optionalCast<Node>()) {
479
4/4
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
4 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CondenserInletNodeName, node->name().get());
480 4 }
481 10 }
482 // CondenserOutletNodeName
483
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 4 times.
✓ Branch 4 taken 6 times.
20 if (boost::optional<ModelObject> mo = modelObject.outletModelObject()) {
484
3/4
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 6 taken 4 times.
✗ Branch 7 not taken.
8 if (boost::optional<Node> node = mo->optionalCast<Node>()) {
485
4/4
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
4 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::CondenserOutletNodeName, node->name().get());
486 4 }
487 10 }
488
489 // WaterCondenserVolumeFlowRate
490
491
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 9 times.
✓ Branch 4 taken 1 time.
10 if (modelObject.isWaterCondenserVolumeFlowRateAutosized()) {
492
2/2
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
18 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::WaterCondenserVolumeFlowRate, "Autosize");
493
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 } else if ((value = modelObject.waterCondenserVolumeFlowRate())) {
494
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::WaterCondenserVolumeFlowRate, value.get());
495 }
496
497 // EvaporativeCondenserEffectiveness
498
499
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.evaporativeCondenserEffectiveness())) {
500
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::EvaporativeCondenserEffectiveness, value.get());
501 }
502
503 // EvaporativeCondenserAirFlowRate
504
505
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 9 times.
✓ Branch 4 taken 1 time.
10 if (modelObject.isEvaporativeCondenserAirFlowRateAutosized()) {
506
2/2
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
18 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::EvaporativeCondenserAirFlowRate, "Autosize");
507
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 } else if ((value = modelObject.evaporativeCondenserAirFlowRate())) {
508
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::EvaporativeCondenserAirFlowRate, value.get());
509 }
510
511 // EvaporativeCondenserPumpRatedPowerConsumption
512
513
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 9 times.
✓ Branch 4 taken 1 time.
10 if (modelObject.isEvaporativeCondenserPumpRatedPowerConsumptionAutosized()) {
514
2/2
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
18 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::EvaporativeCondenserPumpRatedPowerConsumption, "Autosize");
515
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 } else if ((value = modelObject.evaporativeCondenserPumpRatedPowerConsumption())) {
516
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::EvaporativeCondenserPumpRatedPowerConsumption, value.get());
517 }
518
519 // BasinHeaterCapacity
520
521
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.basinHeaterCapacity())) {
522
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::BasinHeaterCapacity, value.get());
523 }
524
525 // BasinHeaterSetpointTemperature
526
527
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.basinHeaterSetpointTemperature())) {
528
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::BasinHeaterSetpointTemperature, value.get());
529 }
530
531 // BasinHeaterOperatingScheduleName
532
533
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 9 times.
20 if (boost::optional<model::Schedule> schedule = modelObject.basinHeaterOperatingSchedule()) {
534
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get())) {
535
4/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
1 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::BasinHeaterOperatingScheduleName, _schedule->name().get());
536 1 }
537 10 }
538
539 // FuelType
540
541
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 8 taken 10 times.
✗ Branch 9 not taken.
20 if ((s = modelObject.fuelType())) {
542
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::FuelType, s.get());
543 }
544
545 // MinimumCondenserInletNodeTemperatureinHeatRecoveryMode
546
547
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.minimumOutdoorTemperatureinHeatRecoveryMode())) {
548
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::MinimumCondenserInletNodeTemperatureinHeatRecoveryMode, value.get());
549 }
550
551 // MaximumCondenserInletNodeTemperatureinHeatRecoveryMode
552
553
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.maximumOutdoorTemperatureinHeatRecoveryMode())) {
554
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::MaximumCondenserInletNodeTemperatureinHeatRecoveryMode, value.get());
555 }
556
557 // HeatRecoveryCoolingCapacityModifierCurveName
558
559
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 9 times.
20 if (boost::optional<model::Curve> curve = modelObject.heatRecoveryCoolingCapacityModifierCurve()) {
560
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
561
4/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
1 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatRecoveryCoolingCapacityModifierCurveName, _curve->name().get());
562 1 }
563 10 }
564
565 // InitialHeatRecoveryCoolingCapacityFraction
566
567
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.initialHeatRecoveryCoolingCapacityFraction())) {
568
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::InitialHeatRecoveryCoolingCapacityFraction, value.get());
569 }
570
571 // HeatRecoveryCoolingCapacityTimeConstant
572
573
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.heatRecoveryCoolingCapacityTimeConstant())) {
574
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::HeatRecoveryCoolingCapacityTimeConstant, value.get());
575 }
576
577 // HeatRecoveryCoolingEnergyModifierCurveName
578
579
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 9 times.
20 if (boost::optional<model::Curve> curve = modelObject.heatRecoveryCoolingEnergyModifierCurve()) {
580
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
581
4/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
1 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatRecoveryCoolingEnergyModifierCurveName, _curve->name().get());
582 1 }
583 10 }
584
585 // InitialHeatRecoveryCoolingEnergyFraction
586
587
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.initialHeatRecoveryCoolingEnergyFraction())) {
588
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::InitialHeatRecoveryCoolingEnergyFraction, value.get());
589 }
590
591 // HeatRecoveryCoolingEnergyTimeConstant
592
593
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.heatRecoveryCoolingEnergyTimeConstant())) {
594
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::HeatRecoveryCoolingEnergyTimeConstant, value.get());
595 }
596
597 // HeatRecoveryHeatingCapacityModifierCurveName
598
599
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 9 times.
20 if (boost::optional<model::Curve> curve = modelObject.heatRecoveryHeatingCapacityModifierCurve()) {
600
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
601
4/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
1 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatRecoveryHeatingCapacityModifierCurveName, _curve->name().get());
602 1 }
603 10 }
604
605 // InitialHeatRecoveryHeatingCapacityFraction
606
607
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.initialHeatRecoveryHeatingCapacityFraction())) {
608
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::InitialHeatRecoveryHeatingCapacityFraction, value.get());
609 }
610
611 // HeatRecoveryHeatingCapacityTimeConstant
612
613
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.heatRecoveryHeatingCapacityTimeConstant())) {
614
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::HeatRecoveryHeatingCapacityTimeConstant, value.get());
615 }
616
617 // HeatRecoveryHeatingEnergyModifierCurveName
618
619
3/3
✓ Branch 1 taken 10 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 9 times.
20 if (boost::optional<model::Curve> curve = modelObject.heatRecoveryHeatingEnergyModifierCurve()) {
620
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (boost::optional<IdfObject> _curve = translateAndMapModelObject(curve.get())) {
621
4/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
1 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::HeatRecoveryHeatingEnergyModifierCurveName, _curve->name().get());
622 1 }
623 10 }
624
625 // InitialHeatRecoveryHeatingEnergyFraction
626
627
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.initialHeatRecoveryHeatingEnergyFraction())) {
628
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::InitialHeatRecoveryHeatingEnergyFraction, value.get());
629 }
630
631 // HeatRecoveryHeatingEnergyTimeConstant
632
633
3/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
20 if ((value = modelObject.heatRecoveryHeatingEnergyTimeConstant())) {
634
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 idfObject.setDouble(AirConditioner_VariableRefrigerantFlowFields::HeatRecoveryHeatingEnergyTimeConstant, value.get());
635 }
636
637 // Terminal Unit List
638
639
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 IdfObject _zoneTerminalUnitList(IddObjectType::ZoneTerminalUnitList);
640
641
3/3
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
10 std::string terminalUnitListName = modelObject.name().get() + " Terminal List";
642
643
1/1
✓ Branch 1 taken 10 times.
10 _zoneTerminalUnitList.setString(ZoneTerminalUnitListFields::ZoneTerminalUnitListName, terminalUnitListName);
644
645
1/1
✓ Branch 1 taken 10 times.
10 idfObject.setString(AirConditioner_VariableRefrigerantFlowFields::ZoneTerminalUnitListName, terminalUnitListName);
646
647
1/1
✓ Branch 1 taken 10 times.
10 m_idfObjects.push_back(_zoneTerminalUnitList);
648
649
2/2
✓ Branch 5 taken 10 times.
✓ Branch 6 taken 10 times.
20 for (auto& terminal : terminals) {
650
1/1
✓ Branch 1 taken 10 times.
10 boost::optional<IdfObject> _terminal = translateAndMapModelObject(terminal);
651
652
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 10 times.
✗ Branch 4 not taken.
10 OS_ASSERT(_terminal);
653
654
1/1
✓ Branch 1 taken 10 times.
10 IdfExtensibleGroup eg = _zoneTerminalUnitList.pushExtensibleGroup();
655
656
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 eg.setString(ZoneTerminalUnitListExtensibleFields::ZoneTerminalUnitName, _terminal->name().get());
657 10 }
658
659
1/1
✓ Branch 1 taken 10 times.
10 return idfObject;
660 12 }
661
662 } // namespace energyplus
663
664 } // namespace openstudio
665