GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 72.8% 455 / 0 / 625
Functions: 82.1% 115 / 0 / 140
Branches: 45.7% 325 / 0 / 711

src/model/CoilCoolingDXVariableSpeed.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 "CoilCoolingDXVariableSpeed.hpp"
7 #include "CoilCoolingDXVariableSpeed_Impl.hpp"
8
9 #include "Curve.hpp"
10 #include "Curve_Impl.hpp"
11 #include "CurveQuadratic.hpp"
12 #include "CoilCoolingDXVariableSpeedSpeedData.hpp"
13 #include "CoilCoolingDXVariableSpeedSpeedData_Impl.hpp"
14 // #include "WaterStorageTank.hpp"
15 // #include "WaterStorageTank_Impl.hpp"
16 #include "ModelObjectList.hpp"
17 #include "ModelObjectList_Impl.hpp"
18 #include "AirLoopHVACOutdoorAirSystem.hpp"
19 #include "AirLoopHVACOutdoorAirSystem_Impl.hpp"
20 #include "AirLoopHVACUnitarySystem.hpp"
21 #include "AirLoopHVACUnitarySystem_Impl.hpp"
22 #include "AirLoopHVACUnitaryHeatPumpAirToAir.hpp"
23 #include "AirLoopHVACUnitaryHeatPumpAirToAir_Impl.hpp"
24 #include "ZoneHVACPackagedTerminalAirConditioner.hpp"
25 #include "ZoneHVACPackagedTerminalAirConditioner_Impl.hpp"
26 #include "ZoneHVACPackagedTerminalHeatPump.hpp"
27 #include "ZoneHVACPackagedTerminalHeatPump_Impl.hpp"
28 #include "CoilSystemCoolingDXHeatExchangerAssisted.hpp"
29 #include "CoilSystemCoolingDXHeatExchangerAssisted_Impl.hpp"
30 #include "CoilSystemIntegratedHeatPumpAirSource.hpp"
31 #include "CoilSystemIntegratedHeatPumpAirSource_Impl.hpp"
32 #include "AirflowNetworkEquivalentDuct.hpp"
33 #include "AirflowNetworkEquivalentDuct_Impl.hpp"
34
35 #include "Model.hpp"
36 #include "Model_Impl.hpp"
37 #include "Node.hpp"
38 #include "AirLoopHVAC.hpp"
39 #include "Schedule.hpp"
40 #include "Schedule_Impl.hpp"
41 #include "ScheduleTypeLimits.hpp"
42 #include "ScheduleTypeRegistry.hpp"
43
44 #include <utilities/idd/IddFactory.hxx>
45 #include <utilities/idd/OS_Coil_Cooling_DX_VariableSpeed_FieldEnums.hxx>
46
47 #include <utilities/idd/IddEnums.hxx>
48 #include "../utilities/core/Assert.hpp"
49 #include "../utilities/data/DataEnums.hpp"
50 #include "../utilities/idf/WorkspaceExtensibleGroup.hpp"
51
52 namespace openstudio {
53 namespace model {
54
55 namespace detail {
56
57 54 CoilCoolingDXVariableSpeed_Impl::CoilCoolingDXVariableSpeed_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
58 54 : StraightComponent_Impl(idfObject, model, keepHandle) {
59
4/6
✓ Branch 1 taken 54 times.
✓ Branch 4 taken 54 times.
✓ Branch 7 taken 54 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 54 times.
✗ Branch 13 not taken.
54 OS_ASSERT(idfObject.iddObject().type() == CoilCoolingDXVariableSpeed::iddObjectType());
60 54 }
61
62 4 CoilCoolingDXVariableSpeed_Impl::CoilCoolingDXVariableSpeed_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
63 4 bool keepHandle)
64 4 : StraightComponent_Impl(other, model, keepHandle) {
65
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() == CoilCoolingDXVariableSpeed::iddObjectType());
66 4 }
67
68 31 CoilCoolingDXVariableSpeed_Impl::CoilCoolingDXVariableSpeed_Impl(const CoilCoolingDXVariableSpeed_Impl& other, Model_Impl* model, bool keepHandle)
69 31 : StraightComponent_Impl(other, model, keepHandle) {}
70
71 ✗ const std::vector<std::string>& CoilCoolingDXVariableSpeed_Impl::outputVariableNames() const {
72 static const std::vector<std::string> result{"Cooling Coil Electricity Rate",
73 "Cooling Coil Total Cooling Rate",
74 "Cooling Coil Sensible Cooling Rate",
75 "Cooling Coil Source Side Heat Transfer Rate",
76 "Cooling Coil Part Load Ratio",
77 "Cooling Coil Runtime Fraction",
78 "Cooling Coil Air Mass Flow Rate",
79 "Cooling Coil Air Inlet Temperature",
80 "Cooling Coil Air Inlet Humidity Ratio",
81 "Cooling Coil Air Outlet Temperature",
82 "Cooling Coil Air Outlet Humidity Ratio",
83 "Cooling Coil Upper Speed Level",
84 "Cooling Coil Neighboring Speed Levels Ratio",
85 "VSAirtoAirHP Recoverable Waste Heat",
86 "Cooling Coil Electricity Energy",
87 "Cooling Coil Total Cooling Energy",
88 "Cooling Coil Sensible Cooling Energy",
89 "Cooling Coil Latent Cooling Energy",
90 "Cooling Coil Source Side Heat Transfer Energy",
91 "Cooling Coil Crankcase Heater Electricity Rate",
92 "Cooling Coil Crankcase Heater Electricity Energy",
93 "Cooling Coil Condensate Volume Flow Rate",
94 "Cooling Coil Condensate Volume",
95 "Cooling Coil Condenser Inlet Temperature",
96 "Cooling Coil Evaporative Condenser Water Volume",
97 "Cooling Coil Evaporative Condenser Mains Water Volume",
98 "Cooling Coil Evaporative Condenser Pump Electricity Rate",
99 "Cooling Coil Evaporative Condenser Pump Electricity Energy",
100 "Cooling Coil Basin Heater Electricity Rate",
101 ✗ "Cooling Coil Basin Heater Electricity Energy"};
102 ✗ return result;
103 ✗ }
104
105 20 IddObjectType CoilCoolingDXVariableSpeed_Impl::iddObjectType() const {
106 20 return CoilCoolingDXVariableSpeed::iddObjectType();
107 }
108
109 ✗ std::vector<ScheduleTypeKey> CoilCoolingDXVariableSpeed_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
110 ✗ std::vector<ScheduleTypeKey> result;
111 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
112 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
113 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
114 ✗ if (std::find(b, e, OS_Coil_Cooling_DX_VariableSpeedFields::AvailabilityScheduleName) != e) {
115 ✗ result.push_back(ScheduleTypeKey("CoilCoolingDXVariableSpeed", "Availability Schedule"));
116 }
117 ✗ if (std::find(b, e, OS_Coil_Cooling_DX_VariableSpeedFields::BasinHeaterOperatingScheduleName) != e) {
118 ✗ result.push_back(ScheduleTypeKey("CoilCoolingDXVariableSpeed", "Basin Heater Operating"));
119 }
120 ✗ return result;
121 ✗ }
122
123 98 unsigned CoilCoolingDXVariableSpeed_Impl::inletPort() const {
124 98 return OS_Coil_Cooling_DX_VariableSpeedFields::IndoorAirInletNodeName;
125 }
126
127 24 unsigned CoilCoolingDXVariableSpeed_Impl::outletPort() const {
128 24 return OS_Coil_Cooling_DX_VariableSpeedFields::IndoorAirOutletNodeName;
129 }
130
131 10 boost::optional<Schedule> CoilCoolingDXVariableSpeed_Impl::optionalAvailabilitySchedule() const {
132
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Coil_Cooling_DX_VariableSpeedFields::AvailabilityScheduleName);
133 }
134
135 10 Schedule CoilCoolingDXVariableSpeed_Impl::availabilitySchedule() const {
136
1/1
✓ Branch 1 taken 10 times.
10 boost::optional<Schedule> value = optionalAvailabilitySchedule();
137
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 10 times.
10 if (!value) {
138 // it is an error if we get here, however we don't want to crash
139 // so we hook up to global always on schedule
140 ✗ LOG(Error, "Required availability schedule not set, using 'Always On' schedule");
141 ✗ value = this->model().alwaysOnDiscreteSchedule();
142 ✗ OS_ASSERT(value);
143 ✗ const_cast<CoilCoolingDXVariableSpeed_Impl*>(this)->setAvailabilitySchedule(*value);
144 ✗ value = optionalAvailabilitySchedule();
145 }
146
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 10 times.
✗ Branch 4 not taken.
10 OS_ASSERT(value);
147
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
20 return value.get();
148 10 }
149
150 8 int CoilCoolingDXVariableSpeed_Impl::nominalSpeedLevel() const {
151
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<int> value = getInt(OS_Coil_Cooling_DX_VariableSpeedFields::NominalSpeedLevel, true);
152
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
8 OS_ASSERT(value);
153
1/1
✓ Branch 1 taken 8 times.
16 return value.get();
154 }
155
156 1 boost::optional<double> CoilCoolingDXVariableSpeed_Impl::grossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel() const {
157 1 return getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::GrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel, true);
158 }
159
160 8 bool CoilCoolingDXVariableSpeed_Impl::isGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevelAutosized() const {
161 8 bool result = false;
162 boost::optional<std::string> value =
163
1/1
✓ Branch 1 taken 8 times.
8 getString(OS_Coil_Cooling_DX_VariableSpeedFields::GrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel, true);
164
1/2
✓ Branch 0 taken 8 times.
✗ Branch 1 not taken.
8 if (value) {
165
3/3
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
16 result = openstudio::istringEqual(value.get(), "autosize");
166 }
167 8 return result;
168 8 }
169
170 1 boost::optional<double> CoilCoolingDXVariableSpeed_Impl::ratedAirFlowRateAtSelectedNominalSpeedLevel() const {
171 1 return getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, true);
172 }
173
174 8 bool CoilCoolingDXVariableSpeed_Impl::isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized() const {
175 8 bool result = false;
176
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, true);
177
1/2
✓ Branch 0 taken 8 times.
✗ Branch 1 not taken.
8 if (value) {
178
3/3
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
16 result = openstudio::istringEqual(value.get(), "autosize");
179 }
180 8 return result;
181 8 }
182
183 8 double CoilCoolingDXVariableSpeed_Impl::nominalTimeforCondensatetoBeginLeavingtheCoil() const {
184
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::NominalTimeforCondensatetoBeginLeavingtheCoil, true);
185
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
8 OS_ASSERT(value);
186
1/1
✓ Branch 1 taken 8 times.
16 return value.get();
187 }
188
189 8 double CoilCoolingDXVariableSpeed_Impl::initialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity() const {
190 boost::optional<double> value =
191
1/1
✓ Branch 1 taken 8 times.
8 getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::InitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity, true);
192
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
8 OS_ASSERT(value);
193
1/1
✓ Branch 1 taken 8 times.
16 return value.get();
194 }
195
196 18 Curve CoilCoolingDXVariableSpeed_Impl::energyPartLoadFractionCurve() const {
197
1/1
✓ Branch 1 taken 18 times.
18 boost::optional<Curve> value = optionalEnergyPartLoadFractionCurve();
198
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 18 times.
18 if (!value) {
199 ✗ LOG_AND_THROW(briefDescription() << " does not have an Energy Part Load Fraction Curve attached.");
200 }
201
2/2
✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
36 return value.get();
202 18 }
203
204 // boost::optional<std::string> CoilCoolingDXVariableSpeed_Impl::condenserAirInletNodeName() const {
205 // return getString(OS_Coil_Cooling_DX_VariableSpeedFields::CondenserAirInletNodeName,true);
206 // }
207
208 8 std::string CoilCoolingDXVariableSpeed_Impl::condenserType() const {
209
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_VariableSpeedFields::CondenserType, true);
210
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
8 OS_ASSERT(value);
211
2/2
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
16 return value.get();
212 8 }
213
214 8 boost::optional<double> CoilCoolingDXVariableSpeed_Impl::evaporativeCondenserPumpRatedPowerConsumption() const {
215 8 return getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::EvaporativeCondenserPumpRatedPowerConsumption, true);
216 }
217
218 8 bool CoilCoolingDXVariableSpeed_Impl::isEvaporativeCondenserPumpRatedPowerConsumptionAutosized() const {
219 8 bool result = false;
220
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<std::string> value = getString(OS_Coil_Cooling_DX_VariableSpeedFields::EvaporativeCondenserPumpRatedPowerConsumption, true);
221
1/2
✓ Branch 0 taken 8 times.
✗ Branch 1 not taken.
8 if (value) {
222
3/3
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
16 result = openstudio::istringEqual(value.get(), "autosize");
223 }
224 8 return result;
225 8 }
226
227 8 double CoilCoolingDXVariableSpeed_Impl::crankcaseHeaterCapacity() const {
228
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::CrankcaseHeaterCapacity, true);
229
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
8 OS_ASSERT(value);
230
1/1
✓ Branch 1 taken 8 times.
16 return value.get();
231 }
232
233 8 double CoilCoolingDXVariableSpeed_Impl::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const {
234 boost::optional<double> value =
235
1/1
✓ Branch 1 taken 8 times.
8 getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation, true);
236
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
8 OS_ASSERT(value);
237
1/1
✓ Branch 1 taken 8 times.
16 return value.get();
238 }
239
240 // boost::optional<WaterStorageTank> CoilCoolingDXVariableSpeed_Impl::supplyWaterStorageTank() const {
241 // return getObject<ModelObject>().getModelObjectTarget<WaterStorageTank>(OS_Coil_Cooling_DX_VariableSpeedFields::SupplyWaterStorageTankName);
242 // }
243
244 // boost::optional<WaterStorageTank> CoilCoolingDXVariableSpeed_Impl::condensateCollectionWaterStorageTank() const {
245 // return getObject<ModelObject>().getModelObjectTarget<WaterStorageTank>(OS_Coil_Cooling_DX_VariableSpeedFields::CondensateCollectionWaterStorageTankName);
246 // }
247
248 8 double CoilCoolingDXVariableSpeed_Impl::basinHeaterCapacity() const {
249
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::BasinHeaterCapacity, true);
250
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
8 OS_ASSERT(value);
251
1/1
✓ Branch 1 taken 8 times.
16 return value.get();
252 }
253
254 8 double CoilCoolingDXVariableSpeed_Impl::basinHeaterSetpointTemperature() const {
255
1/1
✓ Branch 1 taken 8 times.
8 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::BasinHeaterSetpointTemperature, true);
256
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
8 OS_ASSERT(value);
257
1/1
✓ Branch 1 taken 8 times.
16 return value.get();
258 }
259
260 8 boost::optional<Schedule> CoilCoolingDXVariableSpeed_Impl::basinHeaterOperatingSchedule() const {
261
2/2
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
8 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Coil_Cooling_DX_VariableSpeedFields::BasinHeaterOperatingScheduleName);
262 }
263
264 51 bool CoilCoolingDXVariableSpeed_Impl::setAvailabilitySchedule(Schedule& schedule) {
265
3/3
✓ Branch 1 taken 51 times.
✓ Branch 4 taken 51 times.
✓ Branch 7 taken 51 times.
204 bool result = setSchedule(OS_Coil_Cooling_DX_VariableSpeedFields::AvailabilityScheduleName, "CoilCoolingDXVariableSpeed",
266 "Availability Schedule", schedule);
267 51 return result;
268 }
269
270 51 bool CoilCoolingDXVariableSpeed_Impl::setNominalSpeedLevel(int nominalSpeedLevel) {
271 51 bool result = setInt(OS_Coil_Cooling_DX_VariableSpeedFields::NominalSpeedLevel, nominalSpeedLevel);
272
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 51 times.
51 OS_ASSERT(result);
273 51 return result;
274 }
275
276 1 bool CoilCoolingDXVariableSpeed_Impl::setGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel(
277 boost::optional<double> grossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel) {
278 1 bool result(false);
279
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (grossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel) {
280 1 result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::GrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel,
281 1 grossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel.get());
282 }
283
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
284 1 return result;
285 }
286
287 50 void CoilCoolingDXVariableSpeed_Impl::autosizeGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel() {
288
2/2
✓ Branch 1 taken 50 times.
✓ Branch 4 taken 50 times.
100 bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::GrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel, "autosize");
289
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
50 OS_ASSERT(result);
290 50 }
291
292 1 bool CoilCoolingDXVariableSpeed_Impl::setRatedAirFlowRateAtSelectedNominalSpeedLevel(
293 boost::optional<double> ratedAirFlowRateAtSelectedNominalSpeedLevel) {
294 1 bool result(false);
295
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (ratedAirFlowRateAtSelectedNominalSpeedLevel) {
296 1 result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel,
297 1 ratedAirFlowRateAtSelectedNominalSpeedLevel.get());
298 }
299
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
300 1 return result;
301 }
302
303 50 void CoilCoolingDXVariableSpeed_Impl::autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel() {
304
2/2
✓ Branch 1 taken 50 times.
✓ Branch 4 taken 50 times.
100 bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::RatedAirFlowRateAtSelectedNominalSpeedLevel, "autosize");
305
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
50 OS_ASSERT(result);
306 50 }
307
308 51 bool CoilCoolingDXVariableSpeed_Impl::setNominalTimeforCondensatetoBeginLeavingtheCoil(double nominalTimeforCondensatetoBeginLeavingtheCoil) {
309 51 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::NominalTimeforCondensatetoBeginLeavingtheCoil,
310 nominalTimeforCondensatetoBeginLeavingtheCoil);
311 51 return result;
312 }
313
314 51 bool CoilCoolingDXVariableSpeed_Impl::setInitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity(
315 double initialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity) {
316 51 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::InitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity,
317 initialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity);
318 51 return result;
319 }
320
321 50 bool CoilCoolingDXVariableSpeed_Impl::setEnergyPartLoadFractionCurve(const Curve& curve) {
322
2/2
✓ Branch 1 taken 50 times.
✓ Branch 4 taken 50 times.
50 bool result = setPointer(OS_Coil_Cooling_DX_VariableSpeedFields::EnergyPartLoadFractionCurveName, curve.handle());
323 50 return result;
324 }
325
326 // void CoilCoolingDXVariableSpeed_Impl::setCondenserAirInletNodeName(boost::optional<std::string> condenserAirInletNodeName) {
327 // bool result(false);
328 // if (condenserAirInletNodeName) {
329 // result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::CondenserAirInletNodeName, condenserAirInletNodeName.get());
330 // }
331 // else {
332 // resetCondenserAirInletNodeName();
333 // result = true;
334 // }
335 // OS_ASSERT(result);
336 // }
337
338 // void CoilCoolingDXVariableSpeed_Impl::resetCondenserAirInletNodeName() {
339 // bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::CondenserAirInletNodeName, "");
340 // OS_ASSERT(result);
341 // }
342
343 51 bool CoilCoolingDXVariableSpeed_Impl::setCondenserType(const std::string& condenserType) {
344 51 bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::CondenserType, condenserType);
345 51 return result;
346 }
347
348 51 bool CoilCoolingDXVariableSpeed_Impl::setEvaporativeCondenserPumpRatedPowerConsumption(
349 boost::optional<double> evaporativeCondenserPumpRatedPowerConsumption) {
350 51 bool result(false);
351
1/2
✓ Branch 0 taken 51 times.
✗ Branch 1 not taken.
51 if (evaporativeCondenserPumpRatedPowerConsumption) {
352 51 result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::EvaporativeCondenserPumpRatedPowerConsumption,
353 51 evaporativeCondenserPumpRatedPowerConsumption.get());
354 }
355 51 return result;
356 }
357
358 ✗ void CoilCoolingDXVariableSpeed_Impl::autosizeEvaporativeCondenserPumpRatedPowerConsumption() {
359 ✗ bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::EvaporativeCondenserPumpRatedPowerConsumption, "autosize");
360 ✗ OS_ASSERT(result);
361 ✗ }
362
363 51 bool CoilCoolingDXVariableSpeed_Impl::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) {
364 51 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::CrankcaseHeaterCapacity, crankcaseHeaterCapacity);
365 51 return result;
366 }
367
368 51 bool CoilCoolingDXVariableSpeed_Impl::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(
369 double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) {
370 51 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::MaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation,
371 maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
372 51 return result;
373 }
374
375 // bool CoilCoolingDXVariableSpeed_Impl::setSupplyWaterStorageTank(const boost::optional<WaterStorageTank>& waterStorageTank) {
376 // bool result(false);
377 // if (waterStorageTank) {
378 // result = setPointer(OS_Coil_Cooling_DX_VariableSpeedFields::SupplyWaterStorageTankName, waterStorageTank.get().handle());
379 // }
380 // else {
381 // resetSupplyWaterStorageTank();
382 // result = true;
383 // }
384 // return result;
385 // }
386
387 // void CoilCoolingDXVariableSpeed_Impl::resetSupplyWaterStorageTank() {
388 // bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::SupplyWaterStorageTankName, "");
389 // OS_ASSERT(result);
390 // }
391
392 // bool CoilCoolingDXVariableSpeed_Impl::setCondensateCollectionWaterStorageTank(const boost::optional<WaterStorageTank>& waterStorageTank) {
393 // bool result(false);
394 // if (waterStorageTank) {
395 // result = setPointer(OS_Coil_Cooling_DX_VariableSpeedFields::CondensateCollectionWaterStorageTankName, waterStorageTank.get().handle());
396 // }
397 // else {
398 // resetCondensateCollectionWaterStorageTank();
399 // result = true;
400 // }
401 // return result;
402 // }
403
404 // void CoilCoolingDXVariableSpeed_Impl::resetCondensateCollectionWaterStorageTank() {
405 // bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::CondensateCollectionWaterStorageTankName, "");
406 // OS_ASSERT(result);
407 // }
408
409 51 bool CoilCoolingDXVariableSpeed_Impl::setBasinHeaterCapacity(double basinHeaterCapacity) {
410 51 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::BasinHeaterCapacity, basinHeaterCapacity);
411 51 return result;
412 }
413
414 51 bool CoilCoolingDXVariableSpeed_Impl::setBasinHeaterSetpointTemperature(double basinHeaterSetpointTemperature) {
415 51 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::BasinHeaterSetpointTemperature, basinHeaterSetpointTemperature);
416 51 return result;
417 }
418
419 1 bool CoilCoolingDXVariableSpeed_Impl::setBasinHeaterOperatingSchedule(Schedule& schedule) {
420
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_VariableSpeedFields::BasinHeaterOperatingScheduleName, "CoilCoolingDXVariableSpeed",
421 "Basin Heater Operating", schedule);
422 1 return result;
423 }
424
425 ✗ void CoilCoolingDXVariableSpeed_Impl::resetBasinHeaterOperatingSchedule() {
426 ✗ bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::BasinHeaterOperatingScheduleName, "");
427 ✗ OS_ASSERT(result);
428 ✗ }
429
430 10 double CoilCoolingDXVariableSpeed_Impl::minimumOutdoorDryBulbTemperatureforCompressorOperation() const {
431
1/1
✓ Branch 1 taken 10 times.
10 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation, true);
432
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 10 times.
✗ Branch 4 not taken.
10 OS_ASSERT(value);
433
1/1
✓ Branch 1 taken 10 times.
20 return value.get();
434 }
435
436 52 bool CoilCoolingDXVariableSpeed_Impl::setMinimumOutdoorDryBulbTemperatureforCompressorOperation(
437 double minimumOutdoorDryBulbTemperatureforCompressorOperation) {
438 52 bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::MinimumOutdoorDryBulbTemperatureforCompressorOperation,
439 minimumOutdoorDryBulbTemperatureforCompressorOperation);
440 52 return result;
441 }
442
443 11 double CoilCoolingDXVariableSpeed_Impl::maximumCyclingRate() const {
444
1/1
✓ Branch 1 taken 11 times.
11 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::MaximumCyclingRate, true);
445
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
11 OS_ASSERT(value);
446
1/1
✓ Branch 1 taken 11 times.
22 return value.get();
447 }
448
449 53 bool CoilCoolingDXVariableSpeed_Impl::setMaximumCyclingRate(double maximumCyclingRate) {
450 53 const bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::MaximumCyclingRate, maximumCyclingRate);
451 // OS_ASSERT(result);
452 53 return result;
453 }
454
455 11 double CoilCoolingDXVariableSpeed_Impl::latentCapacityTimeConstant() const {
456
1/1
✓ Branch 1 taken 11 times.
11 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::LatentCapacityTimeConstant, true);
457
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
11 OS_ASSERT(value);
458
1/1
✓ Branch 1 taken 11 times.
22 return value.get();
459 }
460
461 53 bool CoilCoolingDXVariableSpeed_Impl::setLatentCapacityTimeConstant(double latentCapacityTimeConstant) {
462 53 const bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::LatentCapacityTimeConstant, latentCapacityTimeConstant);
463 // OS_ASSERT(result);
464 53 return result;
465 }
466
467 11 double CoilCoolingDXVariableSpeed_Impl::fanDelayTime() const {
468
1/1
✓ Branch 1 taken 11 times.
11 boost::optional<double> value = getDouble(OS_Coil_Cooling_DX_VariableSpeedFields::FanDelayTime, true);
469
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 11 times.
✗ Branch 4 not taken.
11 OS_ASSERT(value);
470
1/1
✓ Branch 1 taken 11 times.
22 return value.get();
471 }
472
473 53 bool CoilCoolingDXVariableSpeed_Impl::setFanDelayTime(double fanDelayTime) {
474 53 const bool result = setDouble(OS_Coil_Cooling_DX_VariableSpeedFields::FanDelayTime, fanDelayTime);
475 // OS_ASSERT(result);
476 53 return result;
477 }
478
479 21 boost::optional<Curve> CoilCoolingDXVariableSpeed_Impl::crankcaseHeaterCapacityFunctionofTemperatureCurve() const {
480
1/1
✓ Branch 1 taken 21 times.
42 return getObject<ModelObject>().getModelObjectTarget<Curve>(
481
1/1
✓ Branch 1 taken 21 times.
42 OS_Coil_Cooling_DX_VariableSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName);
482 }
483
484 2 bool CoilCoolingDXVariableSpeed_Impl::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) {
485
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 const bool result = setPointer(OS_Coil_Cooling_DX_VariableSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, curve.handle());
486 2 return result;
487 }
488
489 1 void CoilCoolingDXVariableSpeed_Impl::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() {
490
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 const bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::CrankcaseHeaterCapacityFunctionofTemperatureCurveName, "");
491
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
492 1 }
493
494 18 boost::optional<Curve> CoilCoolingDXVariableSpeed_Impl::optionalEnergyPartLoadFractionCurve() const {
495
2/2
✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
18 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Coil_Cooling_DX_VariableSpeedFields::EnergyPartLoadFractionCurveName);
496 }
497
498 9 ModelObject CoilCoolingDXVariableSpeed_Impl::clone(Model model) const {
499
3/3
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
9 auto t_clone = StraightComponent_Impl::clone(model).cast<CoilCoolingDXVariableSpeed>();
500
501
2/3
✓ Branch 1 taken 9 times.
✓ Branch 3 taken 9 times.
✗ Branch 4 not taken.
18 if (auto speedDataList = this->speedDataList()) {
502
4/4
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
✓ Branch 10 taken 9 times.
9 auto speedDataListClone = speedDataList->clone(model).cast<ModelObjectList>();
503
2/2
✓ Branch 3 taken 9 times.
✓ Branch 6 taken 9 times.
9 t_clone.getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setSpeedDataList(speedDataListClone);
504 18 }
505
506 18 return std::move(t_clone);
507 9 }
508
509 9 std::vector<ModelObject> CoilCoolingDXVariableSpeed_Impl::children() const {
510 9 std::vector<ModelObject> children;
511
2/2
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
9 children.push_back(energyPartLoadFractionCurve());
512
3/3
✓ Branch 1 taken 9 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 8 times.
18 if (auto c_ = crankcaseHeaterCapacityFunctionofTemperatureCurve()) {
513
2/2
✓ Branch 1 taken 1 time.
✓ Branch 5 taken 1 time.
1 children.emplace_back(std::move(*c_));
514 9 }
515
2/3
✓ Branch 1 taken 9 times.
✓ Branch 3 taken 9 times.
✗ Branch 4 not taken.
18 if (auto const _stageDataList = speedDataList()) {
516
4/4
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 11 taken 3 times.
✓ Branch 12 taken 9 times.
12 for (const auto& mo : _stageDataList->modelObjects()) {
517
1/1
✓ Branch 1 taken 3 times.
3 children.push_back(mo);
518 9 }
519 9 }
520 std::vector<AirflowNetworkEquivalentDuct> myAFNItems =
521
3/3
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
✓ Branch 7 taken 9 times.
9 getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
522
1/1
✓ Branch 5 taken 9 times.
9 children.insert(children.end(), myAFNItems.begin(), myAFNItems.end());
523 18 return children;
524 9 }
525
526 42 boost::optional<ModelObjectList> CoilCoolingDXVariableSpeed_Impl::speedDataList() const {
527
2/2
✓ Branch 1 taken 42 times.
✓ Branch 4 taken 42 times.
42 return getObject<ModelObject>().getModelObjectTarget<ModelObjectList>(OS_Coil_Cooling_DX_VariableSpeedFields::SpeedDataList);
528 }
529
530 5 bool CoilCoolingDXVariableSpeed_Impl::addSpeed(const CoilCoolingDXVariableSpeedSpeedData& speed) {
531
1/1
✓ Branch 1 taken 5 times.
5 auto modelObjectList = speedDataList();
532
1/2
✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
5 if (modelObjectList) {
533
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
5 return modelObjectList->addModelObject(speed);
534 }
535 ✗ return false;
536 5 }
537
538 ✗ void CoilCoolingDXVariableSpeed_Impl::removeSpeed(const CoilCoolingDXVariableSpeedSpeedData& speed) {
539 ✗ auto modelObjectList = speedDataList();
540 ✗ if (modelObjectList) {
541 ✗ modelObjectList->removeModelObject(speed);
542 }
543 ✗ }
544
545 ✗ void CoilCoolingDXVariableSpeed_Impl::removeAllSpeeds() {
546 ✗ auto modelObjectList = speedDataList();
547 ✗ if (modelObjectList) {
548 ✗ auto const modelObjects = modelObjectList->modelObjects();
549
550 ✗ for (const auto& elem : modelObjects) {
551 ✗ auto const modelObject = elem.optionalCast<CoilCoolingDXVariableSpeedSpeedData>();
552 ✗ if (modelObject) {
553 ✗ modelObjectList->removeModelObject(elem);
554 }
555 ✗ }
556 ✗ }
557 ✗ }
558
559 18 std::vector<CoilCoolingDXVariableSpeedSpeedData> CoilCoolingDXVariableSpeed_Impl::speeds() const {
560 18 std::vector<CoilCoolingDXVariableSpeedSpeedData> result;
561
1/1
✓ Branch 1 taken 18 times.
18 auto const modelObjectList = speedDataList();
562
1/2
✓ Branch 0 taken 18 times.
✗ Branch 1 not taken.
18 if (modelObjectList) {
563
2/2
✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
18 auto const modelObjects = modelObjectList->modelObjects();
564
565
2/2
✓ Branch 5 taken 8 times.
✓ Branch 6 taken 18 times.
26 for (const auto& elem : modelObjects) {
566
1/1
✓ Branch 1 taken 8 times.
8 auto const modelObject = elem.optionalCast<CoilCoolingDXVariableSpeedSpeedData>();
567
1/2
✓ Branch 0 taken 8 times.
✗ Branch 1 not taken.
8 if (modelObject) {
568
2/2
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
8 result.push_back(modelObject.get());
569 }
570 8 }
571 18 }
572 36 return result;
573 18 }
574
575 15 boost::optional<HVACComponent> CoilCoolingDXVariableSpeed_Impl::containingHVACComponent() const {
576 // AirLoopHVACUnitarySystem
577 {
578
2/2
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
15 auto systems = this->model().getConcreteModelObjects<AirLoopHVACUnitarySystem>();
579
580
2/2
✓ Branch 5 taken 2 times.
✓ Branch 6 taken 13 times.
15 for (auto const& system : systems) {
581
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (auto coolingCoil = system.coolingCoil()) {
582
5/6
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 12 taken 2 times.
✗ Branch 13 not taken.
2 if (coolingCoil->handle() == this->handle()) {
583
1/1
✓ Branch 1 taken 2 times.
2 return system;
584 }
585 2 }
586 }
587 15 }
588
589 // AirLoopHVACUnitaryHeatPumpAirToAir
590 {
591
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 auto systems = this->model().getConcreteModelObjects<AirLoopHVACUnitaryHeatPumpAirToAir>();
592
593
2/2
✓ Branch 5 taken 2 times.
✓ Branch 6 taken 13 times.
15 for (auto const& system : systems) {
594
1/1
✓ Branch 1 taken 2 times.
2 auto coolingCoil = system.coolingCoil();
595
4/5
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 2 times.
2 if (coolingCoil.handle() == this->handle()) {
596 ✗ return system;
597 }
598 2 }
599 13 }
600
601 // CoilSystemCoolingDXHeatExchangerAssisted
602 {
603
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 auto coilSystems = this->model().getConcreteModelObjects<CoilSystemCoolingDXHeatExchangerAssisted>();
604
1/2
✗ Branch 5 not taken.
✓ Branch 6 taken 13 times.
13 for (const auto& coilSystem : coilSystems) {
605 ✗ if (coilSystem.coolingCoil().handle() == this->handle()) {
606 ✗ return coilSystem;
607 }
608 }
609 13 }
610
611 // CoilSystemIntegratedHeatPumpAirSource
612 {
613
2/2
✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
13 auto coilSystems = this->model().getConcreteModelObjects<CoilSystemIntegratedHeatPumpAirSource>();
614
2/2
✓ Branch 5 taken 8 times.
✓ Branch 6 taken 5 times.
13 for (const auto& coilSystem : coilSystems) {
615
6/6
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✓ Branch 10 taken 8 times.
✓ Branch 13 taken 4 times.
✓ Branch 14 taken 4 times.
8 if (coilSystem.spaceCoolingCoil().handle() == this->handle()) {
616
1/1
✓ Branch 1 taken 4 times.
12 return coilSystem;
617 }
618
5/6
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 13 taken 4 times.
✗ Branch 14 not taken.
4 if (coilSystem.scdwhCoolingCoil().handle() == this->handle()) {
619
1/1
✓ Branch 1 taken 4 times.
4 return coilSystem;
620 }
621 }
622 13 }
623
624 5 return boost::none;
625 }
626
627 3 boost::optional<ZoneHVACComponent> CoilCoolingDXVariableSpeed_Impl::containingZoneHVACComponent() const {
628 // ZoneHVACPackagedTerminalAirConditioner
629 {
630
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 auto systems = this->model().getConcreteModelObjects<ZoneHVACPackagedTerminalAirConditioner>();
631
632
2/2
✓ Branch 5 taken 1 time.
✓ Branch 6 taken 2 times.
3 for (auto const& system : systems) {
633
1/1
✓ Branch 1 taken 1 time.
1 auto coolingCoil = system.coolingCoil();
634
4/5
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 9 taken 1 time.
✗ Branch 10 not taken.
1 if (coolingCoil.handle() == this->handle()) {
635
1/1
✓ Branch 1 taken 1 time.
1 return system;
636 }
637 1 }
638 3 }
639
640 // ZoneHVACPackagedTerminalHeatPump
641 {
642
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 auto systems = this->model().getConcreteModelObjects<ZoneHVACPackagedTerminalHeatPump>();
643
644
1/2
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
2 for (auto const& system : systems) {
645 ✗ auto coolingCoil = system.coolingCoil();
646 ✗ if (coolingCoil.handle() == this->handle()) {
647 ✗ return system;
648 }
649 ✗ }
650 2 }
651
652 2 return boost::none;
653 }
654
655 2 bool CoilCoolingDXVariableSpeed_Impl::addToNode(Node& node) {
656
657 // TODO: JM 2019-03-12 I'm not sure we shouldn't just restrict to ANY containingHVACComponent (disallow if part of a UnitarySystem)
658
1/1
✓ Branch 1 taken 2 times.
2 auto t_containingHVACComponent = containingHVACComponent();
659
3/12
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
✗ Branch 7 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 2 times.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
4 if (t_containingHVACComponent && t_containingHVACComponent->optionalCast<CoilSystemCoolingDXHeatExchangerAssisted>()) {
660 ✗ LOG(Warn, this->briefDescription() << " cannot be connected directly when it's part of a parent CoilSystemCoolingDXHeatExchangerAssisted. "
661 "Please call CoilSystemCoolingDXHeatExchangerAssisted::addToNode instead");
662
3/12
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
✗ Branch 7 not taken.
✗ Branch 10 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✓ Branch 13 taken 2 times.
✗ Branch 15 not taken.
✓ Branch 16 taken 2 times.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
4 } else if (t_containingHVACComponent && t_containingHVACComponent->optionalCast<CoilSystemIntegratedHeatPumpAirSource>()) {
663 ✗ LOG(Warn, this->briefDescription() << " cannot be connected directly when it's part of a parent CoilSystemIntegratedHeatPumpAirSource. "
664 "Please call CoilSystemIntegratedHeatPumpAirSource::addToNode instead");
665 } else {
666
667
2/3
✓ Branch 1 taken 2 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
4 if (boost::optional<AirLoopHVAC> airLoop = node.airLoopHVAC()) {
668 ✗ if (!airLoop->demandComponent(node.handle())) {
669 ✗ return StraightComponent_Impl::addToNode(node);
670 }
671 2 }
672
673
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (auto oa = node.airLoopHVACOutdoorAirSystem()) {
674
1/1
✓ Branch 1 taken 2 times.
2 return StraightComponent_Impl::addToNode(node);
675 2 }
676 }
677 ✗ return false;
678 2 }
679
680 59 bool CoilCoolingDXVariableSpeed_Impl::setSpeedDataList(const boost::optional<ModelObjectList>& modelObjectList) {
681 59 bool result(false);
682
1/2
✓ Branch 0 taken 59 times.
✗ Branch 1 not taken.
59 if (modelObjectList) {
683
3/3
✓ Branch 1 taken 59 times.
✓ Branch 4 taken 59 times.
✓ Branch 7 taken 59 times.
59 result = setPointer(OS_Coil_Cooling_DX_VariableSpeedFields::SpeedDataList, modelObjectList.get().handle());
684 } else {
685 ✗ resetSpeedDataList();
686 ✗ result = true;
687 }
688 59 return result;
689 }
690
691 ✗ void CoilCoolingDXVariableSpeed_Impl::resetSpeedDataList() {
692 ✗ bool result = setString(OS_Coil_Cooling_DX_VariableSpeedFields::SpeedDataList, "");
693 ✗ OS_ASSERT(result);
694 ✗ }
695
696 1 std::vector<IdfObject> CoilCoolingDXVariableSpeed_Impl::remove() {
697
1/1
✓ Branch 1 taken 1 time.
1 auto _stageDataList = speedDataList();
698
1/1
✓ Branch 1 taken 1 time.
1 auto result = StraightComponent_Impl::remove();
699
3/6
✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
2 if ((!result.empty()) && _stageDataList) {
700
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 _stageDataList->remove();
701 }
702
703 2 return result;
704 1 }
705
706 ✗ AirflowNetworkEquivalentDuct CoilCoolingDXVariableSpeed_Impl::getAirflowNetworkEquivalentDuct(double length, double diameter) {
707 ✗ boost::optional<AirflowNetworkEquivalentDuct> opt = airflowNetworkEquivalentDuct();
708 ✗ if (opt) {
709 ✗ if (opt->airPathLength() != length) {
710 ✗ opt->setAirPathLength(length);
711 }
712 ✗ if (opt->airPathHydraulicDiameter() != diameter) {
713 ✗ opt->setAirPathHydraulicDiameter(diameter);
714 }
715 }
716 ✗ return AirflowNetworkEquivalentDuct(model(), length, diameter, handle());
717 ✗ }
718
719 ✗ boost::optional<AirflowNetworkEquivalentDuct> CoilCoolingDXVariableSpeed_Impl::airflowNetworkEquivalentDuct() const {
720 std::vector<AirflowNetworkEquivalentDuct> myAFN =
721 ✗ getObject<ModelObject>().getModelObjectSources<AirflowNetworkEquivalentDuct>(AirflowNetworkEquivalentDuct::iddObjectType());
722 ✗ auto count = myAFN.size();
723 ✗ if (count == 1) {
724 ✗ return myAFN[0];
725 ✗ } else if (count > 1) {
726 ✗ LOG(Warn, briefDescription() << " has more than one AirflowNetwork EquivalentDuct attached, returning first.");
727 ✗ return myAFN[0];
728 }
729 ✗ return boost::none;
730 ✗ }
731
732 ✗ boost::optional<double> CoilCoolingDXVariableSpeed_Impl::autosizedGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel() const {
733 // EPLUS-SQL-INCONSISTENCY
734 ✗ return getAutosizedValue("Design Size Rated Total Cooling Capacity", "W", "COIL:COOLING:DX:VARIABLESPEED");
735 }
736
737 ✗ boost::optional<double> CoilCoolingDXVariableSpeed_Impl::autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel() const {
738 // EPLUS-SQL-INCONSISTENCY
739 ✗ return getAutosizedValue("Design Size Rated Air Flow Rate", "m3/s", "COIL:COOLING:DX:VARIABLESPEED");
740 }
741
742 ✗ boost::optional<double> CoilCoolingDXVariableSpeed_Impl::autosizedEvaporativeCondenserPumpRatedPowerConsumption() const {
743 // EPLUS-SQL-INCONSISTENCY
744 ✗ return getAutosizedValue("Design Size Evaporative Condenser Pump Rated Power Consumption", "W", "AS VS COOLING COIL");
745 }
746
747 ✗ void CoilCoolingDXVariableSpeed_Impl::autosize() {
748 ✗ autosizeGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel();
749 ✗ autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
750 ✗ autosizeEvaporativeCondenserPumpRatedPowerConsumption();
751 ✗ }
752
753 ✗ void CoilCoolingDXVariableSpeed_Impl::applySizingValues() {
754 ✗ boost::optional<double> val;
755 ✗ val = autosizedGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel();
756 ✗ if (val) {
757 ✗ setGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel(val.get());
758 }
759
760 ✗ val = autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel();
761 ✗ if (val) {
762 ✗ setRatedAirFlowRateAtSelectedNominalSpeedLevel(val.get());
763 }
764
765 ✗ val = autosizedEvaporativeCondenserPumpRatedPowerConsumption();
766 ✗ if (val) {
767 ✗ setEvaporativeCondenserPumpRatedPowerConsumption(val.get());
768 }
769 ✗ }
770
771 2 ComponentType CoilCoolingDXVariableSpeed_Impl::componentType() const {
772
1/1
✓ Branch 1 taken 2 times.
2 return ComponentType::Cooling;
773 }
774
775 5 std::vector<FuelType> CoilCoolingDXVariableSpeed_Impl::coolingFuelTypes() const {
776
1/1
✓ Branch 1 taken 5 times.
15 return {FuelType::Electricity};
777 }
778
779 2 std::vector<FuelType> CoilCoolingDXVariableSpeed_Impl::heatingFuelTypes() const {
780 2 return {};
781 }
782
783 2 std::vector<AppGFuelType> CoilCoolingDXVariableSpeed_Impl::appGHeatingFuelTypes() const {
784 2 return {};
785 }
786
787 } // namespace detail
788
789 50 CoilCoolingDXVariableSpeed::CoilCoolingDXVariableSpeed(const Model& model) : StraightComponent(CoilCoolingDXVariableSpeed::iddObjectType(), model) {
790
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 50 times.
✗ Branch 5 not taken.
50 OS_ASSERT(getImpl<detail::CoilCoolingDXVariableSpeed_Impl>());
791
792
1/1
✓ Branch 1 taken 50 times.
50 auto always_on = model.alwaysOnDiscreteSchedule();
793
1/1
✓ Branch 1 taken 50 times.
50 bool ok = setAvailabilitySchedule(always_on);
794
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
795
1/1
✓ Branch 1 taken 50 times.
50 ok = setNominalSpeedLevel(1);
796
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
797
1/1
✓ Branch 1 taken 50 times.
50 autosizeGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel();
798
1/1
✓ Branch 1 taken 50 times.
50 autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
799
1/1
✓ Branch 1 taken 50 times.
50 ok = setNominalTimeforCondensatetoBeginLeavingtheCoil(0);
800
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
801
1/1
✓ Branch 1 taken 50 times.
50 ok = setInitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity(0);
802
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
803
1/1
✓ Branch 1 taken 50 times.
50 ok = setMaximumCyclingRate(2.5);
804
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
805
1/1
✓ Branch 1 taken 50 times.
50 ok = setLatentCapacityTimeConstant(60.0);
806
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
807
1/1
✓ Branch 1 taken 50 times.
50 ok = setFanDelayTime(60.0);
808
809
1/1
✓ Branch 1 taken 50 times.
50 auto partLoadFraction = CurveQuadratic(model);
810
1/1
✓ Branch 1 taken 50 times.
50 partLoadFraction.setCoefficient1Constant(0.85);
811
1/1
✓ Branch 1 taken 50 times.
50 partLoadFraction.setCoefficient2x(0.15);
812
1/1
✓ Branch 1 taken 50 times.
50 partLoadFraction.setCoefficient3xPOW2(0.0);
813
1/1
✓ Branch 1 taken 50 times.
50 partLoadFraction.setMinimumValueofx(0.0);
814
1/1
✓ Branch 1 taken 50 times.
50 partLoadFraction.setMaximumValueofx(1.0);
815
816
1/1
✓ Branch 1 taken 50 times.
50 ok = setEnergyPartLoadFractionCurve(partLoadFraction);
817
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
818
2/2
✓ Branch 1 taken 50 times.
✓ Branch 4 taken 50 times.
50 ok = setCondenserType("AirCooled");
819
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
820
1/1
✓ Branch 1 taken 50 times.
50 ok = setEvaporativeCondenserPumpRatedPowerConsumption(0.0);
821
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
822
1/1
✓ Branch 1 taken 50 times.
50 ok = setCrankcaseHeaterCapacity(0.0);
823
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
824
1/1
✓ Branch 1 taken 50 times.
50 ok = setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(10.0);
825
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
826
1/1
✓ Branch 1 taken 50 times.
50 ok = setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25.0);
827
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
828 // ok = setSupplyWaterStorageTank(WaterStorageTank);
829 // OS_ASSERT(ok);
830 // ok = setCondensateCollectionWaterStorageTank(WaterStorageTank);
831 // OS_ASSERT(ok);
832
1/1
✓ Branch 1 taken 50 times.
50 ok = setBasinHeaterCapacity(0.0);
833
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
834
1/1
✓ Branch 1 taken 50 times.
50 ok = setBasinHeaterSetpointTemperature(2.0);
835
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
836
837
1/1
✓ Branch 1 taken 50 times.
50 auto speedDataList = ModelObjectList(model);
838
4/4
✓ Branch 1 taken 50 times.
✓ Branch 4 taken 50 times.
✓ Branch 7 taken 50 times.
✓ Branch 10 taken 50 times.
50 speedDataList.setName(this->name().get() + " Speed Data List");
839
2/2
✓ Branch 3 taken 50 times.
✓ Branch 6 taken 50 times.
50 ok = getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setSpeedDataList(speedDataList);
840
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 50 times.
✗ Branch 3 not taken.
50 OS_ASSERT(ok);
841 50 }
842
843 ✗ CoilCoolingDXVariableSpeed::CoilCoolingDXVariableSpeed(const Model& model, const Curve& partLoadFraction)
844 ✗ : StraightComponent(CoilCoolingDXVariableSpeed::iddObjectType(), model) {
845 ✗ OS_ASSERT(getImpl<detail::CoilCoolingDXVariableSpeed_Impl>());
846
847 ✗ auto always_on = model.alwaysOnDiscreteSchedule();
848 ✗ bool ok = setAvailabilitySchedule(always_on);
849 ✗ OS_ASSERT(ok);
850 ✗ ok = setNominalSpeedLevel(1);
851 ✗ OS_ASSERT(ok);
852 ✗ autosizeGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel();
853 ✗ autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
854 ✗ ok = setNominalTimeforCondensatetoBeginLeavingtheCoil(0);
855 ✗ OS_ASSERT(ok);
856 ✗ ok = setInitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity(0);
857 ✗ OS_ASSERT(ok);
858 ✗ ok = setMaximumCyclingRate(2.5);
859 ✗ OS_ASSERT(ok);
860 ✗ ok = setLatentCapacityTimeConstant(60.0);
861 ✗ OS_ASSERT(ok);
862 ✗ ok = setFanDelayTime(60.0);
863 ✗ ok = setEnergyPartLoadFractionCurve(partLoadFraction);
864 ✗ OS_ASSERT(ok);
865 ✗ ok = setCondenserType("AirCooled");
866 ✗ OS_ASSERT(ok);
867 ✗ ok = setEvaporativeCondenserPumpRatedPowerConsumption(0.0);
868 ✗ OS_ASSERT(ok);
869 ✗ ok = setCrankcaseHeaterCapacity(0.0);
870 ✗ OS_ASSERT(ok);
871 ✗ ok = setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(10.0);
872 ✗ OS_ASSERT(ok);
873 ✗ ok = setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25.0);
874 ✗ OS_ASSERT(ok);
875 // ok = setSupplyWaterStorageTank(WaterStorageTank);
876 // OS_ASSERT(ok);
877 // ok = setCondensateCollectionWaterStorageTank(WaterStorageTank);
878 // OS_ASSERT(ok);
879 ✗ ok = setBasinHeaterCapacity(0.0);
880 ✗ OS_ASSERT(ok);
881 ✗ ok = setBasinHeaterSetpointTemperature(2.0);
882 ✗ OS_ASSERT(ok);
883
884 ✗ auto speedDataList = ModelObjectList(model);
885 ✗ speedDataList.setName(this->name().get() + " Speed Data List");
886 ✗ ok = getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setSpeedDataList(speedDataList);
887 ✗ OS_ASSERT(ok);
888 ✗ }
889
890 7902 IddObjectType CoilCoolingDXVariableSpeed::iddObjectType() {
891
1/1
✓ Branch 1 taken 7902 times.
7902 return {IddObjectType::OS_Coil_Cooling_DX_VariableSpeed};
892 }
893
894 ✗ std::vector<std::string> CoilCoolingDXVariableSpeed::condenserTypeValues() {
895 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Coil_Cooling_DX_VariableSpeedFields::CondenserType);
896 }
897
898 10 Schedule CoilCoolingDXVariableSpeed::availabilitySchedule() const {
899
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->availabilitySchedule();
900 }
901
902 8 int CoilCoolingDXVariableSpeed::nominalSpeedLevel() const {
903
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->nominalSpeedLevel();
904 }
905
906 1 boost::optional<double> CoilCoolingDXVariableSpeed::grossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel() const {
907
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->grossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel();
908 }
909
910 8 bool CoilCoolingDXVariableSpeed::isGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevelAutosized() const {
911
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->isGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevelAutosized();
912 }
913
914 1 boost::optional<double> CoilCoolingDXVariableSpeed::ratedAirFlowRateAtSelectedNominalSpeedLevel() const {
915
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->ratedAirFlowRateAtSelectedNominalSpeedLevel();
916 }
917
918 8 bool CoilCoolingDXVariableSpeed::isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized() const {
919
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->isRatedAirFlowRateAtSelectedNominalSpeedLevelAutosized();
920 }
921
922 8 double CoilCoolingDXVariableSpeed::nominalTimeforCondensatetoBeginLeavingtheCoil() const {
923
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->nominalTimeforCondensatetoBeginLeavingtheCoil();
924 }
925
926 8 double CoilCoolingDXVariableSpeed::initialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity() const {
927
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->initialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity();
928 }
929
930 9 Curve CoilCoolingDXVariableSpeed::energyPartLoadFractionCurve() const {
931
1/1
✓ Branch 3 taken 9 times.
9 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->energyPartLoadFractionCurve();
932 }
933
934 // boost::optional<std::string> CoilCoolingDXVariableSpeed::condenserAirInletNodeName() const {
935 // return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->condenserAirInletNodeName();
936 // }
937
938 8 std::string CoilCoolingDXVariableSpeed::condenserType() const {
939
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->condenserType();
940 }
941
942 8 boost::optional<double> CoilCoolingDXVariableSpeed::evaporativeCondenserPumpRatedPowerConsumption() const {
943
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->evaporativeCondenserPumpRatedPowerConsumption();
944 }
945
946 8 bool CoilCoolingDXVariableSpeed::isEvaporativeCondenserPumpRatedPowerConsumptionAutosized() const {
947
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->isEvaporativeCondenserPumpRatedPowerConsumptionAutosized();
948 }
949
950 8 double CoilCoolingDXVariableSpeed::crankcaseHeaterCapacity() const {
951
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->crankcaseHeaterCapacity();
952 }
953
954 8 double CoilCoolingDXVariableSpeed::maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const {
955
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation();
956 }
957
958 // boost::optional<WaterStorageTank> CoilCoolingDXVariableSpeed::supplyWaterStorageTank() const {
959 // return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->supplyWaterStorageTank();
960 // }
961
962 // boost::optional<WaterStorageTank> CoilCoolingDXVariableSpeed::condensateCollectionWaterStorageTank() const {
963 // return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->condensateCollectionWaterStorageTank();
964 // }
965
966 8 double CoilCoolingDXVariableSpeed::basinHeaterCapacity() const {
967
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->basinHeaterCapacity();
968 }
969
970 8 double CoilCoolingDXVariableSpeed::basinHeaterSetpointTemperature() const {
971
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->basinHeaterSetpointTemperature();
972 }
973
974 8 boost::optional<Schedule> CoilCoolingDXVariableSpeed::basinHeaterOperatingSchedule() const {
975
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->basinHeaterOperatingSchedule();
976 }
977
978 51 bool CoilCoolingDXVariableSpeed::setAvailabilitySchedule(Schedule& schedule) {
979
1/1
✓ Branch 3 taken 51 times.
51 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setAvailabilitySchedule(schedule);
980 }
981
982 51 bool CoilCoolingDXVariableSpeed::setNominalSpeedLevel(int nominalSpeedLevel) {
983
1/1
✓ Branch 3 taken 51 times.
51 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setNominalSpeedLevel(nominalSpeedLevel);
984 }
985
986 1 bool CoilCoolingDXVariableSpeed::setGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel(
987 double grossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel) {
988
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
2 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel(
989 2 grossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel);
990 }
991
992 50 void CoilCoolingDXVariableSpeed::autosizeGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel() {
993
1/1
✓ Branch 3 taken 50 times.
50 getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->autosizeGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel();
994 50 }
995
996 1 bool CoilCoolingDXVariableSpeed::setRatedAirFlowRateAtSelectedNominalSpeedLevel(double ratedAirFlowRateAtSelectedNominalSpeedLevel) {
997
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
2 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setRatedAirFlowRateAtSelectedNominalSpeedLevel(
998 2 ratedAirFlowRateAtSelectedNominalSpeedLevel);
999 }
1000
1001 50 void CoilCoolingDXVariableSpeed::autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel() {
1002
1/1
✓ Branch 3 taken 50 times.
50 getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->autosizeRatedAirFlowRateAtSelectedNominalSpeedLevel();
1003 50 }
1004
1005 51 bool CoilCoolingDXVariableSpeed::setNominalTimeforCondensatetoBeginLeavingtheCoil(double nominalTimeforCondensatetoBeginLeavingtheCoil) {
1006
1/1
✓ Branch 3 taken 51 times.
102 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setNominalTimeforCondensatetoBeginLeavingtheCoil(
1007 102 nominalTimeforCondensatetoBeginLeavingtheCoil);
1008 }
1009
1010 51 bool CoilCoolingDXVariableSpeed::setInitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity(
1011 double initialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity) {
1012
1/1
✓ Branch 3 taken 51 times.
102 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setInitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity(
1013 102 initialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity);
1014 }
1015
1016 50 bool CoilCoolingDXVariableSpeed::setEnergyPartLoadFractionCurve(const Curve& curve) {
1017
1/1
✓ Branch 3 taken 50 times.
50 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setEnergyPartLoadFractionCurve(curve);
1018 }
1019
1020 // void CoilCoolingDXVariableSpeed::setCondenserAirInletNodeName(std::string condenserAirInletNodeName) {
1021 // getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setCondenserAirInletNodeName(condenserAirInletNodeName);
1022 // }
1023
1024 // void CoilCoolingDXVariableSpeed::resetCondenserAirInletNodeName() {
1025 // getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->resetCondenserAirInletNodeName();
1026 // }
1027
1028 51 bool CoilCoolingDXVariableSpeed::setCondenserType(const std::string& condenserType) {
1029
1/1
✓ Branch 3 taken 51 times.
51 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setCondenserType(condenserType);
1030 }
1031
1032 51 bool CoilCoolingDXVariableSpeed::setEvaporativeCondenserPumpRatedPowerConsumption(double evaporativeCondenserPumpRatedPowerConsumption) {
1033
2/2
✓ Branch 3 taken 51 times.
✓ Branch 6 taken 51 times.
102 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setEvaporativeCondenserPumpRatedPowerConsumption(
1034 102 evaporativeCondenserPumpRatedPowerConsumption);
1035 }
1036
1037 ✗ void CoilCoolingDXVariableSpeed::autosizeEvaporativeCondenserPumpRatedPowerConsumption() {
1038 ✗ getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->autosizeEvaporativeCondenserPumpRatedPowerConsumption();
1039 ✗ }
1040
1041 51 bool CoilCoolingDXVariableSpeed::setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity) {
1042
1/1
✓ Branch 3 taken 51 times.
51 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setCrankcaseHeaterCapacity(crankcaseHeaterCapacity);
1043 }
1044
1045 51 bool CoilCoolingDXVariableSpeed::setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(
1046 double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation) {
1047
1/1
✓ Branch 3 taken 51 times.
102 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(
1048 102 maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
1049 }
1050
1051 // bool CoilCoolingDXVariableSpeed::setSupplyWaterStorageTank(const WaterStorageTank& waterStorageTank) {
1052 // return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setSupplyWaterStorageTank(waterStorageTank);
1053 // }
1054
1055 // void CoilCoolingDXVariableSpeed::resetSupplyWaterStorageTank() {
1056 // getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->resetSupplyWaterStorageTank();
1057 // }
1058
1059 // bool CoilCoolingDXVariableSpeed::setCondensateCollectionWaterStorageTank(const WaterStorageTank& waterStorageTank) {
1060 // return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setCondensateCollectionWaterStorageTank(waterStorageTank);
1061 // }
1062
1063 // void CoilCoolingDXVariableSpeed::resetCondensateCollectionWaterStorageTank() {
1064 // getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->resetCondensateCollectionWaterStorageTank();
1065 // }
1066
1067 51 bool CoilCoolingDXVariableSpeed::setBasinHeaterCapacity(double basinHeaterCapacity) {
1068
1/1
✓ Branch 3 taken 51 times.
51 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setBasinHeaterCapacity(basinHeaterCapacity);
1069 }
1070
1071 51 bool CoilCoolingDXVariableSpeed::setBasinHeaterSetpointTemperature(double basinHeaterSetpointTemperature) {
1072
1/1
✓ Branch 3 taken 51 times.
51 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setBasinHeaterSetpointTemperature(basinHeaterSetpointTemperature);
1073 }
1074
1075 1 bool CoilCoolingDXVariableSpeed::setBasinHeaterOperatingSchedule(Schedule& schedule) {
1076
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setBasinHeaterOperatingSchedule(schedule);
1077 }
1078
1079 ✗ void CoilCoolingDXVariableSpeed::resetBasinHeaterOperatingSchedule() {
1080 ✗ getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->resetBasinHeaterOperatingSchedule();
1081 ✗ }
1082
1083 10 double CoilCoolingDXVariableSpeed::minimumOutdoorDryBulbTemperatureforCompressorOperation() const {
1084
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->minimumOutdoorDryBulbTemperatureforCompressorOperation();
1085 }
1086
1087 52 bool CoilCoolingDXVariableSpeed::setMinimumOutdoorDryBulbTemperatureforCompressorOperation(
1088 double minimumOutdoorDryBulbTemperatureforCompressorOperation) {
1089
1/1
✓ Branch 3 taken 52 times.
104 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setMinimumOutdoorDryBulbTemperatureforCompressorOperation(
1090 104 minimumOutdoorDryBulbTemperatureforCompressorOperation);
1091 }
1092
1093 18 std::vector<CoilCoolingDXVariableSpeedSpeedData> CoilCoolingDXVariableSpeed::speeds() const {
1094
1/1
✓ Branch 3 taken 18 times.
18 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->speeds();
1095 }
1096
1097 5 bool CoilCoolingDXVariableSpeed::addSpeed(const CoilCoolingDXVariableSpeedSpeedData& speed) {
1098
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->addSpeed(speed);
1099 }
1100
1101 ✗ void CoilCoolingDXVariableSpeed::removeSpeed(const CoilCoolingDXVariableSpeedSpeedData& speed) {
1102 ✗ getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->removeSpeed(speed);
1103 ✗ }
1104
1105 ✗ void CoilCoolingDXVariableSpeed::removeAllSpeeds() {
1106 ✗ getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->removeAllSpeeds();
1107 ✗ }
1108
1109 11 double CoilCoolingDXVariableSpeed::maximumCyclingRate() const {
1110
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->maximumCyclingRate();
1111 }
1112
1113 53 bool CoilCoolingDXVariableSpeed::setMaximumCyclingRate(double maximumCyclingRate) {
1114
1/1
✓ Branch 3 taken 53 times.
53 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setMaximumCyclingRate(maximumCyclingRate);
1115 }
1116
1117 11 double CoilCoolingDXVariableSpeed::latentCapacityTimeConstant() const {
1118
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->latentCapacityTimeConstant();
1119 }
1120
1121 53 bool CoilCoolingDXVariableSpeed::setLatentCapacityTimeConstant(double latentCapacityTimeConstant) {
1122
1/1
✓ Branch 3 taken 53 times.
53 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setLatentCapacityTimeConstant(latentCapacityTimeConstant);
1123 }
1124
1125 11 double CoilCoolingDXVariableSpeed::fanDelayTime() const {
1126
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->fanDelayTime();
1127 }
1128
1129 53 bool CoilCoolingDXVariableSpeed::setFanDelayTime(double fanDelayTime) {
1130
1/1
✓ Branch 3 taken 53 times.
53 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setFanDelayTime(fanDelayTime);
1131 }
1132
1133 12 boost::optional<Curve> CoilCoolingDXVariableSpeed::crankcaseHeaterCapacityFunctionofTemperatureCurve() const {
1134
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->crankcaseHeaterCapacityFunctionofTemperatureCurve();
1135 }
1136
1137 2 bool CoilCoolingDXVariableSpeed::setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve) {
1138
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->setCrankcaseHeaterCapacityFunctionofTemperatureCurve(curve);
1139 }
1140
1141 1 void CoilCoolingDXVariableSpeed::resetCrankcaseHeaterCapacityFunctionofTemperatureCurve() {
1142
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->resetCrankcaseHeaterCapacityFunctionofTemperatureCurve();
1143 1 }
1144
1145 /// @cond
1146 32 CoilCoolingDXVariableSpeed::CoilCoolingDXVariableSpeed(std::shared_ptr<detail::CoilCoolingDXVariableSpeed_Impl> impl)
1147
1/1
✓ Branch 3 taken 32 times.
32 : StraightComponent(std::move(impl)) {}
1148 /// @endcond
1149
1150 ✗ boost::optional<double> CoilCoolingDXVariableSpeed::autosizedGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel() const {
1151 ✗ return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->autosizedGrossRatedTotalCoolingCapacityAtSelectedNominalSpeedLevel();
1152 }
1153
1154 ✗ boost::optional<double> CoilCoolingDXVariableSpeed::autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel() const {
1155 ✗ return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->autosizedRatedAirFlowRateAtSelectedNominalSpeedLevel();
1156 }
1157
1158 ✗ boost::optional<double> CoilCoolingDXVariableSpeed::autosizedEvaporativeCondenserPumpRatedPowerConsumption() const {
1159 ✗ return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->autosizedEvaporativeCondenserPumpRatedPowerConsumption();
1160 }
1161
1162 ✗ AirflowNetworkEquivalentDuct CoilCoolingDXVariableSpeed::getAirflowNetworkEquivalentDuct(double length, double diameter) {
1163 ✗ return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->getAirflowNetworkEquivalentDuct(length, diameter);
1164 }
1165
1166 ✗ boost::optional<AirflowNetworkEquivalentDuct> CoilCoolingDXVariableSpeed::airflowNetworkEquivalentDuct() const {
1167 ✗ return getImpl<detail::CoilCoolingDXVariableSpeed_Impl>()->airflowNetworkEquivalentDuct();
1168 }
1169
1170 } // namespace model
1171 } // namespace openstudio
1172