GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 50.4% 133 / 0 / 264
Functions: 46.8% 29 / 0 / 62
Branches: 29.4% 92 / 0 / 313

src/model/ZoneHVACDehumidifierDX.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 "ZoneHVACDehumidifierDX.hpp"
7 #include "ZoneHVACDehumidifierDX_Impl.hpp"
8
9 #include "Schedule.hpp"
10 #include "Schedule_Impl.hpp"
11 #include "Curve.hpp"
12 #include "Curve_Impl.hpp"
13 #include "Model.hpp"
14 #include "CurveBiquadratic.hpp"
15 #include "CurveQuadratic.hpp"
16 // #include "WaterStorageTank.hpp"
17 // #include "WaterStorageTank_Impl.hpp"
18 #include "ScheduleTypeLimits.hpp"
19 #include "ScheduleTypeRegistry.hpp"
20
21 #include <utilities/idd/IddFactory.hxx>
22 #include <utilities/idd/OS_ZoneHVAC_Dehumidifier_DX_FieldEnums.hxx>
23
24 #include "../utilities/core/Assert.hpp"
25 #include "../utilities/data/DataEnums.hpp"
26
27 namespace openstudio {
28 namespace model {
29
30 namespace detail {
31
32 3 ZoneHVACDehumidifierDX_Impl::ZoneHVACDehumidifierDX_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
33 3 : ZoneHVACComponent_Impl(idfObject, model, keepHandle) {
34
4/6
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 3 times.
✗ Branch 13 not taken.
3 OS_ASSERT(idfObject.iddObject().type() == ZoneHVACDehumidifierDX::iddObjectType());
35 3 }
36
37 ✗ ZoneHVACDehumidifierDX_Impl::ZoneHVACDehumidifierDX_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
38 ✗ bool keepHandle)
39 ✗ : ZoneHVACComponent_Impl(other, model, keepHandle) {
40 ✗ OS_ASSERT(other.iddObject().type() == ZoneHVACDehumidifierDX::iddObjectType());
41 ✗ }
42
43 ✗ ZoneHVACDehumidifierDX_Impl::ZoneHVACDehumidifierDX_Impl(const ZoneHVACDehumidifierDX_Impl& other, Model_Impl* model, bool keepHandle)
44 ✗ : ZoneHVACComponent_Impl(other, model, keepHandle) {}
45
46 ✗ const std::vector<std::string>& ZoneHVACDehumidifierDX_Impl::outputVariableNames() const {
47 static const std::vector<std::string> result{
48 "Zone Dehumidifier Sensible Heating Rate",
49 "Zone Dehumidifier Sensible Heating Energy",
50 "Zone Dehumidifier Removed Water Mass Flow Rate",
51 "Zone Dehumidifier Removed Water Mass",
52 "Zone Dehumidifier Electricity Rate",
53 "Zone Dehumidifier Electricity Energy",
54 "Zone Dehumidifier Off Cycle Parasitic Electricity Rate",
55 "Zone Dehumidifier Off Cycle Parasitic Electricity Energy",
56 "Zone Dehumidifier Part Load Ratio",
57 "Zone Dehumidifier Runtime Fraction",
58 "Zone Dehumidifier Outlet Air Temperature"
59 // If Condensate Collection Water Storage Tank Name is specified:
60 // Not implemented for now
61 // TODO: change if it becomes implemented, and change the "static" above
62 // "Zone Dehumidifier Condensate Volume Flow Rate",
63 // "Zone Dehumidifier Condensate Volume"
64 ✗ };
65 ✗ return result;
66 ✗ }
67
68 ✗ IddObjectType ZoneHVACDehumidifierDX_Impl::iddObjectType() const {
69 ✗ return ZoneHVACDehumidifierDX::iddObjectType();
70 }
71
72 ✗ std::vector<ScheduleTypeKey> ZoneHVACDehumidifierDX_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
73 ✗ std::vector<ScheduleTypeKey> result;
74 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
75 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
76 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
77 ✗ if (std::find(b, e, OS_ZoneHVAC_Dehumidifier_DXFields::AvailabilityScheduleName) != e) {
78 ✗ result.emplace_back("ZoneHVACDehumidifierDX", "Availability");
79 }
80 ✗ return result;
81 ✗ }
82
83 ✗ ModelObject ZoneHVACDehumidifierDX_Impl::clone(Model model) const {
84 ✗ auto clone = ZoneHVACComponent_Impl::clone(model).cast<ZoneHVACDehumidifierDX>();
85
86 ✗ return std::move(clone);
87 ✗ }
88
89 1 std::vector<ModelObject> ZoneHVACDehumidifierDX_Impl::children() const {
90 1 std::vector<ModelObject> result;
91
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 if (auto const intermediate = optionalWaterRemovalCurve()) {
92
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 result.push_back(intermediate.get());
93 1 }
94
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 if (auto const intermediate = optionalEnergyFactorCurve()) {
95
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 result.push_back(intermediate.get());
96 1 }
97
2/3
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
2 if (auto const intermediate = optionalPartLoadFractionCorrelationCurve()) {
98
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 result.push_back(intermediate.get());
99 1 }
100 1 return result;
101 ✗ }
102
103 12 unsigned ZoneHVACDehumidifierDX_Impl::inletPort() const {
104 12 return OS_ZoneHVAC_Dehumidifier_DXFields::AirInletNodeName;
105 }
106
107 6 unsigned ZoneHVACDehumidifierDX_Impl::outletPort() const {
108 6 return OS_ZoneHVAC_Dehumidifier_DXFields::AirOutletNodeName;
109 }
110
111 ✗ Schedule ZoneHVACDehumidifierDX_Impl::availabilitySchedule() const {
112 ✗ boost::optional<Schedule> value = optionalAvailabilitySchedule();
113 ✗ if (!value) {
114 ✗ LOG_AND_THROW(briefDescription() << " does not have an Availability Schedule attached.");
115 }
116 ✗ return value.get();
117 ✗ }
118
119 ✗ double ZoneHVACDehumidifierDX_Impl::ratedWaterRemoval() const {
120 ✗ boost::optional<double> value = getDouble(OS_ZoneHVAC_Dehumidifier_DXFields::RatedWaterRemoval, true);
121 ✗ OS_ASSERT(value);
122 ✗ return value.get();
123 }
124
125 ✗ double ZoneHVACDehumidifierDX_Impl::ratedEnergyFactor() const {
126 ✗ boost::optional<double> value = getDouble(OS_ZoneHVAC_Dehumidifier_DXFields::RatedEnergyFactor, true);
127 ✗ OS_ASSERT(value);
128 ✗ return value.get();
129 }
130
131 ✗ double ZoneHVACDehumidifierDX_Impl::ratedAirFlowRate() const {
132 ✗ boost::optional<double> value = getDouble(OS_ZoneHVAC_Dehumidifier_DXFields::RatedAirFlowRate, true);
133 ✗ OS_ASSERT(value);
134 ✗ return value.get();
135 }
136
137 ✗ Curve ZoneHVACDehumidifierDX_Impl::waterRemovalCurve() const {
138 ✗ boost::optional<Curve> value = optionalWaterRemovalCurve();
139 ✗ if (!value) {
140 ✗ LOG_AND_THROW(briefDescription() << " does not have an Water Removal Curve attached.");
141 }
142 ✗ return value.get();
143 ✗ }
144
145 ✗ Curve ZoneHVACDehumidifierDX_Impl::energyFactorCurve() const {
146 ✗ boost::optional<Curve> value = optionalEnergyFactorCurve();
147 ✗ if (!value) {
148 ✗ LOG_AND_THROW(briefDescription() << " does not have an Energy Factor Curve attached.");
149 }
150 ✗ return value.get();
151 ✗ }
152
153 ✗ Curve ZoneHVACDehumidifierDX_Impl::partLoadFractionCorrelationCurve() const {
154 ✗ boost::optional<Curve> value = optionalPartLoadFractionCorrelationCurve();
155 ✗ if (!value) {
156 ✗ LOG_AND_THROW(briefDescription() << " does not have an Part Load Fraction Correlation Curve attached.");
157 }
158 ✗ return value.get();
159 ✗ }
160
161 ✗ double ZoneHVACDehumidifierDX_Impl::minimumDryBulbTemperatureforDehumidifierOperation() const {
162 ✗ boost::optional<double> value = getDouble(OS_ZoneHVAC_Dehumidifier_DXFields::MinimumDryBulbTemperatureforDehumidifierOperation, true);
163 ✗ OS_ASSERT(value);
164 ✗ return value.get();
165 }
166
167 ✗ double ZoneHVACDehumidifierDX_Impl::maximumDryBulbTemperatureforDehumidifierOperation() const {
168 ✗ boost::optional<double> value = getDouble(OS_ZoneHVAC_Dehumidifier_DXFields::MaximumDryBulbTemperatureforDehumidifierOperation, true);
169 ✗ OS_ASSERT(value);
170 ✗ return value.get();
171 }
172
173 ✗ double ZoneHVACDehumidifierDX_Impl::offCycleParasiticElectricLoad() const {
174 ✗ boost::optional<double> value = getDouble(OS_ZoneHVAC_Dehumidifier_DXFields::OffCycleParasiticElectricLoad, true);
175 ✗ OS_ASSERT(value);
176 ✗ return value.get();
177 }
178
179 // boost::optional<WaterStorageTank> ZoneHVACDehumidifierDX_Impl::condensateCollectionWaterStorageTank() const {
180 // return getObject<ModelObject>().getModelObjectTarget<WaterStorageTank>(OS_ZoneHVAC_Dehumidifier_DXFields::CondensateCollectionWaterStorageTankName);
181 // }
182
183 3 bool ZoneHVACDehumidifierDX_Impl::setAvailabilitySchedule(Schedule& schedule) {
184
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
12 bool result = setSchedule(OS_ZoneHVAC_Dehumidifier_DXFields::AvailabilityScheduleName, "ZoneHVACDehumidifierDX", "Availability", schedule);
185 3 return result;
186 }
187
188 3 bool ZoneHVACDehumidifierDX_Impl::setRatedWaterRemoval(double ratedWaterRemoval) {
189 3 bool result = setDouble(OS_ZoneHVAC_Dehumidifier_DXFields::RatedWaterRemoval, ratedWaterRemoval);
190 3 return result;
191 }
192
193 3 bool ZoneHVACDehumidifierDX_Impl::setRatedEnergyFactor(double ratedEnergyFactor) {
194 3 bool result = setDouble(OS_ZoneHVAC_Dehumidifier_DXFields::RatedEnergyFactor, ratedEnergyFactor);
195 3 return result;
196 }
197
198 3 bool ZoneHVACDehumidifierDX_Impl::setRatedAirFlowRate(double ratedAirFlowRate) {
199 3 bool result = setDouble(OS_ZoneHVAC_Dehumidifier_DXFields::RatedAirFlowRate, ratedAirFlowRate);
200 3 return result;
201 }
202
203 3 bool ZoneHVACDehumidifierDX_Impl::setWaterRemovalCurve(const Curve& curve) {
204
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 bool result = setPointer(OS_ZoneHVAC_Dehumidifier_DXFields::WaterRemovalCurveName, curve.handle());
205 3 return result;
206 }
207
208 3 bool ZoneHVACDehumidifierDX_Impl::setEnergyFactorCurve(const Curve& curve) {
209
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 bool result = setPointer(OS_ZoneHVAC_Dehumidifier_DXFields::EnergyFactorCurveName, curve.handle());
210 3 return result;
211 }
212
213 3 bool ZoneHVACDehumidifierDX_Impl::setPartLoadFractionCorrelationCurve(const Curve& curve) {
214
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 bool result = setPointer(OS_ZoneHVAC_Dehumidifier_DXFields::PartLoadFractionCorrelationCurveName, curve.handle());
215 3 return result;
216 }
217
218 3 bool ZoneHVACDehumidifierDX_Impl::setMinimumDryBulbTemperatureforDehumidifierOperation(double minimumDryBulbTemperatureforDehumidifierOperation) {
219 3 bool result = setDouble(OS_ZoneHVAC_Dehumidifier_DXFields::MinimumDryBulbTemperatureforDehumidifierOperation,
220 minimumDryBulbTemperatureforDehumidifierOperation);
221
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
222 3 return result;
223 }
224
225 3 bool ZoneHVACDehumidifierDX_Impl::setMaximumDryBulbTemperatureforDehumidifierOperation(double maximumDryBulbTemperatureforDehumidifierOperation) {
226 3 bool result = setDouble(OS_ZoneHVAC_Dehumidifier_DXFields::MaximumDryBulbTemperatureforDehumidifierOperation,
227 maximumDryBulbTemperatureforDehumidifierOperation);
228
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
229 3 return result;
230 }
231
232 3 bool ZoneHVACDehumidifierDX_Impl::setOffCycleParasiticElectricLoad(double offCycleParasiticElectricLoad) {
233 3 bool result = setDouble(OS_ZoneHVAC_Dehumidifier_DXFields::OffCycleParasiticElectricLoad, offCycleParasiticElectricLoad);
234 3 return result;
235 }
236
237 // bool ZoneHVACDehumidifierDX_Impl::setCondensateCollectionWaterStorageTank(const boost::optional<WaterStorageTank>& waterStorageTank) {
238 // bool result(false);
239 // if (waterStorageTank) {
240 // result = setPointer(OS_ZoneHVAC_Dehumidifier_DXFields::CondensateCollectionWaterStorageTankName, waterStorageTank.get().handle());
241 // }
242 // else {
243 // resetCondensateCollectionWaterStorageTank();
244 // result = true;
245 // }
246 // return result;
247 // }
248
249 // void ZoneHVACDehumidifierDX_Impl::resetCondensateCollectionWaterStorageTank() {
250 // bool result = setString(OS_ZoneHVAC_Dehumidifier_DXFields::CondensateCollectionWaterStorageTankName, "");
251 // OS_ASSERT(result);
252 // }
253
254 ✗ boost::optional<Schedule> ZoneHVACDehumidifierDX_Impl::optionalAvailabilitySchedule() const {
255 ✗ return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ZoneHVAC_Dehumidifier_DXFields::AvailabilityScheduleName);
256 }
257
258 1 boost::optional<Curve> ZoneHVACDehumidifierDX_Impl::optionalWaterRemovalCurve() const {
259
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_ZoneHVAC_Dehumidifier_DXFields::WaterRemovalCurveName);
260 }
261
262 1 boost::optional<Curve> ZoneHVACDehumidifierDX_Impl::optionalEnergyFactorCurve() const {
263
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_ZoneHVAC_Dehumidifier_DXFields::EnergyFactorCurveName);
264 }
265
266 1 boost::optional<Curve> ZoneHVACDehumidifierDX_Impl::optionalPartLoadFractionCorrelationCurve() const {
267
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_ZoneHVAC_Dehumidifier_DXFields::PartLoadFractionCorrelationCurveName);
268 }
269
270 ✗ ComponentType ZoneHVACDehumidifierDX_Impl::componentType() const {
271 ✗ return ComponentType::None;
272 }
273
274 ✗ std::vector<FuelType> ZoneHVACDehumidifierDX_Impl::coolingFuelTypes() const {
275 ✗ return {};
276 }
277
278 ✗ std::vector<FuelType> ZoneHVACDehumidifierDX_Impl::heatingFuelTypes() const {
279 ✗ return {};
280 }
281
282 ✗ std::vector<AppGFuelType> ZoneHVACDehumidifierDX_Impl::appGHeatingFuelTypes() const {
283 ✗ return {};
284 }
285
286 } // namespace detail
287
288 3 ZoneHVACDehumidifierDX::ZoneHVACDehumidifierDX(const Model& model) : ZoneHVACComponent(ZoneHVACDehumidifierDX::iddObjectType(), model) {
289
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 3 times.
✗ Branch 5 not taken.
3 OS_ASSERT(getImpl<detail::ZoneHVACDehumidifierDX_Impl>());
290
291
1/1
✓ Branch 1 taken 3 times.
3 auto waterRemovalCurve = CurveBiquadratic(model);
292
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setCoefficient1Constant(-2.724878664080);
293
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setCoefficient2x(0.100711983591);
294
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setCoefficient3xPOW2(-0.000990538285);
295
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setCoefficient4y(0.050053043874);
296
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setCoefficient5yPOW2(-0.000203629282);
297
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setCoefficient6xTIMESY(-0.000341750531);
298
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setMinimumValueofx(21.0);
299
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setMaximumValueofx(32.22);
300
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setMinimumValueofy(40.0);
301
1/1
✓ Branch 1 taken 3 times.
3 waterRemovalCurve.setMaximumValueofy(80.0);
302
303
1/1
✓ Branch 1 taken 3 times.
3 auto energyFactorCurve = CurveBiquadratic(model);
304
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setCoefficient1Constant(-2.388319068955);
305
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setCoefficient2x(0.093047739452);
306
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setCoefficient3xPOW2(-0.001369700327);
307
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setCoefficient4y(0.066533716758);
308
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setCoefficient5yPOW2(-0.000343198063);
309
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setCoefficient6xTIMESY(-0.000562490295);
310
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setMinimumValueofx(21.0);
311
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setMaximumValueofx(32.22);
312
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setMinimumValueofy(40.0);
313
1/1
✓ Branch 1 taken 3 times.
3 energyFactorCurve.setMaximumValueofy(80.0);
314
315
1/1
✓ Branch 1 taken 3 times.
3 auto partLoadFractionCurve = CurveQuadratic(model);
316
1/1
✓ Branch 1 taken 3 times.
3 partLoadFractionCurve.setCoefficient1Constant(0.95);
317
1/1
✓ Branch 1 taken 3 times.
3 partLoadFractionCurve.setCoefficient2x(0.05);
318
1/1
✓ Branch 1 taken 3 times.
3 partLoadFractionCurve.setCoefficient3xPOW2(0.0);
319
1/1
✓ Branch 1 taken 3 times.
3 partLoadFractionCurve.setMinimumValueofx(0.0);
320
1/1
✓ Branch 1 taken 3 times.
3 partLoadFractionCurve.setMaximumValueofx(1.0);
321
322 3 bool ok = true;
323
1/1
✓ Branch 1 taken 3 times.
3 auto alwaysOn = model.alwaysOnDiscreteSchedule();
324
1/1
✓ Branch 1 taken 3 times.
3 ok = setAvailabilitySchedule(alwaysOn);
325
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
3 OS_ASSERT(ok);
326
1/1
✓ Branch 1 taken 3 times.
3 ok = setRatedWaterRemoval(50.16);
327
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
3 OS_ASSERT(ok);
328
1/1
✓ Branch 1 taken 3 times.
3 ok = setRatedEnergyFactor(3.412);
329
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
3 OS_ASSERT(ok);
330
1/1
✓ Branch 1 taken 3 times.
3 ok = setRatedAirFlowRate(0.12036);
331
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
3 OS_ASSERT(ok);
332
1/1
✓ Branch 1 taken 3 times.
3 ok = setWaterRemovalCurve(waterRemovalCurve);
333
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
3 OS_ASSERT(ok);
334
1/1
✓ Branch 1 taken 3 times.
3 ok = setEnergyFactorCurve(energyFactorCurve);
335
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
3 OS_ASSERT(ok);
336
1/1
✓ Branch 1 taken 3 times.
3 ok = setPartLoadFractionCorrelationCurve(partLoadFractionCurve);
337
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
3 OS_ASSERT(ok);
338
1/1
✓ Branch 1 taken 3 times.
3 setMinimumDryBulbTemperatureforDehumidifierOperation(10.0);
339
1/1
✓ Branch 1 taken 3 times.
3 setMaximumDryBulbTemperatureforDehumidifierOperation(32.0);
340
1/1
✓ Branch 1 taken 3 times.
3 ok = setOffCycleParasiticElectricLoad(0.0);
341
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
✗ Branch 3 not taken.
3 OS_ASSERT(ok);
342 3 }
343
344 ✗ ZoneHVACDehumidifierDX::ZoneHVACDehumidifierDX(const Model& model, const Curve& waterRemovalCurve, const Curve& energyFactorCurve,
345 ✗ const Curve& partLoadFractionCurve)
346 ✗ : ZoneHVACComponent(ZoneHVACDehumidifierDX::iddObjectType(), model) {
347 ✗ OS_ASSERT(getImpl<detail::ZoneHVACDehumidifierDX_Impl>());
348
349 ✗ bool ok = true;
350 ✗ auto alwaysOn = model.alwaysOnDiscreteSchedule();
351 ✗ ok = setAvailabilitySchedule(alwaysOn);
352 ✗ OS_ASSERT(ok);
353 ✗ ok = setRatedWaterRemoval(50.16);
354 ✗ OS_ASSERT(ok);
355 ✗ ok = setRatedEnergyFactor(3.412);
356 ✗ OS_ASSERT(ok);
357 ✗ ok = setRatedAirFlowRate(0.12036);
358 ✗ OS_ASSERT(ok);
359 ✗ ok = setWaterRemovalCurve(waterRemovalCurve);
360 ✗ OS_ASSERT(ok);
361 ✗ ok = setEnergyFactorCurve(energyFactorCurve);
362 ✗ OS_ASSERT(ok);
363 ✗ ok = setPartLoadFractionCorrelationCurve(partLoadFractionCurve);
364 ✗ OS_ASSERT(ok);
365 ✗ setMinimumDryBulbTemperatureforDehumidifierOperation(10.0);
366 ✗ setMaximumDryBulbTemperatureforDehumidifierOperation(32.0);
367 ✗ ok = setOffCycleParasiticElectricLoad(0.0);
368 ✗ OS_ASSERT(ok);
369 ✗ }
370
371 7734 IddObjectType ZoneHVACDehumidifierDX::iddObjectType() {
372
1/1
✓ Branch 1 taken 7734 times.
7734 return {IddObjectType::OS_ZoneHVAC_Dehumidifier_DX};
373 }
374
375 ✗ Schedule ZoneHVACDehumidifierDX::availabilitySchedule() const {
376 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->availabilitySchedule();
377 }
378
379 ✗ double ZoneHVACDehumidifierDX::ratedWaterRemoval() const {
380 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->ratedWaterRemoval();
381 }
382
383 ✗ double ZoneHVACDehumidifierDX::ratedEnergyFactor() const {
384 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->ratedEnergyFactor();
385 }
386
387 ✗ double ZoneHVACDehumidifierDX::ratedAirFlowRate() const {
388 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->ratedAirFlowRate();
389 }
390
391 ✗ Curve ZoneHVACDehumidifierDX::waterRemovalCurve() const {
392 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->waterRemovalCurve();
393 }
394
395 ✗ Curve ZoneHVACDehumidifierDX::energyFactorCurve() const {
396 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->energyFactorCurve();
397 }
398
399 ✗ Curve ZoneHVACDehumidifierDX::partLoadFractionCorrelationCurve() const {
400 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->partLoadFractionCorrelationCurve();
401 }
402
403 ✗ double ZoneHVACDehumidifierDX::minimumDryBulbTemperatureforDehumidifierOperation() const {
404 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->minimumDryBulbTemperatureforDehumidifierOperation();
405 }
406
407 ✗ double ZoneHVACDehumidifierDX::maximumDryBulbTemperatureforDehumidifierOperation() const {
408 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->maximumDryBulbTemperatureforDehumidifierOperation();
409 }
410
411 ✗ double ZoneHVACDehumidifierDX::offCycleParasiticElectricLoad() const {
412 ✗ return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->offCycleParasiticElectricLoad();
413 }
414
415 // boost::optional<WaterStorageTank> ZoneHVACDehumidifierDX::condensateCollectionWaterStorageTank() const {
416 // return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->condensateCollectionWaterStorageTank();
417 // }
418
419 3 bool ZoneHVACDehumidifierDX::setAvailabilitySchedule(Schedule& schedule) {
420
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setAvailabilitySchedule(schedule);
421 }
422
423 3 bool ZoneHVACDehumidifierDX::setRatedWaterRemoval(double ratedWaterRemoval) {
424
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setRatedWaterRemoval(ratedWaterRemoval);
425 }
426
427 3 bool ZoneHVACDehumidifierDX::setRatedEnergyFactor(double ratedEnergyFactor) {
428
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setRatedEnergyFactor(ratedEnergyFactor);
429 }
430
431 3 bool ZoneHVACDehumidifierDX::setRatedAirFlowRate(double ratedAirFlowRate) {
432
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setRatedAirFlowRate(ratedAirFlowRate);
433 }
434
435 3 bool ZoneHVACDehumidifierDX::setWaterRemovalCurve(const Curve& curve) {
436
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setWaterRemovalCurve(curve);
437 }
438
439 3 bool ZoneHVACDehumidifierDX::setEnergyFactorCurve(const Curve& curve) {
440
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setEnergyFactorCurve(curve);
441 }
442
443 3 bool ZoneHVACDehumidifierDX::setPartLoadFractionCorrelationCurve(const Curve& curve) {
444
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setPartLoadFractionCorrelationCurve(curve);
445 }
446
447 3 bool ZoneHVACDehumidifierDX::setMinimumDryBulbTemperatureforDehumidifierOperation(double minimumDryBulbTemperatureforDehumidifierOperation) {
448
1/1
✓ Branch 3 taken 3 times.
6 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setMinimumDryBulbTemperatureforDehumidifierOperation(
449 6 minimumDryBulbTemperatureforDehumidifierOperation);
450 }
451
452 3 bool ZoneHVACDehumidifierDX::setMaximumDryBulbTemperatureforDehumidifierOperation(double maximumDryBulbTemperatureforDehumidifierOperation) {
453
1/1
✓ Branch 3 taken 3 times.
6 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setMaximumDryBulbTemperatureforDehumidifierOperation(
454 6 maximumDryBulbTemperatureforDehumidifierOperation);
455 }
456
457 3 bool ZoneHVACDehumidifierDX::setOffCycleParasiticElectricLoad(double offCycleParasiticElectricLoad) {
458
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setOffCycleParasiticElectricLoad(offCycleParasiticElectricLoad);
459 }
460
461 // bool ZoneHVACDehumidifierDX::setCondensateCollectionWaterStorageTank(const WaterStorageTank& waterStorageTank) {
462 // return getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->setCondensateCollectionWaterStorageTank(waterStorageTank);
463 // }
464
465 // void ZoneHVACDehumidifierDX::resetCondensateCollectionWaterStorageTank() {
466 // getImpl<detail::ZoneHVACDehumidifierDX_Impl>()->resetCondensateCollectionWaterStorageTank();
467 // }
468
469 /// @cond
470 ✗ ZoneHVACDehumidifierDX::ZoneHVACDehumidifierDX(std::shared_ptr<detail::ZoneHVACDehumidifierDX_Impl> impl) : ZoneHVACComponent(std::move(impl)) {}
471 /// @endcond
472
473 } // namespace model
474 } // namespace openstudio
475