GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 72.1% 284 / 0 / 394
Functions: 76.0% 79 / 0 / 104
Branches: 50.7% 229 / 0 / 452

src/model/CoilCoolingDXMultiSpeed.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 "Model.hpp"
7 #include "Model_Impl.hpp"
8 #include "CoilCoolingDXMultiSpeed.hpp"
9 #include "CoilCoolingDXMultiSpeed_Impl.hpp"
10 #include "Schedule.hpp"
11 #include "Schedule_Impl.hpp"
12 #include "CoilCoolingDXMultiSpeedStageData.hpp"
13 #include "CoilCoolingDXMultiSpeedStageData_Impl.hpp"
14 #include "AirLoopHVACUnitarySystem.hpp"
15 #include "AirLoopHVACUnitarySystem_Impl.hpp"
16 #include "AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.hpp"
17 #include "AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed_Impl.hpp"
18 #include "ScheduleTypeLimits.hpp"
19 #include "ScheduleTypeRegistry.hpp"
20 #include "AirflowNetworkEquivalentDuct.hpp"
21 #include "AirflowNetworkEquivalentDuct_Impl.hpp"
22 #include "Curve.hpp"
23 #include "Curve_Impl.hpp"
24
25 #include <utilities/idd/IddFactory.hxx>
26
27 #include <utilities/idd/OS_Coil_Cooling_DX_MultiSpeed_FieldEnums.hxx>
28 #include <utilities/idd/IddEnums.hxx>
29 #include "../utilities/core/Assert.hpp"
30 #include "../utilities/data/DataEnums.hpp"
31 #include "../utilities/idf/WorkspaceExtensibleGroup.hpp"
32
33 namespace openstudio {
34 namespace model {
35
36 namespace detail {
37
38 30 CoilCoolingDXMultiSpeed_Impl::CoilCoolingDXMultiSpeed_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
39 30 : StraightComponent_Impl(idfObject, model, keepHandle) {
40
4/6
✓ Branch 1 taken 30 times.
✓ Branch 4 taken 30 times.
✓ Branch 7 taken 30 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 30 times.
✗ Branch 13 not taken.
30 OS_ASSERT(idfObject.iddObject().type() == CoilCoolingDXMultiSpeed::iddObjectType());
41 30 }
42
43 4 CoilCoolingDXMultiSpeed_Impl::CoilCoolingDXMultiSpeed_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
44 4 bool keepHandle)
45 4 : StraightComponent_Impl(other, model, keepHandle) {
46
4/6
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 13 not taken.
4 OS_ASSERT(other.iddObject().type() == CoilCoolingDXMultiSpeed::iddObjectType());
47 4 }
48
49 25 CoilCoolingDXMultiSpeed_Impl::CoilCoolingDXMultiSpeed_Impl(const CoilCoolingDXMultiSpeed_Impl& other, Model_Impl* model, bool keepHandle)
50 25 : StraightComponent_Impl(other, model, keepHandle) {}
51
52 ✗ const std::vector<std::string>& CoilCoolingDXMultiSpeed_Impl::outputVariableNames() const {
53 // TODO: static for now
54 static const std::vector<std::string> result{
55 "Cooling Coil Total Cooling Rate", "Cooling Coil Total Cooling Energy", "Cooling Coil Sensible Cooling Rate",
56 "Cooling Coil Sensible Cooling Energy", "Cooling Coil Latent Cooling Rate", "Cooling Coil Latent Cooling Energy",
57 "Cooling Coil Electricity Rate", "Cooling Coil Electricity Energy", "Cooling Coil Runtime Fraction",
58
59 // condenserType = [AirCooled, EvaporativelyCooled]
60 // if (this->condenserType() == "EvaporativelyCooled") {
61 "Cooling Coil Condenser Inlet Temperature", "Cooling Coil Evaporative Condenser Water Volume",
62 "Cooling Coil Evaporative Condenser Pump Electricity Rate", "Cooling Coil Evaporative Condenser Pump Electricity Energy",
63 "Cooling Coil Basin Heater Electricity Rate", "Cooling Coil Basin Heater Electricity Energy",
64 "Cooling Coil Evaporative Condenser Mains Supply Water Volume"
65 // }
66
67 // Storage tank isn't implemented
68 // if has storage tank:
69 // "Cooling Coil Condensate Volume Flow Rate",
70 // "Cooling Coil Condensate Volume",
71 //
72
73 // If not part of AirLoopHVAC:UnitaryHeatPump:AirToAir
74 // (if part of a heat pump, crankcase heater is reported only for the heating coil):
75 // if ( !this->containingHVACComponent().empty() ) {
76 // "Cooling Coil Crankcase Heater Electricity Rate",
77 // "Cooling Coil Crankcase Heater Electricity Energy",
78 // }
79 //
80 // Additional variables for Coil:Cooling:DX:Multispeed:
81 // If Fuel Type is not Electricity:
82 // "DX Cooling Coil <Fuel Type> Power",
83 // "DX Cooling Coil <Fuel Type> Consumption"
84 //
85 ✗ };
86 ✗ return result;
87 ✗ }
88
89 13 IddObjectType CoilCoolingDXMultiSpeed_Impl::iddObjectType() const {
90 13 return CoilCoolingDXMultiSpeed::iddObjectType();
91 }
92
93 ✗ std::vector<ScheduleTypeKey> CoilCoolingDXMultiSpeed_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
94 // TODO: Check schedule display names.
95 ✗ std::vector<ScheduleTypeKey> result;
96 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
97 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
98 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
99 ✗ if (std::find(b, e, OS_Coil_Cooling_DX_MultiSpeedFields::AvailabilitySchedule) != e) {
100 ✗ result.push_back(ScheduleTypeKey("CoilCoolingDXMultiSpeed", "Availability Schedule"));
101 }
102 ✗ if (std::find(b, e, OS_Coil_Cooling_DX_MultiSpeedFields::BasinHeaterOperatingSchedule) != e) {
103 ✗ result.push_back(ScheduleTypeKey("CoilCoolingDXMultiSpeed", "Basin Heater Operating Schedule"));
104 }
105 ✗ return result;
106 ✗ }
107
108 14 boost::optional<Schedule> CoilCoolingDXMultiSpeed_Impl::availabilitySchedule() const {
109
2/2
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
14 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Coil_Cooling_DX_MultiSpeedFields::AvailabilitySchedule);
110 }
111
112 14 std::string CoilCoolingDXMultiSpeed_Impl::condenserType() const {
113
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_MultiSpeedFields::CondenserType, true);
114
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
115
2/2
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
28 return value.get();
116 14 }
117
118 14 bool CoilCoolingDXMultiSpeed_Impl::applyPartLoadFractiontoSpeedsGreaterthan1() const {
119
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_MultiSpeedFields::ApplyPartLoadFractiontoSpeedsGreaterthan1, true);
120
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
121
3/3
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
✓ Branch 7 taken 14 times.
28 return openstudio::istringEqual(value.get(), "Yes");
122 14 }
123
124 14 bool CoilCoolingDXMultiSpeed_Impl::applyLatentDegradationtoSpeedsGreaterthan1() const {
125
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_MultiSpeedFields::ApplyLatentDegradationtoSpeedsGreaterthan1, true);
126
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
127
3/3
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
✓ Branch 7 taken 14 times.
28 return openstudio::istringEqual(value.get(), "Yes");
128 14 }
129
130 ✗ bool CoilCoolingDXMultiSpeed_Impl::isApplyLatentDegradationtoSpeedsGreaterthan1Defaulted() const {
131 ✗ return isEmpty(OS_Coil_Cooling_DX_MultiSpeedFields::ApplyLatentDegradationtoSpeedsGreaterthan1);
132 }
133
134 14 double CoilCoolingDXMultiSpeed_Impl::crankcaseHeaterCapacity() const {
135
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_MultiSpeedFields::CrankcaseHeaterCapacity, true);
136
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
137
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
138 }
139
140 14 double CoilCoolingDXMultiSpeed_Impl::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const {
141 boost::optional<double> value =
142
1/1
✓ Branch 1 taken 14 times.
14 getDouble(OS_Coil_Cooling_DX_MultiSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation, true);
143
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
144
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
145 }
146
147 14 double CoilCoolingDXMultiSpeed_Impl::basinHeaterCapacity() const {
148
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_MultiSpeedFields::BasinHeaterCapacity, true);
149
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
150
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
151 }
152
153 14 double CoilCoolingDXMultiSpeed_Impl::basinHeaterSetpointTemperature() const {
154
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_MultiSpeedFields::BasinHeaterSetpointTemperature, true);
155
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
156
1/1
✓ Branch 1 taken 14 times.
28 return value.get();
157 }
158
159 14 boost::optional<Schedule> CoilCoolingDXMultiSpeed_Impl::basinHeaterOperatingSchedule() const {
160
2/2
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
14 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Coil_Cooling_DX_MultiSpeedFields::BasinHeaterOperatingSchedule);
161 }
162
163 14 std::string CoilCoolingDXMultiSpeed_Impl::fuelType() const {
164
1/1
✓ Branch 1 taken 14 times.
14 boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_MultiSpeedFields::FuelType, true);
165
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 14 times.
✗ Branch 4 not taken.
14 OS_ASSERT(value);
166
2/2
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
28 return value.get();
167 14 }
168
169 1 bool CoilCoolingDXMultiSpeed_Impl::setAvailabilitySchedule(Schedule& schedule) {
170 bool result =
171
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
4 setSchedule(OS_Coil_Cooling_DX_MultiSpeedFields::AvailabilitySchedule, "CoilCoolingDXMultiSpeed", "Availability Schedule", schedule);
172 1 return result;
173 }
174
175 ✗ void CoilCoolingDXMultiSpeed_Impl::resetAvailabilitySchedule() {
176 ✗ bool result = setString(OS_Coil_Cooling_DX_MultiSpeedFields::AvailabilitySchedule, "");
177 ✗ OS_ASSERT(result);
178 ✗ }
179
180 27 bool CoilCoolingDXMultiSpeed_Impl::setCondenserType(const std::string& condenserType) {
181 27 bool result = setString(OS_Coil_Cooling_DX_MultiSpeedFields::CondenserType, condenserType);
182 27 return result;
183 }
184
185 27 bool CoilCoolingDXMultiSpeed_Impl::setApplyPartLoadFractiontoSpeedsGreaterthan1(bool applyPartLoadFractiontoSpeedsGreaterthan1) {
186
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 27 times.
27 if (applyPartLoadFractiontoSpeedsGreaterthan1) {
187 ✗ return setString(OS_Coil_Cooling_DX_MultiSpeedFields::ApplyPartLoadFractiontoSpeedsGreaterthan1, "Yes");
188 } else {
189
2/2
✓ Branch 1 taken 27 times.
✓ Branch 4 taken 27 times.
81 return setString(OS_Coil_Cooling_DX_MultiSpeedFields::ApplyPartLoadFractiontoSpeedsGreaterthan1, "No");
190 ;
191 }
192 }
193
194 1 bool CoilCoolingDXMultiSpeed_Impl::setApplyLatentDegradationtoSpeedsGreaterthan1(bool applyLatentDegradationtoSpeedsGreaterthan1) {
195
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (applyLatentDegradationtoSpeedsGreaterthan1) {
196
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
3 return setString(OS_Coil_Cooling_DX_MultiSpeedFields::ApplyLatentDegradationtoSpeedsGreaterthan1, "Yes");
197 } else {
198 ✗ return setString(OS_Coil_Cooling_DX_MultiSpeedFields::ApplyLatentDegradationtoSpeedsGreaterthan1, "No");
199 ;
200 }
201 }
202
203 ✗ void CoilCoolingDXMultiSpeed_Impl::resetApplyLatentDegradationtoSpeedsGreaterthan1() {
204 ✗ bool result = setString(OS_Coil_Cooling_DX_MultiSpeedFields::ApplyLatentDegradationtoSpeedsGreaterthan1, "");
205 ✗ OS_ASSERT(result);
206 ✗ }
207
208 27 bool CoilCoolingDXMultiSpeed_Impl::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) {
209 27 bool result = setDouble(OS_Coil_Cooling_DX_MultiSpeedFields::CrankcaseHeaterCapacity, crankcaseHeaterCapacity);
210 27 return result;
211 }
212
213 27 bool CoilCoolingDXMultiSpeed_Impl::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(
214 double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) {
215 27 bool result = setDouble(OS_Coil_Cooling_DX_MultiSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation,
216 maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
217 27 return result;
218 }
219
220 27 bool CoilCoolingDXMultiSpeed_Impl::setBasinHeaterCapacity(double basinHeaterCapacity) {
221 27 bool result = setDouble(OS_Coil_Cooling_DX_MultiSpeedFields::BasinHeaterCapacity, basinHeaterCapacity);
222 27 return result;
223 }
224
225 27 bool CoilCoolingDXMultiSpeed_Impl::setBasinHeaterSetpointTemperature(double basinHeaterSetpointTemperature) {
226 27 bool result = setDouble(OS_Coil_Cooling_DX_MultiSpeedFields::BasinHeaterSetpointTemperature, basinHeaterSetpointTemperature);
227 27 return result;
228 }
229
230 1 bool CoilCoolingDXMultiSpeed_Impl::setBasinHeaterOperatingSchedule(Schedule& schedule) {
231
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
4 bool result = setSchedule(OS_Coil_Cooling_DX_MultiSpeedFields::BasinHeaterOperatingSchedule, "CoilCoolingDXMultiSpeed",
232 "Basin Heater Operating Schedule", schedule);
233 1 return result;
234 }
235
236 ✗ void CoilCoolingDXMultiSpeed_Impl::resetBasinHeaterOperatingSchedule() {
237 ✗ bool result = setString(OS_Coil_Cooling_DX_MultiSpeedFields::BasinHeaterOperatingSchedule, "");
238 ✗ OS_ASSERT(result);
239 ✗ }
240
241 27 bool CoilCoolingDXMultiSpeed_Impl::setFuelType(const std::string& fuelType) {
242 27 bool result = setString(OS_Coil_Cooling_DX_MultiSpeedFields::FuelType, fuelType);
243 27 return result;
244 }
245
246 16 double CoilCoolingDXMultiSpeed_Impl::minimumOutdoorDryBulbTemperatureforCompressorOperation() const {
247
1/1
✓ Branch 1 taken 16 times.
16 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_MultiSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation, true);
248
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 16 times.
✗ Branch 4 not taken.
16 OS_ASSERT(value);
249
1/1
✓ Branch 1 taken 16 times.
32 return value.get();
250 }
251
252 29 bool CoilCoolingDXMultiSpeed_Impl::setMinimumOutdoorDryBulbTemperatureforCompressorOperation(
253 double minimumOutdoorDryBulbTemperatureforCompressorOperation) {
254 29 bool result = setDouble(OS_Coil_Cooling_DX_MultiSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation,
255 minimumOutdoorDryBulbTemperatureforCompressorOperation);
256 29 return result;
257 }
258
259 14 boost::optional<Curve> CoilCoolingDXMultiSpeed_Impl::crankcaseHeaterCapacityFunctionofTemperatureCurve() const {
260
1/1
✓ Branch 1 taken 14 times.
28 return getObject<ModelObject>().getModelObjectTarget<Curve>(
261
1/1
✓ Branch 1 taken 14 times.
28 OS_Coil_Cooling_DX_MultiSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName);
262 }
263
264 1 bool CoilCoolingDXMultiSpeed_Impl::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) {
265
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 const bool result = setPointer(OS_Coil_Cooling_DX_MultiSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, curve.handle());
266 1 return result;
267 }
268
269 ✗ void CoilCoolingDXMultiSpeed_Impl::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() {
270 ✗ const bool result = setString(OS_Coil_Cooling_DX_MultiSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, "");
271 ✗ OS_ASSERT(result);
272 ✗ }
273
274 17 unsigned CoilCoolingDXMultiSpeed_Impl::inletPort() const {
275 17 return OS_Coil_Cooling_DX_MultiSpeedFields::AirInletNode;
276 }
277
278 17 unsigned CoilCoolingDXMultiSpeed_Impl::outletPort() const {
279 17 return OS_Coil_Cooling_DX_MultiSpeedFields::AirOutletNode;
280 }
281
282 3 ModelObject CoilCoolingDXMultiSpeed_Impl::clone(Model model) const {
283
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
3 auto t_clone = StraightComponent_Impl::clone(model).cast<CoilCoolingDXMultiSpeed>();
284
285 // Deal with the stages: we want them cloned, so first clear and then clone + assign each
286
1/1
✓ Branch 1 taken 3 times.
3 t_clone.removeAllStages();
287
3/3
✓ Branch 1 taken 3 times.
✓ Branch 8 taken 4 times.
✓ Branch 9 taken 3 times.
7 for (const auto& stage : stages()) {
288
3/3
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
4 auto stageClone = stage.clone(model).cast<CoilCoolingDXMultiSpeedStageData>();
289
1/1
✓ Branch 1 taken 4 times.
4 t_clone.addStage(stageClone);
290 7 }
291 6 return std::move(t_clone);
292 3 }
293
294 15 std::vector<ModelObject> CoilCoolingDXMultiSpeed_Impl::children() const {
295
2/2
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
15 std::vector<ModelObject> result = subsetCastVector<ModelObject>(stages());
296 std::vector<AirflowNetworkEquivalentDuct> myAFNItems =
297
3/3
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
✓ Branch 7 taken 15 times.
15 getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
298
1/1
✓ Branch 5 taken 15 times.
15 result.insert(result.end(), myAFNItems.begin(), myAFNItems.end());
299 30 return result;
300 15 }
301
302 24 unsigned CoilCoolingDXMultiSpeed_Impl::numberOfStages() const {
303 24 return numExtensibleGroups();
304 }
305
306 68 std::vector<CoilCoolingDXMultiSpeedStageData> CoilCoolingDXMultiSpeed_Impl::stages() const {
307 68 std::vector<CoilCoolingDXMultiSpeedStageData> result;
308
3/3
✓ Branch 1 taken 68 times.
✓ Branch 8 taken 134 times.
✓ Branch 9 taken 68 times.
202 for (const auto& group : extensibleGroups()) {
309
3/4
✓ Branch 1 taken 134 times.
✓ Branch 4 taken 134 times.
✓ Branch 8 taken 134 times.
✗ Branch 9 not taken.
268 if (auto target = group.cast<WorkspaceExtensibleGroup>().getTarget(OS_Coil_Cooling_DX_MultiSpeedExtensibleFields::Stage)) {
310
3/4
✓ Branch 1 taken 134 times.
✓ Branch 4 taken 134 times.
✓ Branch 6 taken 134 times.
✗ Branch 7 not taken.
268 if (auto stage = target->optionalCast<CoilCoolingDXMultiSpeedStageData>()) {
311
2/2
✓ Branch 1 taken 134 times.
✓ Branch 4 taken 134 times.
134 result.push_back(stage.get());
312 134 }
313 134 }
314 68 }
315 68 return result;
316 ✗ }
317
318 7 boost::optional<unsigned> CoilCoolingDXMultiSpeed_Impl::stageIndex(const CoilCoolingDXMultiSpeedStageData& stage) const {
319
320 7 boost::optional<unsigned> result;
321
322
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 auto egs = castVector<WorkspaceExtensibleGroup>(extensibleGroups());
323
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 auto h = openstudio::toString(stage.handle());
324
1/1
✓ Branch 3 taken 7 times.
7 auto it = std::find_if(egs.begin(), egs.end(), [&](const WorkspaceExtensibleGroup& eg) {
325
2/2
✓ Branch 1 taken 21 times.
✓ Branch 4 taken 21 times.
21 return (eg.getField(OS_Coil_Cooling_DX_MultiSpeedExtensibleFields::Stage).get() == h);
326 });
327
328 // If found, we compute the index by using std::distance between the start of vector and the iterator returned by std::find_if
329
2/2
✓ Branch 2 taken 6 times.
✓ Branch 3 taken 1 time.
7 if (it != egs.end()) {
330
1/1
✓ Branch 2 taken 6 times.
12 result = std::distance(egs.begin(), it) + 1;
331 }
332
333 7 return result;
334 7 }
335
336 45 bool CoilCoolingDXMultiSpeed_Impl::addStage(const CoilCoolingDXMultiSpeedStageData& stage) {
337
2/3
✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 45 times.
90 if (auto _c = stage.parentCoil()) {
338 ✗ if (this->handle() == _c->handle()) {
339 ✗ return true; // already the case
340 } else {
341 ✗ LOG(Error, "For " << briefDescription() << " cannot add " << stage.briefDescription()
342 << " since this Stage is already in use by another coil ('" << _c->nameString() << "').");
343 ✗ return false;
344 }
345 45 }
346
3/3
✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
✓ Branch 7 taken 45 times.
45 auto group = getObject<ModelObject>().pushExtensibleGroup().cast<WorkspaceExtensibleGroup>();
347
3/3
✓ Branch 1 taken 45 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 43 times.
45 if (group.empty()) {
348
11/11
✓ 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 19 taken 2 times.
✓ Branch 22 taken 2 times.
✓ Branch 26 taken 2 times.
✓ Branch 29 taken 2 times.
✓ Branch 32 taken 2 times.
2 LOG(Error, "You have reached the maximum number of stages (=" << numberOfStages() << "), occurred for " << briefDescription() << ".");
349 2 return false;
350 }
351
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 bool result = group.setPointer(OS_Coil_Cooling_DX_MultiSpeedExtensibleFields::Stage, stage.handle());
352
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 42 times.
43 if (!result) {
353 // Something went wrong, so erase the new extensible group
354
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
1 getObject<ModelObject>().eraseExtensibleGroup(group.groupIndex());
355 }
356 43 return result;
357 45 }
358
359 1 bool CoilCoolingDXMultiSpeed_Impl::setStageIndex(const CoilCoolingDXMultiSpeedStageData& stage, unsigned index) {
360
1/1
✓ Branch 1 taken 1 time.
1 boost::optional<unsigned> idx = stageIndex(stage);
361
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (!idx) {
362 ✗ LOG(Warn, "For " << briefDescription() << " cannot set the index of stage " << stage.briefDescription() << " since it is not part of it.");
363 ✗ return false;
364 }
365
366 // TODO: we could just set via string instead of doing a ton of typechecking below...
367
368
1/1
✓ Branch 1 taken 1 time.
1 std::vector<CoilCoolingDXMultiSpeedStageData> stageVector = stages();
369
370
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
1 if (index > stageVector.size()) {
371 ✗ LOG(Warn, "Requested a stage index of " << index << " to be assigned to " << stage.briefDescription() << ", but " << briefDescription()
372 << " only has " << stageVector.size() << " stages, resetting to that.");
373 ✗ index = stageVector.size();
374
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 } else if (index < 1) {
375 ✗ LOG(Warn, "Requested a stage index of " << index << " < 1 to be assigned to " << stage.briefDescription() << ", resetting to 1");
376 ✗ index = 1;
377 }
378
379
2/2
✓ Branch 1 taken 1 time.
✓ Branch 8 taken 1 time.
1 stageVector.erase(stageVector.begin() + idx.get() - 1); // stageIndex is 1-indexed, and vector is 0-indexed
380
381
1/1
✓ Branch 4 taken 1 time.
1 stageVector.insert(stageVector.begin() + (index - 1), stage);
382
383
1/1
✓ Branch 1 taken 1 time.
1 return setStages(stageVector);
384 1 }
385
386 ✗ bool CoilCoolingDXMultiSpeed_Impl::addStage(const CoilCoolingDXMultiSpeedStageData& stage, unsigned index) {
387 ✗ bool ok = addStage(stage);
388 ✗ if (!ok) {
389 ✗ return false;
390 }
391 ✗ ok = setStageIndex(stage, index);
392 ✗ return ok;
393 }
394
395 4 bool CoilCoolingDXMultiSpeed_Impl::setStages(const std::vector<CoilCoolingDXMultiSpeedStageData>& stages) {
396 // Clear the extensible groups, and redo them
397 4 bool ok = true;
398
1/1
✓ Branch 1 taken 4 times.
4 clearExtensibleGroups();
399
2/2
✓ Branch 4 taken 13 times.
✓ Branch 5 taken 4 times.
17 for (const CoilCoolingDXMultiSpeedStageData& s : stages) {
400
1/1
✓ Branch 1 taken 13 times.
13 ok &= addStage(s);
401 }
402 4 return ok;
403 }
404
405 6 void CoilCoolingDXMultiSpeed_Impl::removeAllStages() {
406
1/1
✓ Branch 1 taken 6 times.
6 clearExtensibleGroups();
407 6 }
408
409 2 bool CoilCoolingDXMultiSpeed_Impl::removeStage(const CoilCoolingDXMultiSpeedStageData& stage) {
410
1/1
✓ Branch 1 taken 2 times.
2 boost::optional<unsigned> idx = stageIndex(stage);
411
2/2
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 1 time.
2 if (!idx) {
412
11/11
✓ 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 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 27 taken 1 time.
✓ Branch 30 taken 1 time.
✓ Branch 33 taken 1 time.
1 LOG(Warn, "For " << briefDescription() << " cannot remove stage " << stage.briefDescription() << " since it is not part of it.");
413 1 return false;
414 }
415
416
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 return removeStage(idx.get());
417 }
418
419 2 bool CoilCoolingDXMultiSpeed_Impl::removeStage(unsigned index) {
420 2 bool result = false;
421
3/6
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 2 times.
✗ Branch 6 not taken.
2 if ((index > 0) && (index <= numberOfStages())) {
422
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 getObject<ModelObject>().eraseExtensibleGroup(index - 1);
423 2 result = true;
424 }
425 2 return result;
426 }
427
428 2 boost::optional<HVACComponent> CoilCoolingDXMultiSpeed_Impl::containingHVACComponent() const {
429 // AirLoopHVACUnitarySystem
430 {
431
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 auto systems = this->model().getConcreteModelObjects<AirLoopHVACUnitarySystem>();
432
433
2/2
✓ Branch 5 taken 1 time.
✓ Branch 6 taken 1 time.
2 for (auto const& system : systems) {
434
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 if (auto coolingCoil = system.coolingCoil()) {
435
5/6
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 12 taken 1 time.
✗ Branch 13 not taken.
1 if (coolingCoil->handle() == this->handle()) {
436
1/1
✓ Branch 1 taken 1 time.
1 return system;
437 }
438 1 }
439 }
440 2 }
441
442 // AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed
443 {
444
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 auto systems = this->model().getConcreteModelObjects<AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed>();
445
446
1/2
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
1 for (const auto& system : systems) {
447 ✗ auto coolingCoil = system.coolingCoil();
448 ✗ if (coolingCoil.handle() == this->handle()) {
449 ✗ return system;
450 }
451 ✗ }
452 1 }
453 1 return boost::none;
454 }
455
456 ✗ bool CoilCoolingDXMultiSpeed_Impl::addToNode(Node& /*node*/) {
457 ✗ return false;
458 }
459
460 ✗ AirflowNetworkEquivalentDuct CoilCoolingDXMultiSpeed_Impl::getAirflowNetworkEquivalentDuct(double length, double diameter) {
461 ✗ boost::optional<AirflowNetworkEquivalentDuct> opt = airflowNetworkEquivalentDuct();
462 ✗ if (opt) {
463 ✗ if (opt->airPathLength() != length) {
464 ✗ opt->setAirPathLength(length);
465 }
466 ✗ if (opt->airPathHydraulicDiameter() != diameter) {
467 ✗ opt->setAirPathHydraulicDiameter(diameter);
468 }
469 ✗ return opt.get();
470 }
471 ✗ return AirflowNetworkEquivalentDuct(model(), length, diameter, handle());
472 ✗ }
473
474 ✗ boost::optional<AirflowNetworkEquivalentDuct> CoilCoolingDXMultiSpeed_Impl::airflowNetworkEquivalentDuct() const {
475 std::vector<AirflowNetworkEquivalentDuct> myAFN =
476 ✗ getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
477 ✗ auto count = myAFN.size();
478 ✗ if (count == 1) {
479 ✗ return myAFN[0];
480 ✗ } else if (count > 1) {
481 ✗ LOG(Warn, briefDescription() << " has more than one AirflowNetwork EquivalentDuct attached, returning first.");
482 ✗ return myAFN[0];
483 }
484 ✗ return boost::none;
485 ✗ }
486
487 ✗ ComponentType CoilCoolingDXMultiSpeed_Impl::componentType() const {
488 ✗ return ComponentType::Cooling;
489 }
490
491 ✗ std::vector<FuelType> CoilCoolingDXMultiSpeed_Impl::coolingFuelTypes() const {
492 ✗ return {FuelType::Electricity};
493 }
494
495 ✗ std::vector<FuelType> CoilCoolingDXMultiSpeed_Impl::heatingFuelTypes() const {
496 ✗ return {};
497 }
498
499 ✗ std::vector<AppGFuelType> CoilCoolingDXMultiSpeed_Impl::appGHeatingFuelTypes() const {
500 ✗ return {};
501 }
502
503 } // namespace detail
504
505 26 CoilCoolingDXMultiSpeed::CoilCoolingDXMultiSpeed(const Model& model) : StraightComponent(CoilCoolingDXMultiSpeed::iddObjectType(), model) {
506
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 26 times.
✗ Branch 5 not taken.
26 OS_ASSERT(getImpl<detail::CoilCoolingDXMultiSpeed_Impl>());
507
508 26 bool ok = true;
509
2/2
✓ Branch 1 taken 26 times.
✓ Branch 4 taken 26 times.
26 ok = setCondenserType("AirCooled");
510
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 26 times.
✗ Branch 3 not taken.
26 OS_ASSERT(ok);
511
1/1
✓ Branch 1 taken 26 times.
26 ok = setApplyPartLoadFractiontoSpeedsGreaterthan1(false);
512
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 26 times.
✗ Branch 3 not taken.
26 OS_ASSERT(ok);
513
1/1
✓ Branch 1 taken 26 times.
26 ok = setCrankcaseHeaterCapacity(0.0);
514
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 26 times.
✗ Branch 3 not taken.
26 OS_ASSERT(ok);
515
1/1
✓ Branch 1 taken 26 times.
26 ok = setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(10.0);
516
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 26 times.
✗ Branch 3 not taken.
26 OS_ASSERT(ok);
517
1/1
✓ Branch 1 taken 26 times.
26 ok = setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25.0); // Per E+ IDD default
518
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 26 times.
✗ Branch 3 not taken.
26 OS_ASSERT(ok);
519
1/1
✓ Branch 1 taken 26 times.
26 ok = setBasinHeaterCapacity(0.0);
520
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 26 times.
✗ Branch 3 not taken.
26 OS_ASSERT(ok);
521
1/1
✓ Branch 1 taken 26 times.
26 ok = setBasinHeaterSetpointTemperature(2.0);
522
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 26 times.
✗ Branch 3 not taken.
26 OS_ASSERT(ok);
523
2/2
✓ Branch 1 taken 26 times.
✓ Branch 4 taken 26 times.
26 ok = setFuelType("NaturalGas");
524
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 26 times.
✗ Branch 3 not taken.
26 OS_ASSERT(ok);
525 26 }
526
527 7898 IddObjectType CoilCoolingDXMultiSpeed::iddObjectType() {
528
1/1
✓ Branch 1 taken 7898 times.
7898 return {IddObjectType::OS_Coil_Cooling_DX_MultiSpeed};
529 }
530
531 ✗ std::vector<std::string> CoilCoolingDXMultiSpeed::condenserTypeValues() {
532 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Coil_Cooling_DX_MultiSpeedFields::CondenserType);
533 }
534
535 ✗ std::vector<std::string> CoilCoolingDXMultiSpeed::fuelTypeValues() {
536 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Coil_Cooling_DX_MultiSpeedFields::FuelType);
537 }
538
539 14 boost::optional<Schedule> CoilCoolingDXMultiSpeed::availabilitySchedule() const {
540
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->availabilitySchedule();
541 }
542
543 14 std::string CoilCoolingDXMultiSpeed::condenserType() const {
544
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->condenserType();
545 }
546
547 14 bool CoilCoolingDXMultiSpeed::applyPartLoadFractiontoSpeedsGreaterthan1() const {
548
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->applyPartLoadFractiontoSpeedsGreaterthan1();
549 }
550
551 14 bool CoilCoolingDXMultiSpeed::applyLatentDegradationtoSpeedsGreaterthan1() const {
552
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->applyLatentDegradationtoSpeedsGreaterthan1();
553 }
554
555 ✗ bool CoilCoolingDXMultiSpeed::isApplyLatentDegradationtoSpeedsGreaterthan1Defaulted() const {
556 ✗ return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->isApplyLatentDegradationtoSpeedsGreaterthan1Defaulted();
557 }
558
559 14 double CoilCoolingDXMultiSpeed::crankcaseHeaterCapacity() const {
560
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->crankcaseHeaterCapacity();
561 }
562
563 14 double CoilCoolingDXMultiSpeed::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const {
564
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation();
565 }
566
567 14 double CoilCoolingDXMultiSpeed::basinHeaterCapacity() const {
568
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->basinHeaterCapacity();
569 }
570
571 14 double CoilCoolingDXMultiSpeed::basinHeaterSetpointTemperature() const {
572
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->basinHeaterSetpointTemperature();
573 }
574
575 14 boost::optional<Schedule> CoilCoolingDXMultiSpeed::basinHeaterOperatingSchedule() const {
576
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->basinHeaterOperatingSchedule();
577 }
578
579 14 std::string CoilCoolingDXMultiSpeed::fuelType() const {
580
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->fuelType();
581 }
582
583 1 bool CoilCoolingDXMultiSpeed::setAvailabilitySchedule(Schedule& schedule) {
584
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setAvailabilitySchedule(schedule);
585 }
586
587 ✗ void CoilCoolingDXMultiSpeed::resetAvailabilitySchedule() {
588 ✗ getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->resetAvailabilitySchedule();
589 ✗ }
590
591 27 bool CoilCoolingDXMultiSpeed::setCondenserType(const std::string& condenserType) {
592
1/1
✓ Branch 3 taken 27 times.
27 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setCondenserType(condenserType);
593 }
594
595 27 bool CoilCoolingDXMultiSpeed::setApplyPartLoadFractiontoSpeedsGreaterthan1(bool applyPartLoadFractiontoSpeedsGreaterthan1) {
596
1/1
✓ Branch 3 taken 27 times.
27 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setApplyPartLoadFractiontoSpeedsGreaterthan1(applyPartLoadFractiontoSpeedsGreaterthan1);
597 }
598
599 1 bool CoilCoolingDXMultiSpeed::setApplyLatentDegradationtoSpeedsGreaterthan1(bool applyLatentDegradationtoSpeedsGreaterthan1) {
600
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setApplyLatentDegradationtoSpeedsGreaterthan1(applyLatentDegradationtoSpeedsGreaterthan1);
601 }
602
603 ✗ void CoilCoolingDXMultiSpeed::resetApplyLatentDegradationtoSpeedsGreaterthan1() {
604 ✗ getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->resetApplyLatentDegradationtoSpeedsGreaterthan1();
605 ✗ }
606
607 27 bool CoilCoolingDXMultiSpeed::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) {
608
1/1
✓ Branch 3 taken 27 times.
27 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setCrankcaseHeaterCapacity(crankcaseHeaterCapacity);
609 }
610
611 27 bool CoilCoolingDXMultiSpeed::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(
612 double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) {
613
1/1
✓ Branch 3 taken 27 times.
54 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(
614 54 maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
615 }
616
617 27 bool CoilCoolingDXMultiSpeed::setBasinHeaterCapacity(double basinHeaterCapacity) {
618
1/1
✓ Branch 3 taken 27 times.
27 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setBasinHeaterCapacity(basinHeaterCapacity);
619 }
620
621 27 bool CoilCoolingDXMultiSpeed::setBasinHeaterSetpointTemperature(double basinHeaterSetpointTemperature) {
622
1/1
✓ Branch 3 taken 27 times.
27 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setBasinHeaterSetpointTemperature(basinHeaterSetpointTemperature);
623 }
624
625 1 bool CoilCoolingDXMultiSpeed::setBasinHeaterOperatingSchedule(Schedule& schedule) {
626
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setBasinHeaterOperatingSchedule(schedule);
627 }
628
629 ✗ void CoilCoolingDXMultiSpeed::resetBasinHeaterOperatingSchedule() {
630 ✗ getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->resetBasinHeaterOperatingSchedule();
631 ✗ }
632
633 27 bool CoilCoolingDXMultiSpeed::setFuelType(const std::string& fuelType) {
634
1/1
✓ Branch 3 taken 27 times.
27 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setFuelType(fuelType);
635 }
636
637 16 double CoilCoolingDXMultiSpeed::minimumOutdoorDryBulbTemperatureforCompressorOperation() const {
638
1/1
✓ Branch 3 taken 16 times.
16 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->minimumOutdoorDryBulbTemperatureforCompressorOperation();
639 }
640
641 29 bool CoilCoolingDXMultiSpeed::setMinimumOutdoorDryBulbTemperatureforCompressorOperation(
642 double minimumOutdoorDryBulbTemperatureforCompressorOperation) {
643
1/1
✓ Branch 3 taken 29 times.
58 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setMinimumOutdoorDryBulbTemperatureforCompressorOperation(
644 58 minimumOutdoorDryBulbTemperatureforCompressorOperation);
645 }
646
647 14 boost::optional<Curve> CoilCoolingDXMultiSpeed::crankcaseHeaterCapacityFunctionofTemperatureCurve() const {
648
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->crankcaseHeaterCapacityFunctionofTemperatureCurve();
649 }
650
651 1 bool CoilCoolingDXMultiSpeed::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) {
652
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setCrankcaseHeaterCapacityFunctionofTemperatureCurve(curve);
653 }
654
655 ✗ void CoilCoolingDXMultiSpeed::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() {
656 ✗ getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->resetCrankcaseHeaterCapacityFunctionofTemperatureCurve();
657 ✗ }
658
659 20 unsigned CoilCoolingDXMultiSpeed::numberOfStages() const {
660
1/1
✓ Branch 3 taken 20 times.
20 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->numberOfStages();
661 }
662
663 4 boost::optional<unsigned> CoilCoolingDXMultiSpeed::stageIndex(const CoilCoolingDXMultiSpeedStageData& stage) const {
664
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->stageIndex(stage);
665 }
666
667 49 std::vector<CoilCoolingDXMultiSpeedStageData> CoilCoolingDXMultiSpeed::stages() const {
668
1/1
✓ Branch 3 taken 49 times.
49 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->stages();
669 }
670
671 32 bool CoilCoolingDXMultiSpeed::addStage(const CoilCoolingDXMultiSpeedStageData& stage) {
672
1/1
✓ Branch 3 taken 32 times.
32 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->addStage(stage);
673 }
674
675 ✗ bool CoilCoolingDXMultiSpeed::addStage(const CoilCoolingDXMultiSpeedStageData& stage, unsigned index) {
676 ✗ return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->addStage(stage, index);
677 }
678
679 1 bool CoilCoolingDXMultiSpeed::setStageIndex(const CoilCoolingDXMultiSpeedStageData& stage, unsigned index) {
680
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setStageIndex(stage, index);
681 }
682
683 3 bool CoilCoolingDXMultiSpeed::setStages(const std::vector<CoilCoolingDXMultiSpeedStageData>& stages) {
684
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->setStages(stages);
685 }
686
687 6 void CoilCoolingDXMultiSpeed::removeAllStages() {
688
1/1
✓ Branch 3 taken 6 times.
6 getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->removeAllStages();
689 6 }
690
691 2 bool CoilCoolingDXMultiSpeed::removeStage(const CoilCoolingDXMultiSpeedStageData& stage) {
692
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->removeStage(stage);
693 }
694
695 1 bool CoilCoolingDXMultiSpeed::removeStage(unsigned index) {
696
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->removeStage(index);
697 }
698
699 ✗ AirflowNetworkEquivalentDuct CoilCoolingDXMultiSpeed::getAirflowNetworkEquivalentDuct(double length, double diameter) {
700 ✗ return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->getAirflowNetworkEquivalentDuct(length, diameter);
701 }
702
703 ✗ boost::optional<AirflowNetworkEquivalentDuct> CoilCoolingDXMultiSpeed::airflowNetworkEquivalentDuct() const {
704 ✗ return getImpl<detail::CoilCoolingDXMultiSpeed_Impl>()->airflowNetworkEquivalentDuct();
705 }
706
707 /// @cond
708
1/1
✓ Branch 3 taken 36 times.
36 CoilCoolingDXMultiSpeed::CoilCoolingDXMultiSpeed(std::shared_ptr<detail::CoilCoolingDXMultiSpeed_Impl> impl) : StraightComponent(std::move(impl)) {}
709 /// @endcond
710
711 } // namespace model
712 } // namespace openstudio
713