GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 89.5% 171 / 0 / 191
Functions: 100.0% 1 / 0 / 1
Branches: 71.7% 248 / 0 / 346

src/energyplus/ReverseTranslator/ReverseTranslateSizingZone.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 "../ReverseTranslator.hpp"
7 #include "../../model/SizingZone.hpp"
8 #include "../../model/SizingZone_Impl.hpp"
9 #include "../../model/ThermalZone.hpp"
10 #include "../../model/ThermalZone_Impl.hpp"
11 #include "../../model/Space.hpp"
12 #include "../../model/Space_Impl.hpp"
13 #include "../../model/DesignSpecificationOutdoorAir.hpp"
14 #include "../../model/DesignSpecificationOutdoorAir_Impl.hpp"
15 #include "../../model/Schedule.hpp"
16 #include "../../model/Schedule_Impl.hpp"
17
18 #include "../../utilities/idf/WorkspaceExtensibleGroup.hpp"
19 #include <utilities/idd/Sizing_Zone_FieldEnums.hxx>
20 #include <utilities/idd/DesignSpecification_ZoneAirDistribution_FieldEnums.hxx>
21 #include "../../utilities/idd/IddEnums.hpp"
22 #include <utilities/idd/IddEnums.hxx>
23
24 #include "../../utilities/core/Assert.hpp"
25
26 using namespace openstudio::model;
27
28 namespace openstudio {
29
30 namespace energyplus {
31
32 43 OptionalModelObject ReverseTranslator::translateSizingZone(const WorkspaceObject& workspaceObject) {
33
1/1
✓ Branch 1 taken 43 times.
43 boost::optional<WorkspaceObject> target = workspaceObject.getTarget(Sizing_ZoneFields::ZoneorZoneListName);
34
35 43 std::vector<ThermalZone> thermalZones;
36
37
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (target) {
38
39 // just one thermal zone
40 43 boost::optional<ModelObject> mo;
41
5/6
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
✓ Branch 7 taken 43 times.
✓ Branch 10 taken 43 times.
✓ Branch 14 taken 43 times.
✗ Branch 15 not taken.
43 if (target->iddObject().type() == IddObjectType::Zone) {
42
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 mo = translateAndMapWorkspaceObject(target.get());
43
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (mo) {
44
3/4
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
✓ Branch 6 taken 43 times.
✗ Branch 7 not taken.
86 if (boost::optional<Space> space = mo->optionalCast<Space>()) {
45
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 boost::optional<ThermalZone> thermalZone = space->thermalZone();
46
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (thermalZone) {
47
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 thermalZones.push_back(*thermalZone);
48 }
49 86 }
50 }
51 ✗ } else if (target->iddObject().type() == IddObjectType::ZoneList) {
52
53 // get all thermal zones in zone list
54 ✗ for (const IdfExtensibleGroup& idfGroup : target->extensibleGroups()) {
55 ✗ auto workspaceGroup = idfGroup.cast<WorkspaceExtensibleGroup>();
56 ✗ OptionalWorkspaceObject owo = workspaceGroup.getTarget(0);
57 ✗ if (owo) {
58 ✗ mo = translateAndMapWorkspaceObject(owo.get());
59 ✗ if (mo) {
60 ✗ if (boost::optional<Space> space = mo->optionalCast<Space>()) {
61 ✗ boost::optional<ThermalZone> thermalZone = space->thermalZone();
62 ✗ if (thermalZone) {
63 ✗ thermalZones.push_back(*thermalZone);
64 }
65 ✗ }
66 }
67 }
68 ✗ }
69 }
70 43 }
71
72
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 43 times.
43 if (thermalZones.empty()) {
73 ✗ LOG(Error, "Error importing object: " << workspaceObject.briefDescription() << " Can't find associated ThermalZone(s).");
74
75 ✗ return boost::none;
76 }
77
78 43 boost::optional<ModelObject> result;
79
2/2
✓ Branch 5 taken 43 times.
✓ Branch 6 taken 43 times.
86 for (const ThermalZone& thermalZone : thermalZones) {
80
81 // sizing zone is constructed in thermal zone ctor
82
1/1
✓ Branch 1 taken 43 times.
43 openstudio::model::SizingZone sizingZone = thermalZone.sizingZone();
83
84 // return first sizing zone
85
1/2
✓ Branch 1 taken 43 times.
✗ Branch 2 not taken.
43 if (!result) {
86
1/1
✓ Branch 1 taken 43 times.
43 result = sizingZone;
87 }
88
89 43 boost::optional<std::string> s;
90 43 boost::optional<double> value;
91
92 // ZoneCoolingDesignSupplyAirTemperatureInputMethod
93
1/1
✓ Branch 1 taken 43 times.
43 s = workspaceObject.getString(Sizing_ZoneFields::ZoneCoolingDesignSupplyAirTemperatureInputMethod);
94
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (s) {
95
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneCoolingDesignSupplyAirTemperatureInputMethod(s.get());
96 }
97
98 // ZoneCoolingDesignSupplyAirTemperature
99
100
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::ZoneCoolingDesignSupplyAirTemperature);
101
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (value) {
102
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneCoolingDesignSupplyAirTemperature(value.get());
103 }
104
105 // ZoneCoolingDesignSupplyAirTemperatureDifference
106
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::ZoneCoolingDesignSupplyAirTemperatureDifference);
107
2/2
✓ Branch 0 taken 17 times.
✓ Branch 1 taken 26 times.
43 if (value) {
108
2/2
✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
17 sizingZone.setZoneCoolingDesignSupplyAirTemperatureDifference(value.get());
109 }
110
111 // ZoneHeatingDesignSupplyAirTemperatureInputMethod
112
1/1
✓ Branch 1 taken 43 times.
43 s = workspaceObject.getString(Sizing_ZoneFields::ZoneHeatingDesignSupplyAirTemperatureInputMethod);
113
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (s) {
114
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneHeatingDesignSupplyAirTemperatureInputMethod(s.get());
115 }
116
117 // ZoneHeatingDesignSupplyAirTemperature
118
119
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::ZoneHeatingDesignSupplyAirTemperature);
120
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (value) {
121
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneHeatingDesignSupplyAirTemperature(value.get());
122 }
123
124 // ZoneHeatingDesignSupplyAirTemperatureDifference
125
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::ZoneHeatingDesignSupplyAirTemperatureDifference);
126
2/2
✓ Branch 0 taken 17 times.
✓ Branch 1 taken 26 times.
43 if (value) {
127
2/2
✓ Branch 1 taken 17 times.
✓ Branch 4 taken 17 times.
17 sizingZone.setZoneHeatingDesignSupplyAirTemperatureDifference(value.get());
128 }
129
130 // ZoneCoolingDesignSupplyAirHumidityRatio
131
132
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::ZoneHeatingDesignSupplyAirHumidityRatio);
133
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (value) {
134
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneHeatingDesignSupplyAirHumidityRatio(value.get());
135 }
136
137 // ZoneHeatingDesignSupplyAirHumidityRatio
138
139
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::ZoneHeatingDesignSupplyAirHumidityRatio);
140
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (value) {
141
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneHeatingDesignSupplyAirHumidityRatio(value.get());
142 }
143
144 // DesignSpecificationOutdoorAirObjectName
145
146
1/1
✓ Branch 1 taken 43 times.
43 target = workspaceObject.getTarget(Sizing_ZoneFields::DesignSpecificationOutdoorAirObjectName);
147
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (target) {
148
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 OptionalModelObject mo = translateDesignSpecificationOutdoorAir(*target);
149
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (mo) {
150
3/4
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
✓ Branch 7 taken 43 times.
✗ Branch 8 not taken.
86 if (mo->optionalCast<DesignSpecificationOutdoorAir>()) {
151
1/1
✓ Branch 1 taken 43 times.
43 std::vector<Space> spaces = thermalZone.spaces();
152
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 43 times.
✗ Branch 4 not taken.
43 OS_ASSERT(spaces.size() == 1);
153
3/3
✓ Branch 2 taken 43 times.
✓ Branch 5 taken 43 times.
✓ Branch 8 taken 43 times.
43 spaces[0].setDesignSpecificationOutdoorAir(mo->cast<DesignSpecificationOutdoorAir>());
154 43 }
155 }
156 43 }
157
158 // ZoneHeatingSizingFactor
159
160
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::ZoneHeatingSizingFactor);
161
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 42 times.
43 if (value) {
162
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setZoneHeatingSizingFactor(value.get());
163 }
164
165 // ZoneCoolingSizingFactor
166
167
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::ZoneCoolingSizingFactor);
168
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 43 times.
43 if (value) {
169 ✗ sizingZone.setZoneCoolingSizingFactor(value.get());
170 }
171
172 // CoolingDesignAirFlowMethod
173
174
1/1
✓ Branch 1 taken 43 times.
43 s = workspaceObject.getString(Sizing_ZoneFields::CoolingDesignAirFlowMethod);
175
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (s) {
176
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setCoolingDesignAirFlowMethod(s.get());
177 }
178
179 // CoolingDesignAirFlowRate
180
181
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::CoolingDesignAirFlowRate);
182
2/2
✓ Branch 0 taken 42 times.
✓ Branch 1 taken 1 time.
43 if (value) {
183
2/2
✓ Branch 1 taken 42 times.
✓ Branch 4 taken 42 times.
42 sizingZone.setCoolingDesignAirFlowRate(value.get());
184 }
185
186 // CoolingMinimumAirFlowperZoneFloorArea
187
188
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::CoolingMinimumAirFlowperZoneFloorArea);
189
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (value) {
190
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setCoolingMinimumAirFlowperZoneFloorArea(value.get());
191 }
192
193 // CoolingMinimumAirFlow
194
195
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::CoolingMinimumAirFlow);
196
2/2
✓ Branch 0 taken 42 times.
✓ Branch 1 taken 1 time.
43 if (value) {
197
2/2
✓ Branch 1 taken 42 times.
✓ Branch 4 taken 42 times.
42 sizingZone.setCoolingMinimumAirFlow(value.get());
198 }
199
200 // CoolingMinimumAirFlowFraction
201
202
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::CoolingMinimumAirFlowFraction);
203
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (value) {
204
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setCoolingMinimumAirFlowFraction(value.get());
205 }
206
207 // HeatingDesignAirFlowMethod
208
209
1/1
✓ Branch 1 taken 43 times.
43 s = workspaceObject.getString(Sizing_ZoneFields::HeatingDesignAirFlowMethod);
210
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (s) {
211
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setHeatingDesignAirFlowMethod(s.get());
212 }
213
214 // HeatingDesignAirFlowRate
215
216
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::HeatingDesignAirFlowRate);
217
2/2
✓ Branch 0 taken 42 times.
✓ Branch 1 taken 1 time.
43 if (value) {
218
2/2
✓ Branch 1 taken 42 times.
✓ Branch 4 taken 42 times.
42 sizingZone.setHeatingDesignAirFlowRate(value.get());
219 }
220
221 // HeatingMaximumAirFlowperZoneFloorArea
222
223
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::HeatingMaximumAirFlowperZoneFloorArea);
224
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (value) {
225
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setHeatingMaximumAirFlowperZoneFloorArea(value.get());
226 }
227
228 // HeatingMaximumAirFlow
229
230
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::HeatingMaximumAirFlow);
231
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (value) {
232
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setHeatingMaximumAirFlow(value.get());
233 }
234
235 // HeatingMaximumAirFlowFraction
236
237
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::HeatingMaximumAirFlowFraction);
238
1/2
✓ Branch 0 taken 43 times.
✗ Branch 1 not taken.
43 if (value) {
239
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setHeatingMaximumAirFlowFraction(value.get());
240 }
241
242 // DesignSpecification_ZoneAirDistribution
243
244 boost::optional<WorkspaceObject> _designSpecification =
245
1/1
✓ Branch 1 taken 43 times.
43 workspaceObject.getTarget(Sizing_ZoneFields::DesignSpecificationZoneAirDistributionObjectName);
246
247
2/2
✓ Branch 0 taken 11 times.
✓ Branch 1 taken 32 times.
43 if (_designSpecification) {
248 // ZoneAirDistributionEffectivenessinCoolingMode
249
250
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 value = _designSpecification->getDouble(DesignSpecification_ZoneAirDistributionFields::ZoneAirDistributionEffectivenessinCoolingMode);
251
1/2
✓ Branch 0 taken 11 times.
✗ Branch 1 not taken.
11 if (value) {
252
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 sizingZone.setDesignZoneAirDistributionEffectivenessinCoolingMode(value.get());
253 }
254
255 // ZoneAirDistributionEffectivenessinHeatingMode
256
257
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 value = _designSpecification->getDouble(DesignSpecification_ZoneAirDistributionFields::ZoneAirDistributionEffectivenessinHeatingMode);
258
1/2
✓ Branch 0 taken 11 times.
✗ Branch 1 not taken.
11 if (value) {
259
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 sizingZone.setDesignZoneAirDistributionEffectivenessinHeatingMode(value.get());
260 }
261
262
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 value = _designSpecification->getDouble(DesignSpecification_ZoneAirDistributionFields::ZoneSecondaryRecirculationFraction);
263
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 10 times.
11 if (value) {
264
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setDesignZoneSecondaryRecirculationFraction(value.get());
265 }
266
267 // MinimumZoneVentilationEfficiency
268
269
2/2
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
11 value = _designSpecification->getDouble(DesignSpecification_ZoneAirDistributionFields::MinimumZoneVentilationEfficiency);
270
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 10 times.
11 if (value) {
271
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setDesignMinimumZoneVentilationEfficiency(value.get());
272 }
273
274 // Zone Air Distribution Effectiveness Schedule Name: not translated
275
1/1
✓ Branch 1 taken 11 times.
11 s = workspaceObject.getString(DesignSpecification_ZoneAirDistributionFields::ZoneAirDistributionEffectivenessScheduleName);
276
277
4/7
✓ Branch 0 taken 11 times.
✗ Branch 1 not taken.
✓ Branch 3 taken 11 times.
✓ Branch 6 taken 11 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 11 times.
✗ Branch 9 not taken.
11 if (s && !s->empty()) {
278
11/11
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
✓ Branch 10 taken 11 times.
✓ Branch 13 taken 11 times.
✓ Branch 16 taken 11 times.
✓ Branch 19 taken 11 times.
✓ Branch 22 taken 11 times.
✓ Branch 26 taken 11 times.
✓ Branch 29 taken 11 times.
✓ Branch 32 taken 11 times.
11 LOG(Warn, _designSpecification->nameString()
279 << ", field Zone Air Distribution Effectiveness Schedule Name (='" << s.get() << "') isn't translated back to OS:Sizing:Zone");
280 }
281 }
282
283 // Account for Dedicated Outdoor Air System: Optional Boolean
284 43 if (boost::optional<std::string> _accountforDedicatedOutdoorAirSystem =
285
2/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 43 times.
✗ Branch 4 not taken.
86 workspaceObject.getString(Sizing_ZoneFields::AccountforDedicatedOutdoorAirSystem, true)) {
286
4/5
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
✓ Branch 7 taken 43 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 43 times.
129 if (istringEqual("Yes", _accountforDedicatedOutdoorAirSystem.get())) {
287 ✗ sizingZone.setAccountforDedicatedOutdoorAirSystem(true);
288 } else {
289
1/1
✓ Branch 1 taken 43 times.
43 sizingZone.setAccountforDedicatedOutdoorAirSystem(false);
290 }
291 43 }
292
293 // Dedicated Outdoor Air System Control Strategy: Optional String
294 43 if (boost::optional<std::string> _dedicatedOutdoorAirSystemControlStrategy =
295
2/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 43 times.
✗ Branch 4 not taken.
86 workspaceObject.getString(Sizing_ZoneFields::DedicatedOutdoorAirSystemControlStrategy)) {
296
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setDedicatedOutdoorAirSystemControlStrategy(_dedicatedOutdoorAirSystemControlStrategy.get());
297 43 }
298
299 // Dedicated Outdoor Air Low Setpoint Temperature for Design: Optional Double
300 43 if (boost::optional<double> _dedicatedOutdoorAirLowSetpointTemperatureforDesign =
301
3/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 42 times.
86 workspaceObject.getDouble(Sizing_ZoneFields::DedicatedOutdoorAirLowSetpointTemperatureforDesign)) {
302
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setDedicatedOutdoorAirLowSetpointTemperatureforDesign(_dedicatedOutdoorAirLowSetpointTemperatureforDesign.get());
303 }
304
305 // Dedicated Outdoor Air High Setpoint Temperature for Design: Optional Double
306 43 if (boost::optional<double> _dedicatedOutdoorAirHighSetpointTemperatureforDesign =
307
3/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 42 times.
86 workspaceObject.getDouble(Sizing_ZoneFields::DedicatedOutdoorAirHighSetpointTemperatureforDesign)) {
308
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setDedicatedOutdoorAirHighSetpointTemperatureforDesign(_dedicatedOutdoorAirHighSetpointTemperatureforDesign.get());
309 }
310
311 // Zone Load Sizing Method: Optional String
312
2/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 43 times.
✗ Branch 4 not taken.
86 if (boost::optional<std::string> _zoneLoadSizingMethod = workspaceObject.getString(Sizing_ZoneFields::ZoneLoadSizingMethod)) {
313
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneLoadSizingMethod(_zoneLoadSizingMethod.get());
314 43 }
315
316 // Zone Latent Cooling Design Supply Air Humidity Ratio Input Method: Optional String
317 43 if (boost::optional<std::string> _zoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod =
318
2/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 43 times.
✗ Branch 4 not taken.
86 workspaceObject.getString(Sizing_ZoneFields::ZoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod)) {
319
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod(_zoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod.get());
320 43 }
321
322 // Zone Dehumidification Design Supply Air Humidity Ratio: Optional Double
323 43 if (boost::optional<double> _zoneDehumidificationDesignSupplyAirHumidityRatio =
324
2/3
✓ Branch 1 taken 43 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 43 times.
86 workspaceObject.getDouble(Sizing_ZoneFields::ZoneDehumidificationDesignSupplyAirHumidityRatio)) {
325 ✗ sizingZone.setZoneDehumidificationDesignSupplyAirHumidityRatio(_zoneDehumidificationDesignSupplyAirHumidityRatio.get());
326 }
327
328 // Zone Cooling Design Supply Air Humidity Ratio Difference: Optional Double
329 43 if (boost::optional<double> _zoneCoolingDesignSupplyAirHumidityRatioDifference =
330
2/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 43 times.
✗ Branch 4 not taken.
86 workspaceObject.getDouble(Sizing_ZoneFields::ZoneCoolingDesignSupplyAirHumidityRatioDifference)) {
331
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneCoolingDesignSupplyAirHumidityRatioDifference(_zoneCoolingDesignSupplyAirHumidityRatioDifference.get());
332 }
333
334 // Zone Latent Heating Design Supply Air Humidity Ratio Input Method: Optional String
335 43 if (boost::optional<std::string> _zoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod =
336
2/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 43 times.
✗ Branch 4 not taken.
86 workspaceObject.getString(Sizing_ZoneFields::ZoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod)) {
337
2/2
✓ Branch 1 taken 43 times.
✓ Branch 4 taken 43 times.
43 sizingZone.setZoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod(_zoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod.get());
338 43 }
339
340 // Zone Humidification Design Supply Air Humidity Ratio: Optional Double
341 43 if (boost::optional<double> _zoneHumidificationDesignSupplyAirHumidityRatio =
342
3/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 42 times.
86 workspaceObject.getDouble(Sizing_ZoneFields::ZoneHumidificationDesignSupplyAirHumidityRatio)) {
343
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setZoneHumidificationDesignSupplyAirHumidityRatio(_zoneHumidificationDesignSupplyAirHumidityRatio.get());
344 }
345
346 // Zone Humidification Design Supply Air Humidity Ratio Difference: Optional Double
347 43 if (boost::optional<double> _zoneHumidificationDesignSupplyAirHumidityRatioDifference =
348
3/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 42 times.
✓ Branch 4 taken 1 time.
86 workspaceObject.getDouble(Sizing_ZoneFields::ZoneHumidificationDesignSupplyAirHumidityRatioDifference)) {
349
2/2
✓ Branch 1 taken 42 times.
✓ Branch 4 taken 42 times.
42 sizingZone.setZoneHumidificationDesignSupplyAirHumidityRatioDifference(_zoneHumidificationDesignSupplyAirHumidityRatioDifference.get());
350 }
351
352 // Zone Humidistat Dehumidification Set Point Schedule Name: Optional String
353
3/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 42 times.
86 if (auto _wo = workspaceObject.getTarget(Sizing_ZoneFields::ZoneHumidistatDehumidificationSetPointScheduleName)) {
354
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (auto _mo = translateAndMapWorkspaceObject(_wo.get())) {
355
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (auto sch_ = _mo->optionalCast<Schedule>()) {
356
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setZoneHumidistatDehumidificationSetPointSchedule(sch_.get());
357 } else {
358 ✗ LOG(Warn, workspaceObject.briefDescription() << " has a wrong type for 'Zone Humidistat Dehumidification Set Point Schedule Name'");
359 1 }
360 1 }
361 43 }
362
363 // Zone Humidistat Humidification Set Point Schedule Name: Optional String
364
3/3
✓ Branch 1 taken 43 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 42 times.
86 if (auto _wo = workspaceObject.getTarget(Sizing_ZoneFields::ZoneHumidistatHumidificationSetPointScheduleName)) {
365
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (auto _mo = translateAndMapWorkspaceObject(_wo.get())) {
366
3/4
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
2 if (auto sch_ = _mo->optionalCast<Schedule>()) {
367
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setZoneHumidistatHumidificationSetPointSchedule(sch_.get());
368 } else {
369 ✗ LOG(Warn, workspaceObject.briefDescription() << " has a wrong type for 'Zone Humidistat Huumidification Set Point Schedule Name'");
370 1 }
371 1 }
372 43 }
373
374 // TypeofSpaceSumtoUse
375
1/1
✓ Branch 1 taken 43 times.
43 s = workspaceObject.getString(Sizing_ZoneFields::TypeofSpaceSumtoUse);
376
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 42 times.
43 if (s) {
377
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setSizingOption(s.get());
378 }
379
380 // HeatingCoilSizingMethod
381
1/1
✓ Branch 1 taken 43 times.
43 s = workspaceObject.getString(Sizing_ZoneFields::HeatingCoilSizingMethod);
382
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 42 times.
43 if (s) {
383
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setHeatingCoilSizingMethod(s.get());
384 }
385
386 // MaximumHeatingCapacityToCoolingLoadSizingRatio
387
1/1
✓ Branch 1 taken 43 times.
43 value = workspaceObject.getDouble(Sizing_ZoneFields::MaximumHeatingCapacityToCoolingLoadSizingRatio);
388
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 42 times.
43 if (value) {
389
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 sizingZone.setMaximumHeatingCapacityToCoolingLoadSizingRatio(value.get());
390 }
391 43 }
392
393 43 return result;
394 43 }
395
396 } // namespace energyplus
397
398 } // namespace openstudio
399