GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 51.2% 451 / 0 / 880
Functions: 64.7% 141 / 0 / 218
Branches: 31.0% 258 / 0 / 833

src/model/ZoneHVACWaterToAirHeatPump.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 "ZoneHVACWaterToAirHeatPump.hpp"
7 #include "ZoneHVACWaterToAirHeatPump_Impl.hpp"
8 #include "Schedule.hpp"
9 #include "Schedule_Impl.hpp"
10 #include "ScheduleTypeLimits.hpp"
11 #include "ScheduleTypeRegistry.hpp"
12 #include "HVACComponent.hpp"
13 #include "HVACComponent_Impl.hpp"
14 #include "WaterToAirComponent.hpp"
15 #include "WaterToAirComponent_Impl.hpp"
16 #include "FanOnOff.hpp"
17 #include "FanOnOff_Impl.hpp"
18 #include "CoilHeatingWaterToAirHeatPumpEquationFit.hpp"
19 #include "CoilHeatingWaterToAirHeatPumpEquationFit_Impl.hpp"
20 #include "CoilCoolingWaterToAirHeatPumpEquationFit.hpp"
21 #include "CoilCoolingWaterToAirHeatPumpEquationFit_Impl.hpp"
22 #include "CoilHeatingElectric.hpp"
23 #include "CoilHeatingElectric_Impl.hpp"
24 #include "CoilHeatingGas.hpp"
25 #include "CoilHeatingGas_Impl.hpp"
26 #include "CoilHeatingWater.hpp"
27 #include "CoilHeatingWater_Impl.hpp"
28 #include "Model.hpp"
29 #include "Model_Impl.hpp"
30
31 #include <utilities/idd/IddFactory.hxx>
32
33 #include <utilities/idd/OS_ZoneHVAC_WaterToAirHeatPump_FieldEnums.hxx>
34 #include <utilities/idd/IddEnums.hxx>
35
36 #include "../utilities/core/Assert.hpp"
37 #include "../utilities/data/DataEnums.hpp"
38
39 // Remove when deprecated methods (maximumCyclingRate and co) are removed
40 #include "../utilities/core/DeprecatedHelpers.hpp"
41 #include "CoilCoolingWaterToAirHeatPumpEquationFit.hpp"
42 #include "CoilCoolingWaterToAirHeatPumpEquationFit_Impl.hpp"
43 #include "CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.hpp"
44 #include "CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit_Impl.hpp"
45
46 namespace openstudio {
47 namespace model {
48
49 namespace detail {
50
51 10 ZoneHVACWaterToAirHeatPump_Impl::ZoneHVACWaterToAirHeatPump_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
52 10 : ZoneHVACComponent_Impl(idfObject, model, keepHandle) {
53
4/6
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 10 times.
✗ Branch 13 not taken.
10 OS_ASSERT(idfObject.iddObject().type() == ZoneHVACWaterToAirHeatPump::iddObjectType());
54 10 }
55
56 4 ZoneHVACWaterToAirHeatPump_Impl::ZoneHVACWaterToAirHeatPump_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
57 4 bool keepHandle)
58 4 : ZoneHVACComponent_Impl(other, model, keepHandle) {
59
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() == ZoneHVACWaterToAirHeatPump::iddObjectType());
60 4 }
61
62 3 ZoneHVACWaterToAirHeatPump_Impl::ZoneHVACWaterToAirHeatPump_Impl(const ZoneHVACWaterToAirHeatPump_Impl& other, Model_Impl* model, bool keepHandle)
63 3 : ZoneHVACComponent_Impl(other, model, keepHandle) {}
64
65 ✗ ModelObject ZoneHVACWaterToAirHeatPump_Impl::clone(Model model) const {
66 ✗ auto wahpClone = ZoneHVACComponent_Impl::clone(model).cast<ZoneHVACWaterToAirHeatPump>();
67
68 ✗ auto supplyFanClone = this->supplyAirFan().clone(model).cast<HVACComponent>();
69
70 ✗ auto t_heatingCoil = heatingCoil();
71 ✗ auto heatingCoilClone = t_heatingCoil.clone(model).cast<HVACComponent>();
72
73 ✗ auto t_coolingCoil = coolingCoil();
74 ✗ auto coolingCoilClone = t_coolingCoil.clone(model).cast<HVACComponent>();
75
76 ✗ auto t_supplementalHeatingCoil = supplementalHeatingCoil();
77 ✗ auto supplementalHeatingCoilClone = t_supplementalHeatingCoil.clone(model).cast<HVACComponent>();
78
79 ✗ wahpClone.setSupplyAirFan(supplyFanClone);
80
81 ✗ wahpClone.setHeatingCoil(heatingCoilClone);
82
83 ✗ wahpClone.setCoolingCoil(coolingCoilClone);
84
85 ✗ wahpClone.setSupplementalHeatingCoil(supplementalHeatingCoilClone);
86
87 ✗ if (model == this->model()) {
88 ✗ if (auto waterToAirComponent = t_coolingCoil.optionalCast<WaterToAirComponent>()) {
89 ✗ if (auto plant = waterToAirComponent->plantLoop()) {
90 ✗ plant->addDemandBranchForComponent(coolingCoilClone);
91 ✗ }
92 ✗ }
93 ✗ if (auto waterToAirComponent = t_heatingCoil.optionalCast<WaterToAirComponent>()) {
94 ✗ if (auto plant = waterToAirComponent->plantLoop()) {
95 ✗ plant->addDemandBranchForComponent(heatingCoilClone);
96 ✗ }
97 ✗ }
98 ✗ if (auto waterToAirComponent = t_supplementalHeatingCoil.optionalCast<WaterToAirComponent>()) {
99 ✗ if (auto plant = waterToAirComponent->plantLoop()) {
100 ✗ plant->addDemandBranchForComponent(supplementalHeatingCoilClone);
101 ✗ }
102 ✗ }
103 }
104
105 ✗ return std::move(wahpClone);
106 ✗ }
107
108 ✗ std::vector<IdfObject> ZoneHVACWaterToAirHeatPump_Impl::remove() {
109 // This plant disconnect needs to be done because virtual ModelObject::remove
110 // is not called by ParentObjects bulk children remove. Normally WaterToAirComponent::remove
111 // handles this.
112 ✗ if (boost::optional<CoilHeatingWaterToAirHeatPumpEquationFit> waterHeatingCoil =
113 ✗ heatingCoil().optionalCast<CoilHeatingWaterToAirHeatPumpEquationFit>()) {
114 ✗ if (boost::optional<PlantLoop> plantLoop = waterHeatingCoil->plantLoop()) {
115 ✗ plantLoop->removeDemandBranchWithComponent(waterHeatingCoil.get());
116 ✗ }
117 ✗ }
118 ✗ if (boost::optional<CoilCoolingWaterToAirHeatPumpEquationFit> waterCoolingCoil =
119 ✗ coolingCoil().optionalCast<CoilCoolingWaterToAirHeatPumpEquationFit>()) {
120 ✗ if (boost::optional<PlantLoop> plantLoop = waterCoolingCoil->plantLoop()) {
121 ✗ plantLoop->removeDemandBranchWithComponent(waterCoolingCoil.get());
122 ✗ }
123 ✗ }
124 ✗ if (boost::optional<CoilHeatingWater> t_supplementalHeatingCoil = supplementalHeatingCoil().optionalCast<CoilHeatingWater>()) {
125 ✗ if (boost::optional<PlantLoop> plantLoop = t_supplementalHeatingCoil->plantLoop()) {
126 ✗ plantLoop->removeDemandBranchWithComponent(t_supplementalHeatingCoil.get());
127 ✗ }
128 ✗ }
129 ✗ return ZoneHVACComponent_Impl::remove();
130 }
131
132 ✗ const std::vector<std::string>& ZoneHVACWaterToAirHeatPump_Impl::outputVariableNames() const {
133 static const std::vector<std::string> result{
134 "Zone Water to Air Heat Pump Total Heating Rate", "Zone Water to Air Heat Pump Total Heating Energy",
135 "Zone Water to Air Heat Pump Total Cooling Rate", "Zone Water to Air Heat Pump Total Cooling Energy",
136 "Zone Water to Air Heat Pump Sensible Heating Rate", "Zone Water to Air Heat Pump Sensible Heating Energy",
137 "Zone Water to Air Heat Pump Sensible Cooling Rate", "Zone Water to Air Heat Pump Sensible Cooling Energy",
138 "Zone Water to Air Heat Pump Latent Heating Rate", "Zone Water to Air Heat Pump Latent Heating Energy",
139 "Zone Water to Air Heat Pump Latent Cooling Rate", "Zone Water to Air Heat Pump Latent Cooling Energy",
140 "Zone Water to Air Heat Pump Electricity Rate", "Zone Water to Air Heat Pump Electricity Energy",
141 "Zone Water to Air Heat Pump Fan Part Load Ratio", "Zone Water to Air Heat Pump Compressor Part Load Ratio",
142 ✗ "Zone Water to Air Heat Pump Fan Availability Status"};
143 ✗ return result;
144 ✗ }
145
146 8 IddObjectType ZoneHVACWaterToAirHeatPump_Impl::iddObjectType() const {
147 8 return ZoneHVACWaterToAirHeatPump::iddObjectType();
148 }
149
150 ✗ std::vector<ScheduleTypeKey> ZoneHVACWaterToAirHeatPump_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
151 ✗ std::vector<ScheduleTypeKey> result;
152 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
153 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
154 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
155 ✗ if (std::find(b, e, OS_ZoneHVAC_WaterToAirHeatPumpFields::AvailabilityScheduleName) != e) {
156 ✗ result.push_back(ScheduleTypeKey("ZoneHVACWaterToAirHeatPump", "Availability"));
157 }
158 ✗ if (std::find(b, e, OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFanOperatingModeScheduleName) != e) {
159 ✗ result.push_back(ScheduleTypeKey("ZoneHVACWaterToAirHeatPump", "Supply Air Fan Operating Mode"));
160 }
161 ✗ return result;
162 ✗ }
163
164 2 std::vector<ModelObject> ZoneHVACWaterToAirHeatPump_Impl::children() const {
165 2 std::vector<ModelObject> result;
166
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (OptionalHVACComponent intermediate = optionalSupplyAirFan()) {
167
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 result.push_back(*intermediate);
168 2 }
169
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (OptionalHVACComponent intermediate = optionalHeatingCoil()) {
170
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 result.push_back(*intermediate);
171 2 }
172
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (OptionalHVACComponent intermediate = optionalCoolingCoil()) {
173
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 result.push_back(*intermediate);
174 2 }
175
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (OptionalHVACComponent intermediate = optionalSupplementalHeatingCoil()) {
176
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 result.push_back(*intermediate);
177 2 }
178 2 return result;
179 ✗ }
180
181 15 unsigned ZoneHVACWaterToAirHeatPump_Impl::inletPort() const {
182 15 return OS_ZoneHVAC_WaterToAirHeatPumpFields::AirInletNodeName;
183 }
184
185 7 unsigned ZoneHVACWaterToAirHeatPump_Impl::outletPort() const {
186 7 return OS_ZoneHVAC_WaterToAirHeatPumpFields::AirOutletNodeName;
187 }
188
189 3 Schedule ZoneHVACWaterToAirHeatPump_Impl::availabilitySchedule() const {
190
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<Schedule> value = optionalAvailabilitySchedule();
191
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
3 if (!value) {
192 // it is an error if we get here, however we don't want to crash
193 // so we hook up to global always on schedule
194 ✗ LOG(Error, "Required availability schedule not set, using 'Always On' schedule");
195 ✗ value = this->model().alwaysOnDiscreteSchedule();
196 ✗ OS_ASSERT(value);
197 ✗ const_cast<ZoneHVACWaterToAirHeatPump_Impl*>(this)->setAvailabilitySchedule(*value);
198 ✗ value = optionalAvailabilitySchedule();
199 }
200
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(value);
201
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 return value.get();
202 3 }
203
204 4 boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::supplyAirFlowRateDuringCoolingOperation() const {
205 4 return getDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringCoolingOperation, true);
206 }
207
208 3 bool ZoneHVACWaterToAirHeatPump_Impl::isSupplyAirFlowRateDuringCoolingOperationAutosized() const {
209 3 bool result = false;
210
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<std::string> value = getString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringCoolingOperation, true);
211
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 if (value) {
212
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
6 result = openstudio::istringEqual(value.get(), "Autosize");
213 }
214 3 return result;
215 3 }
216
217 4 boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::supplyAirFlowRateDuringHeatingOperation() const {
218 4 return getDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringHeatingOperation, true);
219 }
220
221 4 bool ZoneHVACWaterToAirHeatPump_Impl::isSupplyAirFlowRateDuringHeatingOperationAutosized() const {
222 4 bool result = false;
223
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<std::string> value = getString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringHeatingOperation, true);
224
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (value) {
225
3/3
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
8 result = openstudio::istringEqual(value.get(), "Autosize");
226 }
227 4 return result;
228 4 }
229
230 4 boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::supplyAirFlowRateWhenNoCoolingorHeatingisNeeded() const {
231 4 return getDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateWhenNoCoolingorHeatingisNeeded, true);
232 }
233
234 4 bool ZoneHVACWaterToAirHeatPump_Impl::isSupplyAirFlowRateWhenNoCoolingorHeatingisNeededAutosized() const {
235 4 bool result = false;
236
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<std::string> value = getString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateWhenNoCoolingorHeatingisNeeded, true);
237
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (value) {
238
3/3
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
8 result = openstudio::istringEqual(value.get(), "Autosize");
239 }
240 4 return result;
241 4 }
242
243 4 bool ZoneHVACWaterToAirHeatPump_Impl::noLoadSupplyAirFlowRateControlSetToLowSpeed() const {
244 4 return getBooleanFieldValue(OS_ZoneHVAC_WaterToAirHeatPumpFields::NoLoadSupplyAirFlowRateControlSetToLowSpeed);
245 }
246
247 8 boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::outdoorAirFlowRateDuringCoolingOperation() const {
248 8 return getDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringCoolingOperation, true);
249 }
250
251 4 bool ZoneHVACWaterToAirHeatPump_Impl::isOutdoorAirFlowRateDuringCoolingOperationAutosized() const {
252 4 bool result = false;
253
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<std::string> value = getString(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringCoolingOperation, true);
254
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (value) {
255
3/3
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
8 result = openstudio::istringEqual(value.get(), "Autosize");
256 }
257 4 return result;
258 4 }
259
260 8 boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::outdoorAirFlowRateDuringHeatingOperation() const {
261 8 return getDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringHeatingOperation, true);
262 }
263
264 4 bool ZoneHVACWaterToAirHeatPump_Impl::isOutdoorAirFlowRateDuringHeatingOperationAutosized() const {
265 4 bool result = false;
266
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<std::string> value = getString(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringHeatingOperation, true);
267
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (value) {
268
3/3
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
8 result = openstudio::istringEqual(value.get(), "Autosize");
269 }
270 4 return result;
271 4 }
272
273 8 boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded() const {
274 8 return getDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded, true);
275 }
276
277 4 bool ZoneHVACWaterToAirHeatPump_Impl::isOutdoorAirFlowRateWhenNoCoolingorHeatingisNeededAutosized() const {
278 4 bool result = false;
279
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<std::string> value = getString(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded, true);
280
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (value) {
281
3/3
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
8 result = openstudio::istringEqual(value.get(), "Autosize");
282 }
283 4 return result;
284 4 }
285
286 6 HVACComponent ZoneHVACWaterToAirHeatPump_Impl::supplyAirFan() const {
287
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<HVACComponent> value = optionalSupplyAirFan();
288
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
289
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
12 return value.get();
290 6 }
291
292 4 HVACComponent ZoneHVACWaterToAirHeatPump_Impl::heatingCoil() const {
293
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<HVACComponent> value = optionalHeatingCoil();
294
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
295
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
8 return value.get();
296 4 }
297
298 4 HVACComponent ZoneHVACWaterToAirHeatPump_Impl::coolingCoil() const {
299
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<HVACComponent> value = optionalCoolingCoil();
300
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
301
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
8 return value.get();
302 4 }
303
304 4 HVACComponent ZoneHVACWaterToAirHeatPump_Impl::supplementalHeatingCoil() const {
305
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<HVACComponent> value = optionalSupplementalHeatingCoil();
306
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
307
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
8 return value.get();
308 4 }
309
310 3 boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::maximumSupplyAirTemperaturefromSupplementalHeater() const {
311 3 return getDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumSupplyAirTemperaturefromSupplementalHeater, true);
312 }
313
314 3 bool ZoneHVACWaterToAirHeatPump_Impl::isMaximumSupplyAirTemperaturefromSupplementalHeaterAutosized() const {
315 3 bool result = false;
316
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<std::string> value = getString(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumSupplyAirTemperaturefromSupplementalHeater, true);
317
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 if (value) {
318
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
6 result = openstudio::istringEqual(value.get(), "Autosize");
319 }
320 3 return result;
321 3 }
322
323 3 double ZoneHVACWaterToAirHeatPump_Impl::maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation() const {
324 boost::optional<double> value =
325
1/1
✓ Branch 1 taken 3 times.
3 getDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation, true);
326
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(value);
327
1/1
✓ Branch 1 taken 3 times.
6 return value.get();
328 }
329
330 1 bool ZoneHVACWaterToAirHeatPump_Impl::isMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperationDefaulted() const {
331 1 return isEmpty(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation);
332 }
333
334 10 std::string ZoneHVACWaterToAirHeatPump_Impl::fanPlacement() const {
335
1/1
✓ Branch 1 taken 10 times.
10 boost::optional<std::string> value = getString(OS_ZoneHVAC_WaterToAirHeatPumpFields::FanPlacement, true);
336
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 10 times.
✗ Branch 4 not taken.
10 OS_ASSERT(value);
337
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
20 return value.get();
338 10 }
339
340 1 bool ZoneHVACWaterToAirHeatPump_Impl::isFanPlacementDefaulted() const {
341 1 return isEmpty(OS_ZoneHVAC_WaterToAirHeatPumpFields::FanPlacement);
342 }
343
344 4 std::string ZoneHVACWaterToAirHeatPump_Impl::heatPumpCoilWaterFlowMode() const {
345
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<std::string> value = getString(OS_ZoneHVAC_WaterToAirHeatPumpFields::HeatPumpCoilWaterFlowMode, true);
346
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
347
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
8 return value.get();
348 4 }
349
350 2 bool ZoneHVACWaterToAirHeatPump_Impl::isHeatPumpCoilWaterFlowModeDefaulted() const {
351 2 return isEmpty(OS_ZoneHVAC_WaterToAirHeatPumpFields::HeatPumpCoilWaterFlowMode);
352 }
353
354 2 boost::optional<Schedule> ZoneHVACWaterToAirHeatPump_Impl::supplyAirFanOperatingModeSchedule() const {
355
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFanOperatingModeScheduleName);
356 }
357
358 2 double ZoneHVACWaterToAirHeatPump_Impl::dXHeatingCoilSizingRatio() const {
359
1/1
✓ Branch 1 taken 2 times.
2 boost::optional<double> value = getDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::DXHeatingCoilSizingRatio, true);
360
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
2 OS_ASSERT(value);
361
1/1
✓ Branch 1 taken 2 times.
4 return value.get();
362 }
363
364 7 bool ZoneHVACWaterToAirHeatPump_Impl::setAvailabilitySchedule(Schedule& schedule) {
365 bool result =
366
3/3
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
28 setSchedule(OS_ZoneHVAC_WaterToAirHeatPumpFields::AvailabilityScheduleName, "ZoneHVACWaterToAirHeatPump", "Availability", schedule);
367 7 return result;
368 }
369
370 bool
371 ✗ ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFlowRateDuringCoolingOperation(boost::optional<double> supplyAirFlowRateDuringCoolingOperation) {
372 ✗ bool result = false;
373 ✗ if (supplyAirFlowRateDuringCoolingOperation) {
374 result =
375 ✗ setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringCoolingOperation, supplyAirFlowRateDuringCoolingOperation.get());
376 }
377 ✗ return result;
378 }
379 2 bool ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFlowRateDuringCoolingOperation(double supplyAirFlowRateDuringCoolingOperation) {
380 2 return setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringCoolingOperation, supplyAirFlowRateDuringCoolingOperation);
381 }
382
383 1 void ZoneHVACWaterToAirHeatPump_Impl::resetSupplyAirFlowRateDuringCoolingOperation() {
384
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringCoolingOperation, "");
385
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
386 1 }
387
388 7 void ZoneHVACWaterToAirHeatPump_Impl::autosizeSupplyAirFlowRateDuringCoolingOperation() {
389
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringCoolingOperation, "Autosize");
390
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
391 7 }
392
393 bool
394 ✗ ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFlowRateDuringHeatingOperation(boost::optional<double> supplyAirFlowRateDuringHeatingOperation) {
395 ✗ bool result(false);
396 ✗ if (supplyAirFlowRateDuringHeatingOperation) {
397 result =
398 ✗ setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringHeatingOperation, supplyAirFlowRateDuringHeatingOperation.get());
399 }
400 ✗ return result;
401 }
402 2 bool ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFlowRateDuringHeatingOperation(double supplyAirFlowRateDuringHeatingOperation) {
403 2 return setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringHeatingOperation, supplyAirFlowRateDuringHeatingOperation);
404 }
405
406 1 void ZoneHVACWaterToAirHeatPump_Impl::resetSupplyAirFlowRateDuringHeatingOperation() {
407
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringHeatingOperation, "");
408
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
409 1 }
410
411 7 void ZoneHVACWaterToAirHeatPump_Impl::autosizeSupplyAirFlowRateDuringHeatingOperation() {
412
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateDuringHeatingOperation, "Autosize");
413
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
414 7 }
415
416 ✗ bool ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(
417 boost::optional<double> supplyAirFlowRateWhenNoCoolingorHeatingisNeeded) {
418 ✗ bool result(false);
419 ✗ if (supplyAirFlowRateWhenNoCoolingorHeatingisNeeded) {
420 ✗ result = setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateWhenNoCoolingorHeatingisNeeded,
421 ✗ supplyAirFlowRateWhenNoCoolingorHeatingisNeeded.get());
422 } else {
423 ✗ resetSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded();
424 ✗ result = true;
425 }
426 ✗ return result;
427 }
428 2 bool ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(double supplyAirFlowRateWhenNoCoolingorHeatingisNeeded) {
429 2 return setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateWhenNoCoolingorHeatingisNeeded,
430 2 supplyAirFlowRateWhenNoCoolingorHeatingisNeeded);
431 }
432
433 1 void ZoneHVACWaterToAirHeatPump_Impl::resetSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded() {
434
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateWhenNoCoolingorHeatingisNeeded, "");
435
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
436 1 }
437
438 7 void ZoneHVACWaterToAirHeatPump_Impl::autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded() {
439
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFlowRateWhenNoCoolingorHeatingisNeeded, "autosize");
440
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
441 7 }
442
443 7 bool ZoneHVACWaterToAirHeatPump_Impl::setNoLoadSupplyAirFlowRateControlSetToLowSpeed(bool noLoadSupplyAirFlowRateControlSetToLowSpeed) {
444 7 return setBooleanFieldValue(OS_ZoneHVAC_WaterToAirHeatPumpFields::NoLoadSupplyAirFlowRateControlSetToLowSpeed,
445 7 noLoadSupplyAirFlowRateControlSetToLowSpeed);
446 }
447
448 bool
449 ✗ ZoneHVACWaterToAirHeatPump_Impl::setOutdoorAirFlowRateDuringCoolingOperation(boost::optional<double> outdoorAirFlowRateDuringCoolingOperation) {
450 ✗ bool result(false);
451 ✗ if (outdoorAirFlowRateDuringCoolingOperation) {
452 result =
453 ✗ setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringCoolingOperation, outdoorAirFlowRateDuringCoolingOperation.get());
454 }
455 ✗ return result;
456 }
457 2 bool ZoneHVACWaterToAirHeatPump_Impl::setOutdoorAirFlowRateDuringCoolingOperation(double outdoorAirFlowRateDuringCoolingOperation) {
458 2 return setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringCoolingOperation, outdoorAirFlowRateDuringCoolingOperation);
459 }
460
461 1 void ZoneHVACWaterToAirHeatPump_Impl::resetOutdoorAirFlowRateDuringCoolingOperation() {
462
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringCoolingOperation, "");
463
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
464 1 }
465
466 7 void ZoneHVACWaterToAirHeatPump_Impl::autosizeOutdoorAirFlowRateDuringCoolingOperation() {
467
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringCoolingOperation, "autosize");
468
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
469 7 }
470
471 bool
472 ✗ ZoneHVACWaterToAirHeatPump_Impl::setOutdoorAirFlowRateDuringHeatingOperation(boost::optional<double> outdoorAirFlowRateDuringHeatingOperation) {
473 ✗ bool result(false);
474 ✗ if (outdoorAirFlowRateDuringHeatingOperation) {
475 result =
476 ✗ setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringHeatingOperation, outdoorAirFlowRateDuringHeatingOperation.get());
477 }
478 ✗ return result;
479 }
480 2 bool ZoneHVACWaterToAirHeatPump_Impl::setOutdoorAirFlowRateDuringHeatingOperation(double outdoorAirFlowRateDuringHeatingOperation) {
481 2 return setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringHeatingOperation, outdoorAirFlowRateDuringHeatingOperation);
482 }
483
484 1 void ZoneHVACWaterToAirHeatPump_Impl::resetOutdoorAirFlowRateDuringHeatingOperation() {
485
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringHeatingOperation, "");
486
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
487 1 }
488
489 7 void ZoneHVACWaterToAirHeatPump_Impl::autosizeOutdoorAirFlowRateDuringHeatingOperation() {
490
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateDuringHeatingOperation, "autosize");
491
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
492 7 }
493
494 ✗ bool ZoneHVACWaterToAirHeatPump_Impl::setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(
495 boost::optional<double> outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded) {
496 ✗ bool result(false);
497 ✗ if (outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded) {
498 ✗ result = setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded,
499 ✗ outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded.get());
500 } else {
501 ✗ resetOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded();
502 ✗ result = true;
503 }
504 ✗ return result;
505 }
506 bool
507 2 ZoneHVACWaterToAirHeatPump_Impl::setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(double outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded) {
508 2 return setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded,
509 2 outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded);
510 }
511
512 1 void ZoneHVACWaterToAirHeatPump_Impl::resetOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded() {
513
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded, "");
514
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
515 1 }
516
517 7 void ZoneHVACWaterToAirHeatPump_Impl::autosizeOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded() {
518
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::OutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded, "Autosize");
519
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
520 7 }
521
522 7 bool ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFan(HVACComponent& fan) {
523
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 return setPointer(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFanName, fan.handle());
524 }
525
526 7 bool ZoneHVACWaterToAirHeatPump_Impl::setHeatingCoil(HVACComponent& heatingCoilsWaterToAirHP) {
527
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 return setPointer(OS_ZoneHVAC_WaterToAirHeatPumpFields::HeatingCoilName, heatingCoilsWaterToAirHP.handle());
528 }
529
530 7 bool ZoneHVACWaterToAirHeatPump_Impl::setCoolingCoil(HVACComponent& coolingCoilsWaterToAirHP) {
531
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 return setPointer(OS_ZoneHVAC_WaterToAirHeatPumpFields::CoolingCoilName, coolingCoilsWaterToAirHP.handle());
532 }
533
534 7 bool ZoneHVACWaterToAirHeatPump_Impl::setSupplementalHeatingCoil(HVACComponent& heatingCoilName) {
535
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 bool result = setPointer(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplementalHeatingCoilName, heatingCoilName.handle());
536 7 return result;
537 }
538
539 ✗ bool ZoneHVACWaterToAirHeatPump_Impl::setMaximumSupplyAirTemperaturefromSupplementalHeater(
540 boost::optional<double> maximumSupplyAirTemperaturefromSupplementalHeater) {
541 ✗ bool result(false);
542 ✗ if (maximumSupplyAirTemperaturefromSupplementalHeater) {
543 ✗ result = setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumSupplyAirTemperaturefromSupplementalHeater,
544 ✗ maximumSupplyAirTemperaturefromSupplementalHeater.get());
545 }
546 ✗ return result;
547 }
548 2 bool ZoneHVACWaterToAirHeatPump_Impl::setMaximumSupplyAirTemperaturefromSupplementalHeater(
549 double maximumSupplyAirTemperaturefromSupplementalHeater) {
550 2 return setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumSupplyAirTemperaturefromSupplementalHeater,
551 2 maximumSupplyAirTemperaturefromSupplementalHeater);
552 }
553
554 1 void ZoneHVACWaterToAirHeatPump_Impl::resetMaximumSupplyAirTemperaturefromSupplementalHeater() {
555
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumSupplyAirTemperaturefromSupplementalHeater, "");
556
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
557 1 }
558
559 7 void ZoneHVACWaterToAirHeatPump_Impl::autosizeMaximumSupplyAirTemperaturefromSupplementalHeater() {
560
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumSupplyAirTemperaturefromSupplementalHeater, "Autosize");
561
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
562 7 }
563
564 ✗ bool ZoneHVACWaterToAirHeatPump_Impl::setMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation(
565 boost::optional<double> maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation) {
566 ✗ bool result = setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation,
567 ✗ maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation.get());
568 ✗ return result;
569 }
570 2 bool ZoneHVACWaterToAirHeatPump_Impl::setMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation(
571 double maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation) {
572 2 bool result = setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation,
573 maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation);
574 2 return result;
575 }
576
577 1 void ZoneHVACWaterToAirHeatPump_Impl::resetMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation() {
578
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::MaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation, "");
579
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
580 1 }
581
582 3 bool ZoneHVACWaterToAirHeatPump_Impl::setFanPlacement(const std::string& fanPlacement) {
583 3 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::FanPlacement, fanPlacement);
584 3 return result;
585 }
586
587 1 void ZoneHVACWaterToAirHeatPump_Impl::resetFanPlacement() {
588
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::FanPlacement, "");
589
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
590 1 }
591
592 2 bool ZoneHVACWaterToAirHeatPump_Impl::setHeatPumpCoilWaterFlowMode(const std::string& heatPumpCoilWaterFlowMode) {
593 2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::HeatPumpCoilWaterFlowMode, heatPumpCoilWaterFlowMode);
594 2 return result;
595 }
596
597 1 void ZoneHVACWaterToAirHeatPump_Impl::resetHeatPumpCoilWaterFlowMode() {
598
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::HeatPumpCoilWaterFlowMode, "");
599
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
600 1 }
601
602 1 bool ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFanOperatingModeSchedule(Schedule& schedule) {
603
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
4 bool result = setSchedule(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFanOperatingModeScheduleName, "ZoneHVACWaterToAirHeatPump",
604 "Supply Air Fan Operating Mode", schedule);
605 1 return result;
606 }
607
608 ✗ void ZoneHVACWaterToAirHeatPump_Impl::resetSupplyAirFanOperatingModeSchedule() {
609 ✗ bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFanOperatingModeScheduleName, "");
610 ✗ OS_ASSERT(result);
611 ✗ }
612
613 6 bool ZoneHVACWaterToAirHeatPump_Impl::setDXHeatingCoilSizingRatio(double dxHeatingCoilSizingRatio) {
614 6 bool result = setDouble(OS_ZoneHVAC_WaterToAirHeatPumpFields::DXHeatingCoilSizingRatio, dxHeatingCoilSizingRatio);
615 6 return result;
616 }
617
618 3 boost::optional<Schedule> ZoneHVACWaterToAirHeatPump_Impl::optionalAvailabilitySchedule() const {
619
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ZoneHVAC_WaterToAirHeatPumpFields::AvailabilityScheduleName);
620 }
621
622 8 boost::optional<HVACComponent> ZoneHVACWaterToAirHeatPump_Impl::optionalSupplyAirFan() const {
623
2/2
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
8 return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFanName);
624 }
625
626 6 boost::optional<HVACComponent> ZoneHVACWaterToAirHeatPump_Impl::optionalHeatingCoil() const {
627
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_ZoneHVAC_WaterToAirHeatPumpFields::HeatingCoilName);
628 }
629
630 6 boost::optional<HVACComponent> ZoneHVACWaterToAirHeatPump_Impl::optionalCoolingCoil() const {
631
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_ZoneHVAC_WaterToAirHeatPumpFields::CoolingCoilName);
632 }
633
634 6 boost::optional<HVACComponent> ZoneHVACWaterToAirHeatPump_Impl::optionalSupplementalHeatingCoil() const {
635
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplementalHeatingCoilName);
636 }
637
638 ✗ std::vector<std::string> ZoneHVACWaterToAirHeatPump_Impl::fanPlacementValues() const {
639 ✗ return ZoneHVACWaterToAirHeatPump::fanPlacementValues();
640 }
641
642 ✗ std::vector<std::string> ZoneHVACWaterToAirHeatPump_Impl::heatPumpCoilWaterFlowModeValues() const {
643 ✗ return ZoneHVACWaterToAirHeatPump::heatPumpCoilWaterFlowModeValues();
644 }
645
646 ✗ boost::optional<ModelObject> ZoneHVACWaterToAirHeatPump_Impl::availabilityScheduleAsModelObject() const {
647 ✗ OptionalModelObject result = availabilitySchedule();
648 ✗ return result;
649 }
650
651 ✗ boost::optional<ModelObject> ZoneHVACWaterToAirHeatPump_Impl::supplyAirFanAsModelObject() const {
652 ✗ OptionalModelObject result = supplyAirFan();
653 ✗ return result;
654 }
655
656 ✗ boost::optional<ModelObject> ZoneHVACWaterToAirHeatPump_Impl::heatingCoilAsModelObject() const {
657 ✗ OptionalModelObject result = heatingCoil();
658 ✗ return result;
659 }
660
661 ✗ boost::optional<ModelObject> ZoneHVACWaterToAirHeatPump_Impl::coolingCoilAsModelObject() const {
662 ✗ OptionalModelObject result = coolingCoil();
663 ✗ return result;
664 }
665
666 ✗ boost::optional<ModelObject> ZoneHVACWaterToAirHeatPump_Impl::supplementalHeatingCoilAsModelObject() const {
667 ✗ OptionalModelObject result = supplementalHeatingCoil();
668 ✗ return result;
669 }
670
671 ✗ boost::optional<ModelObject> ZoneHVACWaterToAirHeatPump_Impl::supplyAirFanOperatingModeScheduleAsModelObject() const {
672 ✗ OptionalModelObject result;
673 ✗ OptionalSchedule intermediate = supplyAirFanOperatingModeSchedule();
674 ✗ if (intermediate) {
675 ✗ result = *intermediate;
676 }
677 ✗ return result;
678 ✗ }
679
680 ✗ bool ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFanAsModelObject(const boost::optional<ModelObject>& modelObject) {
681 ✗ if (modelObject) {
682 ✗ OptionalHVACComponent intermediate = modelObject->optionalCast<HVACComponent>();
683 ✗ if (intermediate) {
684 ✗ HVACComponent fansOnOff(*intermediate);
685 ✗ setSupplyAirFan(fansOnOff);
686 ✗ return true;
687 ✗ }
688 ✗ }
689 ✗ return false;
690 }
691
692 ✗ bool ZoneHVACWaterToAirHeatPump_Impl::setHeatingCoilAsModelObject(const boost::optional<ModelObject>& modelObject) {
693 ✗ if (modelObject) {
694 ✗ OptionalHVACComponent intermediate = modelObject->optionalCast<HVACComponent>();
695 ✗ if (intermediate) {
696 ✗ HVACComponent heatingCoilsWaterToAirHP(*intermediate);
697 ✗ setHeatingCoil(heatingCoilsWaterToAirHP);
698 ✗ return true;
699 ✗ }
700 ✗ }
701 ✗ return false;
702 }
703
704 ✗ bool ZoneHVACWaterToAirHeatPump_Impl::setCoolingCoilAsModelObject(const boost::optional<ModelObject>& modelObject) {
705 ✗ if (modelObject) {
706 ✗ OptionalHVACComponent intermediate = modelObject->optionalCast<HVACComponent>();
707 ✗ if (intermediate) {
708 ✗ HVACComponent coolingCoilsWaterToAirHP(*intermediate);
709 ✗ setCoolingCoil(coolingCoilsWaterToAirHP);
710 ✗ return true;
711 ✗ }
712 ✗ }
713 ✗ return false;
714 }
715
716 ✗ bool ZoneHVACWaterToAirHeatPump_Impl::setSupplementalHeatingCoilAsModelObject(const boost::optional<ModelObject>& modelObject) {
717 ✗ if (modelObject) {
718 ✗ OptionalHVACComponent intermediate = modelObject->optionalCast<HVACComponent>();
719 ✗ if (intermediate) {
720 ✗ HVACComponent heatingCoilName(*intermediate);
721 ✗ setSupplementalHeatingCoil(heatingCoilName);
722 ✗ return true;
723 ✗ }
724 ✗ }
725 ✗ return false;
726 }
727
728 ✗ bool ZoneHVACWaterToAirHeatPump_Impl::setSupplyAirFanOperatingModeScheduleAsModelObject(const boost::optional<ModelObject>& modelObject) {
729 ✗ if (modelObject) {
730 ✗ OptionalSchedule intermediate = modelObject->optionalCast<Schedule>();
731 ✗ if (intermediate) {
732 ✗ Schedule schedule(*intermediate);
733 ✗ return setSupplyAirFanOperatingModeSchedule(schedule);
734 ✗ } else {
735 ✗ return false;
736 }
737 ✗ } else {
738 ✗ resetSupplyAirFanOperatingModeSchedule();
739 }
740 ✗ return true;
741 }
742
743 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::autosizedSupplyAirFlowRateDuringCoolingOperation() const {
744 ✗ return getAutosizedValue("Design Size Cooling Supply Air Flow Rate", "m3/s");
745 }
746
747 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::autosizedSupplyAirFlowRateDuringHeatingOperation() const {
748 ✗ return getAutosizedValue("Design Size Heating Supply Air Flow Rate", "m3/s");
749 }
750
751 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded() const {
752 ✗ return getAutosizedValue("Design Size No Load Supply Air Flow Rate", "m3/s");
753 }
754
755 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::autosizedOutdoorAirFlowRateDuringCoolingOperation() const {
756 ✗ return getAutosizedValue("Design Size Outdoor Air Flow Rate During Cooling Operation", "m3/s");
757 }
758
759 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::autosizedOutdoorAirFlowRateDuringHeatingOperation() const {
760 ✗ return getAutosizedValue("Design Size Outdoor Air Flow Rate During Heating Operation", "m3/s");
761 }
762
763 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded() const {
764 ✗ return getAutosizedValue("Design Size Outdoor Air Flow Rate When No Cooling or Heating is Needed", "m3/s");
765 }
766
767 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump_Impl::autosizedMaximumSupplyAirTemperaturefromSupplementalHeater() const {
768 ✗ return getAutosizedValue("Design Size Maximum Supply Air Temperature from Supplemental Heater", "C");
769 }
770
771 ✗ void ZoneHVACWaterToAirHeatPump_Impl::autosize() {
772 ✗ autosizeSupplyAirFlowRateDuringCoolingOperation();
773 ✗ autosizeSupplyAirFlowRateDuringHeatingOperation();
774 ✗ autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded();
775 ✗ autosizeOutdoorAirFlowRateDuringCoolingOperation();
776 ✗ autosizeOutdoorAirFlowRateDuringHeatingOperation();
777 ✗ autosizeOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded();
778 ✗ autosizeMaximumSupplyAirTemperaturefromSupplementalHeater();
779 ✗ }
780
781 ✗ void ZoneHVACWaterToAirHeatPump_Impl::applySizingValues() {
782 ✗ boost::optional<double> val;
783 ✗ val = autosizedSupplyAirFlowRateDuringCoolingOperation();
784 ✗ if (val) {
785 ✗ setSupplyAirFlowRateDuringCoolingOperation(val.get());
786 }
787
788 ✗ val = autosizedSupplyAirFlowRateDuringHeatingOperation();
789 ✗ if (val) {
790 ✗ setSupplyAirFlowRateDuringHeatingOperation(val.get());
791 }
792
793 ✗ val = autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded();
794 ✗ if (val) {
795 ✗ setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(val.get());
796 }
797
798 ✗ val = autosizedOutdoorAirFlowRateDuringCoolingOperation();
799 ✗ if (val) {
800 ✗ setOutdoorAirFlowRateDuringCoolingOperation(val.get());
801 }
802
803 ✗ val = autosizedOutdoorAirFlowRateDuringHeatingOperation();
804 ✗ if (val) {
805 ✗ setOutdoorAirFlowRateDuringHeatingOperation(val.get());
806 }
807
808 ✗ val = autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded();
809 ✗ if (val) {
810 ✗ setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(val.get());
811 }
812
813 ✗ val = autosizedMaximumSupplyAirTemperaturefromSupplementalHeater();
814 ✗ if (val) {
815 ✗ setMaximumSupplyAirTemperaturefromSupplementalHeater(val.get());
816 }
817 ✗ }
818
819 ✗ ComponentType ZoneHVACWaterToAirHeatPump_Impl::componentType() const {
820 ✗ return ComponentType::Both;
821 }
822
823 ✗ std::vector<FuelType> ZoneHVACWaterToAirHeatPump_Impl::coolingFuelTypes() const {
824 ✗ std::set<FuelType> result;
825 ✗ for (auto ft : coolingCoil().coolingFuelTypes()) {
826 ✗ result.insert(ft);
827 ✗ }
828 ✗ return {result.begin(), result.end()};
829 ✗ }
830
831 ✗ std::vector<FuelType> ZoneHVACWaterToAirHeatPump_Impl::heatingFuelTypes() const {
832 ✗ std::set<FuelType> result;
833 ✗ for (auto ft : heatingCoil().heatingFuelTypes()) {
834 ✗ result.insert(ft);
835 ✗ }
836 ✗ for (auto ft : supplementalHeatingCoil().heatingFuelTypes()) {
837 ✗ result.insert(ft);
838 ✗ }
839 ✗ return {result.begin(), result.end()};
840 ✗ }
841
842 ✗ std::vector<AppGFuelType> ZoneHVACWaterToAirHeatPump_Impl::appGHeatingFuelTypes() const {
843 ✗ std::set<AppGFuelType> result;
844 ✗ for (auto ft : heatingCoil().appGHeatingFuelTypes()) {
845 ✗ result.insert(ft);
846 ✗ }
847 ✗ for (auto ft : supplementalHeatingCoil().appGHeatingFuelTypes()) {
848 ✗ result.insert(ft);
849 ✗ }
850 ✗ return {result.begin(), result.end()};
851 ✗ }
852
853 } // namespace detail
854
855 6 ZoneHVACWaterToAirHeatPump::ZoneHVACWaterToAirHeatPump(const Model& model, Schedule& availabilitySchedule, HVACComponent& supplyAirFan,
856 HVACComponent& heatingCoil, HVACComponent& coolingCoil,
857 6 HVACComponent& supplementalHeatingCoil)
858 6 : ZoneHVACComponent(ZoneHVACWaterToAirHeatPump::iddObjectType(), model) {
859
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 6 times.
✗ Branch 5 not taken.
6 OS_ASSERT(getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>());
860
861
1/1
✓ Branch 1 taken 6 times.
6 bool ok = setAvailabilitySchedule(availabilitySchedule);
862
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
6 if (!ok) {
863 ✗ remove();
864 ✗ LOG_AND_THROW("Unable to set " << briefDescription() << "'s availability schedule to " << availabilitySchedule.briefDescription() << ".");
865 }
866
867
1/1
✓ Branch 1 taken 6 times.
6 ok = setSupplyAirFan(supplyAirFan);
868
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
869
1/1
✓ Branch 1 taken 6 times.
6 ok = setHeatingCoil(heatingCoil);
870
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
871
1/1
✓ Branch 1 taken 6 times.
6 ok = setCoolingCoil(coolingCoil);
872
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
873
1/1
✓ Branch 1 taken 6 times.
6 ok = setSupplementalHeatingCoil(supplementalHeatingCoil);
874
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
875
876
1/1
✓ Branch 1 taken 6 times.
6 autosizeSupplyAirFlowRateDuringCoolingOperation();
877
1/1
✓ Branch 1 taken 6 times.
6 autosizeSupplyAirFlowRateDuringHeatingOperation();
878
1/1
✓ Branch 1 taken 6 times.
6 autosizeOutdoorAirFlowRateDuringCoolingOperation();
879
1/1
✓ Branch 1 taken 6 times.
6 autosizeOutdoorAirFlowRateDuringHeatingOperation();
880
1/1
✓ Branch 1 taken 6 times.
6 autosizeMaximumSupplyAirTemperaturefromSupplementalHeater();
881
1/1
✓ Branch 1 taken 6 times.
6 autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded();
882
1/1
✓ Branch 1 taken 6 times.
6 setNoLoadSupplyAirFlowRateControlSetToLowSpeed(true);
883
1/1
✓ Branch 1 taken 6 times.
6 autosizeOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded();
884
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
12 setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::AvailabilityManagerListName, "");
885
1/1
✓ Branch 1 taken 6 times.
6 setDXHeatingCoilSizingRatio(1.0);
886 6 }
887
888 7761 IddObjectType ZoneHVACWaterToAirHeatPump::iddObjectType() {
889
1/1
✓ Branch 1 taken 7761 times.
7761 return {IddObjectType::OS_ZoneHVAC_WaterToAirHeatPump};
890 }
891
892 ✗ std::vector<std::string> ZoneHVACWaterToAirHeatPump::fanPlacementValues() {
893 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_ZoneHVAC_WaterToAirHeatPumpFields::FanPlacement);
894 }
895
896 ✗ std::vector<std::string> ZoneHVACWaterToAirHeatPump::heatPumpCoilWaterFlowModeValues() {
897 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_ZoneHVAC_WaterToAirHeatPumpFields::HeatPumpCoilWaterFlowMode);
898 }
899
900 3 Schedule ZoneHVACWaterToAirHeatPump::availabilitySchedule() const {
901
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->availabilitySchedule();
902 }
903
904 4 boost::optional<double> ZoneHVACWaterToAirHeatPump::supplyAirFlowRateDuringCoolingOperation() const {
905
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->supplyAirFlowRateDuringCoolingOperation();
906 }
907
908 3 bool ZoneHVACWaterToAirHeatPump::isSupplyAirFlowRateDuringCoolingOperationAutosized() const {
909
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isSupplyAirFlowRateDuringCoolingOperationAutosized();
910 }
911
912 4 boost::optional<double> ZoneHVACWaterToAirHeatPump::supplyAirFlowRateDuringHeatingOperation() const {
913
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->supplyAirFlowRateDuringHeatingOperation();
914 }
915
916 4 bool ZoneHVACWaterToAirHeatPump::isSupplyAirFlowRateDuringHeatingOperationAutosized() const {
917
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isSupplyAirFlowRateDuringHeatingOperationAutosized();
918 }
919
920 4 boost::optional<double> ZoneHVACWaterToAirHeatPump::supplyAirFlowRateWhenNoCoolingorHeatingisNeeded() const {
921
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->supplyAirFlowRateWhenNoCoolingorHeatingisNeeded();
922 }
923
924 4 bool ZoneHVACWaterToAirHeatPump::isSupplyAirFlowRateWhenNoCoolingorHeatingisNeededAutosized() const {
925
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isSupplyAirFlowRateWhenNoCoolingorHeatingisNeededAutosized();
926 }
927
928 4 bool ZoneHVACWaterToAirHeatPump::noLoadSupplyAirFlowRateControlSetToLowSpeed() const {
929
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->noLoadSupplyAirFlowRateControlSetToLowSpeed();
930 }
931
932 8 boost::optional<double> ZoneHVACWaterToAirHeatPump::outdoorAirFlowRateDuringCoolingOperation() const {
933
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->outdoorAirFlowRateDuringCoolingOperation();
934 }
935
936 4 bool ZoneHVACWaterToAirHeatPump::isOutdoorAirFlowRateDuringCoolingOperationAutosized() const {
937
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isOutdoorAirFlowRateDuringCoolingOperationAutosized();
938 }
939
940 8 boost::optional<double> ZoneHVACWaterToAirHeatPump::outdoorAirFlowRateDuringHeatingOperation() const {
941
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->outdoorAirFlowRateDuringHeatingOperation();
942 }
943
944 4 bool ZoneHVACWaterToAirHeatPump::isOutdoorAirFlowRateDuringHeatingOperationAutosized() const {
945
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isOutdoorAirFlowRateDuringHeatingOperationAutosized();
946 }
947
948 8 boost::optional<double> ZoneHVACWaterToAirHeatPump::outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded() const {
949
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded();
950 }
951
952 4 bool ZoneHVACWaterToAirHeatPump::isOutdoorAirFlowRateWhenNoCoolingorHeatingisNeededAutosized() const {
953
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isOutdoorAirFlowRateWhenNoCoolingorHeatingisNeededAutosized();
954 }
955
956 6 HVACComponent ZoneHVACWaterToAirHeatPump::supplyAirFan() const {
957
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->supplyAirFan();
958 }
959
960 4 HVACComponent ZoneHVACWaterToAirHeatPump::heatingCoil() const {
961
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->heatingCoil();
962 }
963
964 4 HVACComponent ZoneHVACWaterToAirHeatPump::coolingCoil() const {
965
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->coolingCoil();
966 }
967
968 4 HVACComponent ZoneHVACWaterToAirHeatPump::supplementalHeatingCoil() const {
969
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->supplementalHeatingCoil();
970 }
971
972 3 boost::optional<double> ZoneHVACWaterToAirHeatPump::maximumSupplyAirTemperaturefromSupplementalHeater() const {
973
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->maximumSupplyAirTemperaturefromSupplementalHeater();
974 }
975
976 3 bool ZoneHVACWaterToAirHeatPump::isMaximumSupplyAirTemperaturefromSupplementalHeaterAutosized() const {
977
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isMaximumSupplyAirTemperaturefromSupplementalHeaterAutosized();
978 }
979
980 3 double ZoneHVACWaterToAirHeatPump::maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation() const {
981
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation();
982 }
983
984 1 bool ZoneHVACWaterToAirHeatPump::isMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperationDefaulted() const {
985
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperationDefaulted();
986 }
987
988 10 std::string ZoneHVACWaterToAirHeatPump::fanPlacement() const {
989
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->fanPlacement();
990 }
991
992 1 bool ZoneHVACWaterToAirHeatPump::isFanPlacementDefaulted() const {
993
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isFanPlacementDefaulted();
994 }
995
996 4 std::string ZoneHVACWaterToAirHeatPump::heatPumpCoilWaterFlowMode() const {
997 ;
998
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->heatPumpCoilWaterFlowMode();
999 }
1000
1001 2 bool ZoneHVACWaterToAirHeatPump::isHeatPumpCoilWaterFlowModeDefaulted() const {
1002
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->isHeatPumpCoilWaterFlowModeDefaulted();
1003 }
1004
1005 2 boost::optional<Schedule> ZoneHVACWaterToAirHeatPump::supplyAirFanOperatingModeSchedule() const {
1006
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->supplyAirFanOperatingModeSchedule();
1007 }
1008
1009 2 double ZoneHVACWaterToAirHeatPump::dXHeatingCoilSizingRatio() const {
1010
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->dXHeatingCoilSizingRatio();
1011 }
1012
1013 7 bool ZoneHVACWaterToAirHeatPump::setAvailabilitySchedule(Schedule& schedule) {
1014
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setAvailabilitySchedule(schedule);
1015 }
1016
1017 ✗ bool ZoneHVACWaterToAirHeatPump::setSupplyAirFlowRateDuringCoolingOperation(boost::optional<double> supplyAirFlowRateDuringCoolingOperation) {
1018 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setSupplyAirFlowRateDuringCoolingOperation(supplyAirFlowRateDuringCoolingOperation);
1019 }
1020 2 bool ZoneHVACWaterToAirHeatPump::setSupplyAirFlowRateDuringCoolingOperation(double supplyAirFlowRateDuringCoolingOperation) {
1021
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setSupplyAirFlowRateDuringCoolingOperation(supplyAirFlowRateDuringCoolingOperation);
1022 }
1023
1024 1 void ZoneHVACWaterToAirHeatPump::resetSupplyAirFlowRateDuringCoolingOperation() {
1025
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetSupplyAirFlowRateDuringCoolingOperation();
1026 1 }
1027
1028 7 void ZoneHVACWaterToAirHeatPump::autosizeSupplyAirFlowRateDuringCoolingOperation() {
1029
1/1
✓ Branch 3 taken 7 times.
7 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizeSupplyAirFlowRateDuringCoolingOperation();
1030 7 }
1031
1032 ✗ bool ZoneHVACWaterToAirHeatPump::setSupplyAirFlowRateDuringHeatingOperation(boost::optional<double> supplyAirFlowRateDuringHeatingOperation) {
1033 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setSupplyAirFlowRateDuringHeatingOperation(supplyAirFlowRateDuringHeatingOperation);
1034 }
1035 2 bool ZoneHVACWaterToAirHeatPump::setSupplyAirFlowRateDuringHeatingOperation(double supplyAirFlowRateDuringHeatingOperation) {
1036
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setSupplyAirFlowRateDuringHeatingOperation(supplyAirFlowRateDuringHeatingOperation);
1037 }
1038
1039 1 void ZoneHVACWaterToAirHeatPump::resetSupplyAirFlowRateDuringHeatingOperation() {
1040
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetSupplyAirFlowRateDuringHeatingOperation();
1041 1 }
1042
1043 7 void ZoneHVACWaterToAirHeatPump::autosizeSupplyAirFlowRateDuringHeatingOperation() {
1044
1/1
✓ Branch 3 taken 7 times.
7 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizeSupplyAirFlowRateDuringHeatingOperation();
1045 7 }
1046
1047 ✗ bool ZoneHVACWaterToAirHeatPump::setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(
1048 boost::optional<double> supplyAirFlowRateWhenNoCoolingorHeatingisNeeded) {
1049 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(
1050 ✗ supplyAirFlowRateWhenNoCoolingorHeatingisNeeded);
1051 }
1052 2 bool ZoneHVACWaterToAirHeatPump::setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(double supplyAirFlowRateWhenNoCoolingorHeatingisNeeded) {
1053
1/1
✓ Branch 3 taken 2 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(
1054 4 supplyAirFlowRateWhenNoCoolingorHeatingisNeeded);
1055 }
1056
1057 1 void ZoneHVACWaterToAirHeatPump::resetSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded() {
1058
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded();
1059 1 }
1060
1061 7 void ZoneHVACWaterToAirHeatPump::autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded() {
1062
1/1
✓ Branch 3 taken 7 times.
7 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded();
1063 7 }
1064
1065 7 bool ZoneHVACWaterToAirHeatPump::setNoLoadSupplyAirFlowRateControlSetToLowSpeed(bool noLoadSupplyAirFlowRateControlSetToLowSpeed) {
1066
1/1
✓ Branch 3 taken 7 times.
14 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setNoLoadSupplyAirFlowRateControlSetToLowSpeed(
1067 14 noLoadSupplyAirFlowRateControlSetToLowSpeed);
1068 }
1069
1070 ✗ bool ZoneHVACWaterToAirHeatPump::setOutdoorAirFlowRateDuringCoolingOperation(boost::optional<double> outdoorAirFlowRateDuringCoolingOperation) {
1071 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setOutdoorAirFlowRateDuringCoolingOperation(outdoorAirFlowRateDuringCoolingOperation);
1072 }
1073 2 bool ZoneHVACWaterToAirHeatPump::setOutdoorAirFlowRateDuringCoolingOperation(double outdoorAirFlowRateDuringCoolingOperation) {
1074
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setOutdoorAirFlowRateDuringCoolingOperation(outdoorAirFlowRateDuringCoolingOperation);
1075 }
1076
1077 1 void ZoneHVACWaterToAirHeatPump::resetOutdoorAirFlowRateDuringCoolingOperation() {
1078
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetOutdoorAirFlowRateDuringCoolingOperation();
1079 1 }
1080
1081 7 void ZoneHVACWaterToAirHeatPump::autosizeOutdoorAirFlowRateDuringCoolingOperation() {
1082
1/1
✓ Branch 3 taken 7 times.
7 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizeOutdoorAirFlowRateDuringCoolingOperation();
1083 7 }
1084
1085 ✗ bool ZoneHVACWaterToAirHeatPump::setOutdoorAirFlowRateDuringHeatingOperation(boost::optional<double> outdoorAirFlowRateDuringHeatingOperation) {
1086 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setOutdoorAirFlowRateDuringHeatingOperation(outdoorAirFlowRateDuringHeatingOperation);
1087 }
1088 2 bool ZoneHVACWaterToAirHeatPump::setOutdoorAirFlowRateDuringHeatingOperation(double outdoorAirFlowRateDuringHeatingOperation) {
1089
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setOutdoorAirFlowRateDuringHeatingOperation(outdoorAirFlowRateDuringHeatingOperation);
1090 }
1091
1092 1 void ZoneHVACWaterToAirHeatPump::resetOutdoorAirFlowRateDuringHeatingOperation() {
1093
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetOutdoorAirFlowRateDuringHeatingOperation();
1094 1 }
1095
1096 7 void ZoneHVACWaterToAirHeatPump::autosizeOutdoorAirFlowRateDuringHeatingOperation() {
1097
1/1
✓ Branch 3 taken 7 times.
7 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizeOutdoorAirFlowRateDuringHeatingOperation();
1098 7 }
1099
1100 ✗ bool ZoneHVACWaterToAirHeatPump::setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(
1101 boost::optional<double> outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded) {
1102 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(
1103 ✗ outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded);
1104 }
1105 2 bool ZoneHVACWaterToAirHeatPump::setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(double outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded) {
1106
1/1
✓ Branch 3 taken 2 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(
1107 4 outdoorAirFlowRateWhenNoCoolingorHeatingisNeeded);
1108 }
1109
1110 1 void ZoneHVACWaterToAirHeatPump::resetOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded() {
1111
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded();
1112 1 }
1113
1114 7 void ZoneHVACWaterToAirHeatPump::autosizeOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded() {
1115
1/1
✓ Branch 3 taken 7 times.
7 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizeOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded();
1116 7 }
1117
1118 7 bool ZoneHVACWaterToAirHeatPump::setSupplyAirFan(HVACComponent& fansOnOff) {
1119
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setSupplyAirFan(fansOnOff);
1120 }
1121
1122 7 bool ZoneHVACWaterToAirHeatPump::setHeatingCoil(HVACComponent& heatingCoilsWaterToAirHP) {
1123
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setHeatingCoil(heatingCoilsWaterToAirHP);
1124 }
1125
1126 7 bool ZoneHVACWaterToAirHeatPump::setCoolingCoil(HVACComponent& coolingCoilsWaterToAirHP) {
1127
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setCoolingCoil(coolingCoilsWaterToAirHP);
1128 }
1129
1130 7 bool ZoneHVACWaterToAirHeatPump::setSupplementalHeatingCoil(HVACComponent& heatingCoilName) {
1131
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setSupplementalHeatingCoil(heatingCoilName);
1132 }
1133
1134 ✗ bool ZoneHVACWaterToAirHeatPump::setMaximumSupplyAirTemperaturefromSupplementalHeater(
1135 boost::optional<double> maximumSupplyAirTemperaturefromSupplementalHeater) {
1136 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setMaximumSupplyAirTemperaturefromSupplementalHeater(
1137 ✗ maximumSupplyAirTemperaturefromSupplementalHeater);
1138 }
1139 2 bool ZoneHVACWaterToAirHeatPump::setMaximumSupplyAirTemperaturefromSupplementalHeater(double maximumSupplyAirTemperaturefromSupplementalHeater) {
1140
1/1
✓ Branch 3 taken 2 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setMaximumSupplyAirTemperaturefromSupplementalHeater(
1141 4 maximumSupplyAirTemperaturefromSupplementalHeater);
1142 }
1143
1144 1 void ZoneHVACWaterToAirHeatPump::resetMaximumSupplyAirTemperaturefromSupplementalHeater() {
1145
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetMaximumSupplyAirTemperaturefromSupplementalHeater();
1146 1 }
1147
1148 7 void ZoneHVACWaterToAirHeatPump::autosizeMaximumSupplyAirTemperaturefromSupplementalHeater() {
1149
1/1
✓ Branch 3 taken 7 times.
7 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizeMaximumSupplyAirTemperaturefromSupplementalHeater();
1150 7 }
1151
1152 ✗ bool ZoneHVACWaterToAirHeatPump::setMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation(
1153 boost::optional<double> maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation) {
1154 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation(
1155 ✗ maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation);
1156 }
1157 2 bool ZoneHVACWaterToAirHeatPump::setMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation(
1158 double maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation) {
1159
1/1
✓ Branch 3 taken 2 times.
4 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation(
1160 4 maximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation);
1161 }
1162
1163 1 void ZoneHVACWaterToAirHeatPump::resetMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation() {
1164
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetMaximumOutdoorDryBulbTemperatureforSupplementalHeaterOperation();
1165 1 }
1166
1167 3 bool ZoneHVACWaterToAirHeatPump::setFanPlacement(const std::string& fanPlacement) {
1168
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setFanPlacement(fanPlacement);
1169 }
1170
1171 1 void ZoneHVACWaterToAirHeatPump::resetFanPlacement() {
1172
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetFanPlacement();
1173 1 }
1174
1175 2 bool ZoneHVACWaterToAirHeatPump::setHeatPumpCoilWaterFlowMode(const std::string& heatPumpCoilWaterFlowMode) {
1176
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setHeatPumpCoilWaterFlowMode(heatPumpCoilWaterFlowMode);
1177 }
1178
1179 1 void ZoneHVACWaterToAirHeatPump::resetHeatPumpCoilWaterFlowMode() {
1180
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetHeatPumpCoilWaterFlowMode();
1181 1 }
1182
1183 1 bool ZoneHVACWaterToAirHeatPump::setSupplyAirFanOperatingModeSchedule(Schedule& schedule) {
1184
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setSupplyAirFanOperatingModeSchedule(schedule);
1185 }
1186
1187 ✗ void ZoneHVACWaterToAirHeatPump::resetSupplyAirFanOperatingModeSchedule() {
1188 ✗ getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetSupplyAirFanOperatingModeSchedule();
1189 ✗ }
1190
1191 6 bool ZoneHVACWaterToAirHeatPump::setDXHeatingCoilSizingRatio(double dxHeatingCoilSizingRatio) {
1192
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setDXHeatingCoilSizingRatio(dxHeatingCoilSizingRatio);
1193 }
1194
1195 /// @cond
1196 8 ZoneHVACWaterToAirHeatPump::ZoneHVACWaterToAirHeatPump(std::shared_ptr<detail::ZoneHVACWaterToAirHeatPump_Impl> impl)
1197
1/1
✓ Branch 3 taken 8 times.
8 : ZoneHVACComponent(std::move(impl)) {}
1198
1199 // DEPRECATED
1200
1201 ✗ double ZoneHVACWaterToAirHeatPump::maximumCyclingRate() const {
1202 ✗ DEPRECATED_AT_MSG(3, 7, 0,
1203 "As of EnergyPlus 23.2.0, this property is on the child cooling coil. Use coolingCoil().maximumCyclingRate() instead.");
1204 ✗ double result = 2.5; // former default
1205 ✗ const HVACComponent c = coolingCoil();
1206 ✗ if (auto c_eq_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpEquationFit>()) {
1207 ✗ result = c_eq_->maximumCyclingRate();
1208 ✗ } else if (auto c_vs_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit>()) {
1209 ✗ result = c_vs_->maximumCyclingRate();
1210 ✗ }
1211 ✗ return result;
1212 ✗ }
1213
1214 ✗ bool ZoneHVACWaterToAirHeatPump::isMaximumCyclingRateDefaulted() const {
1215 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is on the child cooling coil and it's a required-field");
1216 ✗ return false;
1217 }
1218
1219 ✗ bool ZoneHVACWaterToAirHeatPump::setMaximumCyclingRate(double maximumCyclingRate) {
1220 ✗ DEPRECATED_AT_MSG(3, 7, 0,
1221 "As of EnergyPlus 23.2.0, this property is on the child cooling coil. Use coolingCoil().setMaximumCyclingRate() instead.");
1222 ✗ bool result = false;
1223 ✗ const HVACComponent c = coolingCoil();
1224 ✗ if (auto c_eq_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpEquationFit>()) {
1225 ✗ result = c_eq_->setMaximumCyclingRate(maximumCyclingRate);
1226 ✗ } else if (auto c_vs_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit>()) {
1227 ✗ result = c_vs_->setMaximumCyclingRate(maximumCyclingRate);
1228 ✗ }
1229 ✗ return result;
1230 ✗ }
1231
1232 ✗ void ZoneHVACWaterToAirHeatPump::resetMaximumCyclingRate() {
1233 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is on the child cooling coil and it's a required-field");
1234 ✗ }
1235
1236 ✗ double ZoneHVACWaterToAirHeatPump::heatPumpTimeConstant() const {
1237 ✗ DEPRECATED_AT_MSG(3, 7, 0,
1238 "As of EnergyPlus 23.2.0, this property is on the child cooling coil. Use coolingCoil().latentCapacityTimeConstant() instead.");
1239 ✗ double result = 60; // former default
1240 ✗ const HVACComponent c = coolingCoil();
1241 ✗ if (auto c_eq_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpEquationFit>()) {
1242 ✗ result = c_eq_->latentCapacityTimeConstant();
1243 ✗ } else if (auto c_vs_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit>()) {
1244 ✗ result = c_vs_->latentCapacityTimeConstant();
1245 ✗ }
1246 ✗ return result;
1247 ✗ }
1248
1249 ✗ bool ZoneHVACWaterToAirHeatPump::isHeatPumpTimeConstantDefaulted() const {
1250 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is on the child cooling coil and it's a required-field");
1251 ✗ return false;
1252 }
1253
1254 ✗ bool ZoneHVACWaterToAirHeatPump::setHeatPumpTimeConstant(double heatPumpTimeConstant) {
1255 ✗ DEPRECATED_AT_MSG(
1256 3, 7, 0, "As of EnergyPlus 23.2.0, this property is on the child cooling coil. Use coolingCoil().setLatentCapacityTimeConstant() instead.");
1257 ✗ bool result = false;
1258 ✗ const HVACComponent c = coolingCoil();
1259 ✗ if (auto c_eq_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpEquationFit>()) {
1260 ✗ result = c_eq_->setLatentCapacityTimeConstant(heatPumpTimeConstant);
1261 ✗ } else if (auto c_vs_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit>()) {
1262 ✗ result = c_vs_->setLatentCapacityTimeConstant(heatPumpTimeConstant);
1263 ✗ }
1264 ✗ return result;
1265 ✗ }
1266
1267 ✗ void ZoneHVACWaterToAirHeatPump::resetHeatPumpTimeConstant() {
1268 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is on the child cooling coil and it's a required-field");
1269 ✗ }
1270
1271 ✗ double ZoneHVACWaterToAirHeatPump::fractionofOnCyclePowerUse() const {
1272 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is no longer used.");
1273 ✗ const double result = 0.01; // former default
1274 ✗ return result;
1275 }
1276
1277 ✗ bool ZoneHVACWaterToAirHeatPump::isFractionofOnCyclePowerUseDefaulted() const {
1278 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is no longer used.");
1279 ✗ return false;
1280 }
1281
1282 ✗ bool ZoneHVACWaterToAirHeatPump::setFractionofOnCyclePowerUse(double fractionofOnCyclePowerUse) {
1283 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is no longer used.");
1284 ✗ return false;
1285 }
1286
1287 ✗ void ZoneHVACWaterToAirHeatPump::resetFractionofOnCyclePowerUse() {
1288 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is no longer used.");
1289 ✗ }
1290
1291 ✗ double ZoneHVACWaterToAirHeatPump::heatPumpFanDelayTime() const {
1292 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is on the child cooling coil. Use coolingCoil().fanDelayTime() instead.");
1293 ✗ double result = 60; // former default
1294 ✗ const HVACComponent c = coolingCoil();
1295 ✗ if (auto c_eq_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpEquationFit>()) {
1296 ✗ result = c_eq_->fanDelayTime();
1297 ✗ } else if (auto c_vs_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit>()) {
1298 ✗ result = c_vs_->fanDelayTime();
1299 ✗ }
1300 ✗ return result;
1301 ✗ }
1302
1303 ✗ bool ZoneHVACWaterToAirHeatPump::isHeatPumpFanDelayTimeDefaulted() const {
1304 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is on the child cooling coil and it's a required-field");
1305 ✗ return false;
1306 }
1307
1308 ✗ bool ZoneHVACWaterToAirHeatPump::setHeatPumpFanDelayTime(double heatPumpFanDelayTime) {
1309 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is on the child cooling coil. Use coolingCoil().setFanDelayTime() instead.");
1310 ✗ bool result = false;
1311 ✗ const HVACComponent c = coolingCoil();
1312 ✗ if (auto c_eq_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpEquationFit>()) {
1313 ✗ result = c_eq_->setFanDelayTime(heatPumpFanDelayTime);
1314 ✗ } else if (auto c_vs_ = c.optionalCast<CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit>()) {
1315 ✗ result = c_vs_->setFanDelayTime(heatPumpFanDelayTime);
1316 ✗ }
1317 ✗ return result;
1318 ✗ }
1319
1320 ✗ void ZoneHVACWaterToAirHeatPump::resetHeatPumpFanDelayTime() {
1321 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is on the child cooling coil and it's a required-field");
1322 ✗ }
1323
1324 #if defined(_MSC_VER)
1325 # pragma warning(push)
1326 # pragma warning(disable : 4996)
1327 #elif (defined(__GNUC__))
1328 # pragma GCC diagnostic push
1329 # pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1330 #endif
1331 ✗ bool ZoneHVACWaterToAirHeatPump::setMaximumCyclingRate(boost::optional<double> maximumCyclingRate) {
1332 ✗ if (maximumCyclingRate) {
1333 ✗ return setMaximumCyclingRate(*maximumCyclingRate);
1334 }
1335 ✗ return false;
1336 }
1337
1338 ✗ bool ZoneHVACWaterToAirHeatPump::setHeatPumpTimeConstant(boost::optional<double> heatPumpTimeConstant) {
1339 ✗ if (heatPumpTimeConstant) {
1340 ✗ return setHeatPumpTimeConstant(*heatPumpTimeConstant);
1341 }
1342 ✗ return false;
1343 }
1344
1345 ✗ bool ZoneHVACWaterToAirHeatPump::setHeatPumpFanDelayTime(boost::optional<double> heatPumpFanDelayTime) {
1346 ✗ if (heatPumpFanDelayTime) {
1347 ✗ return setHeatPumpTimeConstant(*heatPumpFanDelayTime);
1348 }
1349 ✗ return false;
1350 }
1351 #if defined(_MSC_VER)
1352 # pragma warning(pop)
1353 #elif (defined(__GNUC__))
1354 # pragma GCC diagnostic pop
1355 #endif
1356
1357 ✗ bool ZoneHVACWaterToAirHeatPump::setFractionofOnCyclePowerUse(boost::optional<double> /* heatPumpTimeConstant */) {
1358 ✗ DEPRECATED_AT_MSG(3, 7, 0, "As of EnergyPlus 23.2.0, this property is no longer used.");
1359 ✗ return false;
1360 }
1361
1362 /// @endcond
1363
1364 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump::autosizedSupplyAirFlowRateDuringCoolingOperation() const {
1365 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizedSupplyAirFlowRateDuringCoolingOperation();
1366 }
1367
1368 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump::autosizedSupplyAirFlowRateDuringHeatingOperation() const {
1369 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizedSupplyAirFlowRateDuringHeatingOperation();
1370 }
1371
1372 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump::autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded() const {
1373 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded();
1374 }
1375
1376 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump::autosizedOutdoorAirFlowRateDuringCoolingOperation() const {
1377 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizedOutdoorAirFlowRateDuringCoolingOperation();
1378 }
1379
1380 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump::autosizedOutdoorAirFlowRateDuringHeatingOperation() const {
1381 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizedOutdoorAirFlowRateDuringHeatingOperation();
1382 }
1383
1384 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump::autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded() const {
1385 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded();
1386 }
1387
1388 ✗ boost::optional<double> ZoneHVACWaterToAirHeatPump::autosizedMaximumSupplyAirTemperaturefromSupplementalHeater() const {
1389 ✗ return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->autosizedMaximumSupplyAirTemperaturefromSupplementalHeater();
1390 }
1391
1392 } // namespace model
1393 } // namespace openstudio
1394