GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 85.6% 208 / 0 / 243
Functions: 90.6% 58 / 0 / 64
Branches: 62.6% 189 / 0 / 302

src/model/CoilSystemCoolingWater.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 "CoilSystemCoolingWater.hpp"
7 #include "CoilSystemCoolingWater_Impl.hpp"
8
9 #include "Schedule.hpp"
10 #include "Schedule_Impl.hpp"
11 #include "HVACComponent.hpp"
12 #include "HVACComponent_Impl.hpp"
13 #include "CoilCoolingWater.hpp"
14 #include "CoilCoolingWater_Impl.hpp"
15 #include "CoilSystemCoolingWaterHeatExchangerAssisted.hpp"
16 #include "CoilSystemCoolingWaterHeatExchangerAssisted_Impl.hpp"
17 #include "Model.hpp"
18 #include "Model_Impl.hpp"
19 #include "Node.hpp"
20 #include "Node_Impl.hpp"
21 #include "AirLoopHVAC.hpp"
22 #include "AirLoopHVAC_Impl.hpp"
23
24 #include "AirLoopHVACUnitarySystem.hpp"
25 #include "AirLoopHVACUnitarySystem_Impl.hpp"
26 #include "ZoneHVACFourPipeFanCoil.hpp"
27 #include "ZoneHVACFourPipeFanCoil_Impl.hpp"
28 #include "ZoneHVACUnitVentilator.hpp"
29 #include "ZoneHVACUnitVentilator_Impl.hpp"
30
31 #include "AirLoopHVACOutdoorAirSystem.hpp"
32 #include "AirLoopHVACOutdoorAirSystem_Impl.hpp"
33 #include "AirLoopHVACDedicatedOutdoorAirSystem.hpp"
34 #include "AirLoopHVACDedicatedOutdoorAirSystem_Impl.hpp"
35
36 #include "../utilities/core/Assert.hpp"
37 #include "../utilities/data/DataEnums.hpp"
38
39 #include <utilities/idd/IddFactory.hxx>
40 #include <utilities/idd/IddEnums.hxx>
41 #include <utilities/idd/OS_CoilSystem_Cooling_Water_FieldEnums.hxx>
42
43 namespace openstudio {
44 namespace model {
45
46 namespace detail {
47
48 11 CoilSystemCoolingWater_Impl::CoilSystemCoolingWater_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
49 11 : StraightComponent_Impl(idfObject, model, keepHandle) {
50
4/6
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 11 times.
✗ Branch 13 not taken.
11 OS_ASSERT(idfObject.iddObject().type() == CoilSystemCoolingWater::iddObjectType());
51 11 }
52
53 ✗ CoilSystemCoolingWater_Impl::CoilSystemCoolingWater_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
54 ✗ bool keepHandle)
55 ✗ : StraightComponent_Impl(other, model, keepHandle) {
56 ✗ OS_ASSERT(other.iddObject().type() == CoilSystemCoolingWater::iddObjectType());
57 ✗ }
58
59 7 CoilSystemCoolingWater_Impl::CoilSystemCoolingWater_Impl(const CoilSystemCoolingWater_Impl& other, Model_Impl* model, bool keepHandle)
60 7 : StraightComponent_Impl(other, model, keepHandle) {}
61
62 ✗ const std::vector<std::string>& CoilSystemCoolingWater_Impl::outputVariableNames() const {
63 ✗ static std::vector<std::string> result;
64 ✗ if (result.empty()) {
65 }
66 ✗ return result;
67 }
68
69 6 IddObjectType CoilSystemCoolingWater_Impl::iddObjectType() const {
70 6 return CoilSystemCoolingWater::iddObjectType();
71 }
72
73 ✗ std::vector<ScheduleTypeKey> CoilSystemCoolingWater_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
74 ✗ std::vector<ScheduleTypeKey> result;
75 ✗ const UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
76 ✗ if (std::find(fieldIndices.cbegin(), fieldIndices.cend(), OS_CoilSystem_Cooling_WaterFields::AvailabilityScheduleName) != fieldIndices.cend()) {
77 ✗ result.emplace_back("CoilSystemCoolingWater", "Availability");
78 }
79 ✗ return result;
80 ✗ }
81
82 83 unsigned CoilSystemCoolingWater_Impl::inletPort() const {
83 83 return OS_CoilSystem_Cooling_WaterFields::AirInletNodeName;
84 }
85
86 39 unsigned CoilSystemCoolingWater_Impl::outletPort() const {
87 39 return OS_CoilSystem_Cooling_WaterFields::AirOutletNodeName;
88 }
89
90 7 std::vector<ModelObject> CoilSystemCoolingWater_Impl::children() const {
91 7 std::vector<ModelObject> result;
92
3/3
✓ Branch 1 taken 7 times.
✓ Branch 3 taken 6 times.
✓ Branch 4 taken 1 time.
14 if (OptionalHVACComponent intermediate = optionalCoolingCoil()) {
93
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
6 result.push_back(*intermediate);
94 7 }
95
3/3
✓ Branch 1 taken 7 times.
✓ Branch 3 taken 5 times.
✓ Branch 4 taken 2 times.
14 if (OptionalHVACComponent intermediate = companionCoilUsedForHeatRecovery()) {
96
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
5 result.push_back(*intermediate);
97 7 }
98
99 7 return result;
100 ✗ }
101
102 4 std::vector<IdfObject> CoilSystemCoolingWater_Impl::remove() {
103 4 std::vector<IdfObject> result;
104
105
3/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 1 time.
8 if (auto c_ = optionalCoolingCoil()) { // This is false when the explicit ctor throws
106
3/4
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✗ Branch 6 not taken.
✓ Branch 7 taken 3 times.
6 if (boost::optional<WaterToAirComponent> cc_ = c_->optionalCast<WaterToAirComponent>()) {
107 ✗ cc_->removeFromPlantLoop();
108
3/4
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
6 } else if (auto cc_ = c_->optionalCast<CoilSystemCoolingWaterHeatExchangerAssisted>()) {
109
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
3 cc_->coolingCoil().removeFromPlantLoop();
110 } else {
111 ✗ OS_ASSERT(false);
112 6 }
113 4 }
114
3/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 1 time.
8 if (auto companionCoil_ = companionCoilUsedForHeatRecovery()) {
115
3/4
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 6 taken 3 times.
✗ Branch 7 not taken.
6 if (auto cc_ = companionCoil_->optionalCast<WaterToAirComponent>()) {
116
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 cc_->removeFromPlantLoop();
117 } else {
118 ✗ OS_ASSERT(false);
119 3 }
120 4 }
121
122
1/1
✓ Branch 1 taken 4 times.
8 return StraightComponent_Impl::remove();
123 4 }
124
125 2 ModelObject CoilSystemCoolingWater_Impl::clone(Model model) const {
126
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 auto coilSystemClone = StraightComponent_Impl::clone(model).cast<CoilSystemCoolingWater>();
127
128
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (OptionalHVACComponent intermediate = optionalCoolingCoil()) {
129
5/5
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 13 taken 2 times.
2 coilSystemClone.setCoolingCoil(intermediate->clone(model).cast<HVACComponent>());
130 2 }
131
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (OptionalHVACComponent intermediate = companionCoilUsedForHeatRecovery()) {
132
5/5
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 13 taken 2 times.
2 coilSystemClone.setCompanionCoilUsedForHeatRecovery(intermediate->clone(model).cast<HVACComponent>());
133 2 }
134
135 4 return std::move(coilSystemClone);
136 2 }
137
138 6 bool CoilSystemCoolingWater_Impl::addToNode(Node& node) {
139 6 bool result = false;
140
141
2/3
✓ Branch 1 taken 6 times.
✓ Branch 3 taken 6 times.
✗ Branch 4 not taken.
12 if (boost::optional<AirLoopHVAC> airLoop = node.airLoopHVAC()) {
142
4/5
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 11 taken 6 times.
✗ Branch 12 not taken.
6 if (!airLoop->demandComponent(node.handle())) {
143
1/1
✓ Branch 1 taken 6 times.
6 return StraightComponent_Impl::addToNode(node);
144 }
145 ✗ } else if (boost::optional<AirLoopHVACOutdoorAirSystem> oas = node.airLoopHVACOutdoorAirSystem()) {
146 ✗ if (oas->airLoopHVACDedicatedOutdoorAirSystem()) {
147 ✗ return StraightComponent_Impl::addToNode(node);
148 }
149 6 }
150
151 ✗ return result;
152 }
153
154 4 boost::optional<HVACComponent> CoilSystemCoolingWater_Impl::containingHVACComponent() const {
155 4 return boost::none;
156 }
157
158 4 boost::optional<ZoneHVACComponent> CoilSystemCoolingWater_Impl::containingZoneHVACComponent() const {
159 4 return boost::none;
160 }
161
162 2 ComponentType CoilSystemCoolingWater_Impl::componentType() const {
163
1/1
✓ Branch 1 taken 2 times.
2 return ComponentType::Cooling;
164 }
165
166 2 std::vector<FuelType> CoilSystemCoolingWater_Impl::coolingFuelTypes() const {
167
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 return coolingCoil().coolingFuelTypes();
168 }
169
170 2 std::vector<FuelType> CoilSystemCoolingWater_Impl::heatingFuelTypes() const {
171 2 return {};
172 }
173
174 2 std::vector<AppGFuelType> CoilSystemCoolingWater_Impl::appGHeatingFuelTypes() const {
175 2 return {};
176 }
177
178 5 Schedule CoilSystemCoolingWater_Impl::availabilitySchedule() const {
179
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<Schedule> value = optionalAvailabilitySchedule();
180
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
5 if (!value) {
181 ✗ LOG_AND_THROW(briefDescription() << " does not have an Availability Schedule attached.");
182 }
183
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
10 return value.get();
184 5 }
185
186 57 HVACComponent CoilSystemCoolingWater_Impl::coolingCoil() const {
187
1/1
✓ Branch 1 taken 57 times.
57 boost::optional<HVACComponent> value = optionalCoolingCoil();
188
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 57 times.
57 if (!value) {
189 ✗ LOG_AND_THROW(briefDescription() << " does not have an Cooling Coil attached.");
190 }
191
2/2
✓ Branch 1 taken 57 times.
✓ Branch 4 taken 57 times.
114 return value.get();
192 57 }
193
194 6 std::string CoilSystemCoolingWater_Impl::dehumidificationControlType() const {
195
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<std::string> value = getString(OS_CoilSystem_Cooling_WaterFields::DehumidificationControlType, true);
196
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
197
2/2
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
12 return value.get();
198 6 }
199
200 6 bool CoilSystemCoolingWater_Impl::runonSensibleLoad() const {
201 6 return getBooleanFieldValue(OS_CoilSystem_Cooling_WaterFields::RunonSensibleLoad);
202 }
203
204 6 bool CoilSystemCoolingWater_Impl::runonLatentLoad() const {
205 6 return getBooleanFieldValue(OS_CoilSystem_Cooling_WaterFields::RunonLatentLoad);
206 }
207
208 6 double CoilSystemCoolingWater_Impl::minimumAirToWaterTemperatureOffset() const {
209
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<double> value = getDouble(OS_CoilSystem_Cooling_WaterFields::MinimumAirToWaterTemperatureOffset, true);
210
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
211
1/1
✓ Branch 1 taken 6 times.
12 return value.get();
212 }
213
214 6 bool CoilSystemCoolingWater_Impl::economizerLockout() const {
215 6 return getBooleanFieldValue(OS_CoilSystem_Cooling_WaterFields::EconomizerLockout);
216 }
217
218 5 double CoilSystemCoolingWater_Impl::minimumWaterLoopTemperatureForHeatRecovery() const {
219
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_CoilSystem_Cooling_WaterFields::MinimumWaterLoopTemperatureForHeatRecovery, true);
220
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
221
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
222 }
223
224 42 boost::optional<HVACComponent> CoilSystemCoolingWater_Impl::companionCoilUsedForHeatRecovery() const {
225
2/2
✓ Branch 1 taken 42 times.
✓ Branch 4 taken 42 times.
42 return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_CoilSystem_Cooling_WaterFields::CompanionCoilUsedForHeatRecovery);
226 }
227
228 14 bool CoilSystemCoolingWater_Impl::setAvailabilitySchedule(Schedule& schedule) {
229 const bool result =
230
3/3
✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
✓ Branch 7 taken 14 times.
56 setSchedule(OS_CoilSystem_Cooling_WaterFields::AvailabilityScheduleName, "CoilSystemCoolingWater", "Availability", schedule);
231 14 return result;
232 }
233
234 15 bool CoilSystemCoolingWater_Impl::setCoolingCoil(const HVACComponent& coolingCoil) {
235
2/2
✓ Branch 1 taken 15 times.
✓ Branch 4 taken 15 times.
15 const bool result = setPointer(OS_CoilSystem_Cooling_WaterFields::CoolingCoil, coolingCoil.handle());
236 15 return result;
237 }
238
239 15 bool CoilSystemCoolingWater_Impl::setDehumidificationControlType(const std::string& dehumidificationControlType) {
240 15 const bool result = setString(OS_CoilSystem_Cooling_WaterFields::DehumidificationControlType, dehumidificationControlType);
241 15 return result;
242 }
243
244 15 bool CoilSystemCoolingWater_Impl::setRunonSensibleLoad(bool runonSensibleLoad) {
245 15 const bool result = setBooleanFieldValue(OS_CoilSystem_Cooling_WaterFields::RunonSensibleLoad, runonSensibleLoad);
246
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 15 times.
15 OS_ASSERT(result);
247 15 return result;
248 }
249
250 15 bool CoilSystemCoolingWater_Impl::setRunonLatentLoad(bool runonLatentLoad) {
251 15 const bool result = setBooleanFieldValue(OS_CoilSystem_Cooling_WaterFields::RunonLatentLoad, runonLatentLoad);
252
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 15 times.
15 OS_ASSERT(result);
253 15 return result;
254 }
255
256 15 bool CoilSystemCoolingWater_Impl::setMinimumAirToWaterTemperatureOffset(double minimumAirToWaterTemperatureOffset) {
257 15 const bool result = setDouble(OS_CoilSystem_Cooling_WaterFields::MinimumAirToWaterTemperatureOffset, minimumAirToWaterTemperatureOffset);
258 15 return result;
259 }
260
261 15 bool CoilSystemCoolingWater_Impl::setEconomizerLockout(bool economizerLockout) {
262 15 const bool result = setBooleanFieldValue(OS_CoilSystem_Cooling_WaterFields::EconomizerLockout, economizerLockout);
263
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 15 times.
15 OS_ASSERT(result);
264 15 return result;
265 }
266
267 14 bool CoilSystemCoolingWater_Impl::setMinimumWaterLoopTemperatureForHeatRecovery(double minimumWaterLoopTemperatureForHeatRecovery) {
268 const bool result =
269 14 setDouble(OS_CoilSystem_Cooling_WaterFields::MinimumWaterLoopTemperatureForHeatRecovery, minimumWaterLoopTemperatureForHeatRecovery);
270
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
14 OS_ASSERT(result);
271 14 return result;
272 }
273
274 8 bool CoilSystemCoolingWater_Impl::setCompanionCoilUsedForHeatRecovery(const HVACComponent& companionCoilUsedForHeatRecovery) {
275
4/4
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 7 times.
✓ Branch 8 taken 1 time.
8 if (companionCoilUsedForHeatRecovery.iddObjectType() == IddObjectType::OS_Coil_Cooling_Water) {
276 const bool result =
277
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 setPointer(OS_CoilSystem_Cooling_WaterFields::CompanionCoilUsedForHeatRecovery, companionCoilUsedForHeatRecovery.handle());
278 7 return result;
279 } else {
280
11/11
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 27 taken 1 time.
✓ Branch 30 taken 1 time.
✓ Branch 33 taken 1 time.
1 LOG(Warn, "Invalid Companion Coil Used For Heat Recovery Type (expected CoilCoolingWater, not '"
281 << companionCoilUsedForHeatRecovery.iddObjectType().valueName() << "') for " << briefDescription());
282 1 return false;
283 }
284 }
285
286 ✗ void CoilSystemCoolingWater_Impl::resetCompanionCoilUsedForHeatRecovery() {
287 ✗ const bool result = setString(OS_CoilSystem_Cooling_WaterFields::CompanionCoilUsedForHeatRecovery, "");
288 ✗ OS_ASSERT(result);
289 ✗ }
290
291 5 boost::optional<Schedule> CoilSystemCoolingWater_Impl::optionalAvailabilitySchedule() const {
292
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
5 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_CoilSystem_Cooling_WaterFields::AvailabilityScheduleName);
293 }
294
295 70 boost::optional<HVACComponent> CoilSystemCoolingWater_Impl::optionalCoolingCoil() const {
296
2/2
✓ Branch 1 taken 70 times.
✓ Branch 4 taken 70 times.
70 return getObject<ModelObject>().getModelObjectTarget<HVACComponent>(OS_CoilSystem_Cooling_WaterFields::CoolingCoil);
297 }
298
299 } // namespace detail
300
301 10 void CoilSystemCoolingWater::assignEnergyPlusIDDDefaults() {
302 10 bool ok = true;
303
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 auto alwaysOn = model().alwaysOnDiscreteSchedule();
304
1/1
✓ Branch 1 taken 10 times.
10 ok = setAvailabilitySchedule(alwaysOn);
305
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
✗ Branch 3 not taken.
10 OS_ASSERT(ok);
306
307
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 ok = setDehumidificationControlType("None");
308
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
✗ Branch 3 not taken.
10 OS_ASSERT(ok);
309
1/1
✓ Branch 1 taken 10 times.
10 ok = setRunonSensibleLoad(true);
310
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
✗ Branch 3 not taken.
10 OS_ASSERT(ok);
311
1/1
✓ Branch 1 taken 10 times.
10 ok = setRunonLatentLoad(false);
312
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
✗ Branch 3 not taken.
10 OS_ASSERT(ok);
313
1/1
✓ Branch 1 taken 10 times.
10 ok = setMinimumAirToWaterTemperatureOffset(0.0);
314
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
✗ Branch 3 not taken.
10 OS_ASSERT(ok);
315
1/1
✓ Branch 1 taken 10 times.
10 ok = setEconomizerLockout(true);
316
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
✗ Branch 3 not taken.
10 OS_ASSERT(ok);
317
1/1
✓ Branch 1 taken 10 times.
10 ok = setMinimumWaterLoopTemperatureForHeatRecovery(0.0);
318
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
✗ Branch 3 not taken.
10 OS_ASSERT(ok);
319 10 }
320
321 6 CoilSystemCoolingWater::CoilSystemCoolingWater(const Model& model) : StraightComponent(CoilSystemCoolingWater::iddObjectType(), model) {
322
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 6 times.
✗ Branch 5 not taken.
6 OS_ASSERT(getImpl<detail::CoilSystemCoolingWater_Impl>());
323
324
1/1
✓ Branch 1 taken 6 times.
6 CoilCoolingWater coolingCoil(model);
325
4/4
✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✓ Branch 7 taken 6 times.
✓ Branch 10 taken 6 times.
6 coolingCoil.setName(name().get() + " Cooling Coil");
326
1/1
✓ Branch 1 taken 6 times.
6 bool ok = setCoolingCoil(coolingCoil);
327
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
✗ Branch 3 not taken.
6 OS_ASSERT(ok);
328
329
1/1
✓ Branch 1 taken 6 times.
6 assignEnergyPlusIDDDefaults();
330 6 }
331
332 5 CoilSystemCoolingWater::CoilSystemCoolingWater(const Model& model, const HVACComponent& coolingCoil)
333 5 : StraightComponent(CoilSystemCoolingWater::iddObjectType(), model) {
334
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 5 times.
✗ Branch 5 not taken.
5 OS_ASSERT(getImpl<detail::CoilSystemCoolingWater_Impl>());
335
336 5 bool ok = true;
337
1/1
✓ Branch 1 taken 5 times.
5 ok = setCoolingCoil(coolingCoil);
338
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 4 times.
5 if (!ok) {
339
1/1
✓ Branch 1 taken 1 time.
1 remove();
340
25/25
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 16 taken 1 time.
✓ Branch 19 taken 1 time.
✓ Branch 22 taken 1 time.
✓ Branch 27 taken 1 time.
✓ Branch 30 taken 1 time.
✓ Branch 33 taken 1 time.
✓ Branch 39 taken 1 time.
✓ Branch 42 taken 1 time.
✓ Branch 45 taken 1 time.
✓ Branch 48 taken 1 time.
✓ Branch 51 taken 1 time.
✓ Branch 54 taken 1 time.
✓ Branch 57 taken 1 time.
✓ Branch 60 taken 1 time.
✓ Branch 63 taken 1 time.
✓ Branch 66 taken 1 time.
✓ Branch 69 taken 1 time.
✓ Branch 72 taken 1 time.
✓ Branch 78 taken 1 time.
✓ Branch 81 taken 1 time.
1 LOG_AND_THROW("Unable to set " << briefDescription() << "'s Cooling Coil " << coolingCoil.briefDescription() << ".");
341 }
342
343
1/1
✓ Branch 1 taken 4 times.
4 assignEnergyPlusIDDDefaults();
344 5 }
345
346 7755 IddObjectType CoilSystemCoolingWater::iddObjectType() {
347
1/1
✓ Branch 1 taken 7755 times.
7755 return {IddObjectType::OS_CoilSystem_Cooling_Water};
348 }
349
350 ✗ std::vector<std::string> CoilSystemCoolingWater::dehumidificationControlTypeValues() {
351 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_CoilSystem_Cooling_WaterFields::DehumidificationControlType);
352 }
353
354 5 Schedule CoilSystemCoolingWater::availabilitySchedule() const {
355
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilSystemCoolingWater_Impl>()->availabilitySchedule();
356 }
357
358 55 HVACComponent CoilSystemCoolingWater::coolingCoil() const {
359
1/1
✓ Branch 3 taken 55 times.
55 return getImpl<detail::CoilSystemCoolingWater_Impl>()->coolingCoil();
360 }
361
362 6 std::string CoilSystemCoolingWater::dehumidificationControlType() const {
363
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilSystemCoolingWater_Impl>()->dehumidificationControlType();
364 }
365
366 6 bool CoilSystemCoolingWater::runonSensibleLoad() const {
367
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilSystemCoolingWater_Impl>()->runonSensibleLoad();
368 }
369
370 6 bool CoilSystemCoolingWater::runonLatentLoad() const {
371
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilSystemCoolingWater_Impl>()->runonLatentLoad();
372 }
373
374 6 double CoilSystemCoolingWater::minimumAirToWaterTemperatureOffset() const {
375
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilSystemCoolingWater_Impl>()->minimumAirToWaterTemperatureOffset();
376 }
377
378 6 bool CoilSystemCoolingWater::economizerLockout() const {
379
1/1
✓ Branch 3 taken 6 times.
6 return getImpl<detail::CoilSystemCoolingWater_Impl>()->economizerLockout();
380 }
381
382 5 double CoilSystemCoolingWater::minimumWaterLoopTemperatureForHeatRecovery() const {
383
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CoilSystemCoolingWater_Impl>()->minimumWaterLoopTemperatureForHeatRecovery();
384 }
385
386 29 boost::optional<HVACComponent> CoilSystemCoolingWater::companionCoilUsedForHeatRecovery() const {
387
1/1
✓ Branch 3 taken 29 times.
29 return getImpl<detail::CoilSystemCoolingWater_Impl>()->companionCoilUsedForHeatRecovery();
388 }
389
390 14 bool CoilSystemCoolingWater::setAvailabilitySchedule(Schedule& schedule) {
391
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilSystemCoolingWater_Impl>()->setAvailabilitySchedule(schedule);
392 }
393
394 15 bool CoilSystemCoolingWater::setCoolingCoil(const HVACComponent& coolingCoil) {
395
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::CoilSystemCoolingWater_Impl>()->setCoolingCoil(coolingCoil);
396 }
397
398 15 bool CoilSystemCoolingWater::setDehumidificationControlType(const std::string& dehumidificationControlType) {
399
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::CoilSystemCoolingWater_Impl>()->setDehumidificationControlType(dehumidificationControlType);
400 }
401
402 15 bool CoilSystemCoolingWater::setRunonSensibleLoad(bool runonSensibleLoad) {
403
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::CoilSystemCoolingWater_Impl>()->setRunonSensibleLoad(runonSensibleLoad);
404 }
405
406 15 bool CoilSystemCoolingWater::setRunonLatentLoad(bool runonLatentLoad) {
407
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::CoilSystemCoolingWater_Impl>()->setRunonLatentLoad(runonLatentLoad);
408 }
409
410 15 bool CoilSystemCoolingWater::setMinimumAirToWaterTemperatureOffset(double minimumAirToWaterTemperatureOffset) {
411
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::CoilSystemCoolingWater_Impl>()->setMinimumAirToWaterTemperatureOffset(minimumAirToWaterTemperatureOffset);
412 }
413
414 15 bool CoilSystemCoolingWater::setEconomizerLockout(bool economizerLockout) {
415
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::CoilSystemCoolingWater_Impl>()->setEconomizerLockout(economizerLockout);
416 }
417
418 14 bool CoilSystemCoolingWater::setMinimumWaterLoopTemperatureForHeatRecovery(double minimumWaterLoopTemperatureForHeatRecovery) {
419
1/1
✓ Branch 3 taken 14 times.
14 return getImpl<detail::CoilSystemCoolingWater_Impl>()->setMinimumWaterLoopTemperatureForHeatRecovery(minimumWaterLoopTemperatureForHeatRecovery);
420 }
421
422 8 bool CoilSystemCoolingWater::setCompanionCoilUsedForHeatRecovery(const HVACComponent& companionCoilUsedForHeatRecovery) {
423
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::CoilSystemCoolingWater_Impl>()->setCompanionCoilUsedForHeatRecovery(companionCoilUsedForHeatRecovery);
424 }
425
426 ✗ void CoilSystemCoolingWater::resetCompanionCoilUsedForHeatRecovery() {
427 ✗ getImpl<detail::CoilSystemCoolingWater_Impl>()->resetCompanionCoilUsedForHeatRecovery();
428 ✗ }
429
430 /// @cond
431
1/1
✓ Branch 3 taken 72 times.
72 CoilSystemCoolingWater::CoilSystemCoolingWater(std::shared_ptr<detail::CoilSystemCoolingWater_Impl> impl) : StraightComponent(std::move(impl)) {}
432 /// @endcond
433
434 } // namespace model
435 } // namespace openstudio
436