GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 1 / 1 / 2
Functions: 100.0% 1 / 1 / 2
Branches: -% 0 / 1 / 1

src/model/SizingZone_Impl.hpp
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 #ifndef MODEL_SIZINGZONE_IMPL_HPP
7 #define MODEL_SIZINGZONE_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class ThermalZone;
16 class Schedule;
17
18 namespace detail {
19
20 /** SizingZone_Impl is a ModelObject_Impl that is the implementation class for SizingZone.*/
21 class MODEL_API SizingZone_Impl : public ModelObject_Impl
22 {
23
24 public:
25 /** @name Constructors and Destructors */
26 //@{
27
28 SizingZone_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
29
30 SizingZone_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
31
32 SizingZone_Impl(const SizingZone_Impl& other, Model_Impl* model, bool keepHandle);
33
34 5730 virtual ~SizingZone_Impl() override = default;
35
36 //@}
37
38 /** @name Virtual Methods */
39 //@{
40
41 virtual const std::vector<std::string>& outputVariableNames() const override;
42
43 virtual IddObjectType iddObjectType() const override;
44
45 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
46
47 virtual std::vector<EMSActuatorNames> emsActuatorNames() const override;
48
49 virtual std::vector<std::string> emsInternalVariableNames() const override;
50
51 //@}
52 /** @name Getters */
53 //@{
54
55 ThermalZone thermalZone() const;
56
57 std::string zoneCoolingDesignSupplyAirTemperatureInputMethod() const;
58
59 double zoneCoolingDesignSupplyAirTemperature() const;
60
61 double zoneCoolingDesignSupplyAirTemperatureDifference() const;
62
63 std::string zoneHeatingDesignSupplyAirTemperatureInputMethod() const;
64
65 double zoneHeatingDesignSupplyAirTemperature() const;
66
67 double zoneHeatingDesignSupplyAirTemperatureDifference() const;
68
69 double zoneCoolingDesignSupplyAirHumidityRatio() const;
70
71 double zoneHeatingDesignSupplyAirHumidityRatio() const;
72
73 boost::optional<double> zoneHeatingSizingFactor() const;
74
75 boost::optional<double> zoneCoolingSizingFactor() const;
76
77 std::string coolingDesignAirFlowMethod() const;
78
79 bool isCoolingDesignAirFlowMethodDefaulted() const;
80
81 double coolingDesignAirFlowRate() const;
82
83 bool isCoolingDesignAirFlowRateDefaulted() const;
84
85 double coolingMinimumAirFlowperZoneFloorArea() const;
86
87 bool isCoolingMinimumAirFlowperZoneFloorAreaDefaulted() const;
88
89 double coolingMinimumAirFlow() const;
90
91 bool isCoolingMinimumAirFlowDefaulted() const;
92
93 double coolingMinimumAirFlowFraction() const;
94
95 bool isCoolingMinimumAirFlowFractionDefaulted() const;
96
97 std::string heatingDesignAirFlowMethod() const;
98
99 bool isHeatingDesignAirFlowMethodDefaulted() const;
100
101 double heatingDesignAirFlowRate() const;
102
103 bool isHeatingDesignAirFlowRateDefaulted() const;
104
105 double heatingMaximumAirFlowperZoneFloorArea() const;
106
107 bool isHeatingMaximumAirFlowperZoneFloorAreaDefaulted() const;
108
109 double heatingMaximumAirFlow() const;
110
111 bool isHeatingMaximumAirFlowDefaulted() const;
112
113 double heatingMaximumAirFlowFraction() const;
114
115 bool isHeatingMaximumAirFlowFractionDefaulted() const;
116
117 bool accountforDedicatedOutdoorAirSystem() const;
118
119 std::string dedicatedOutdoorAirSystemControlStrategy() const;
120
121 boost::optional<double> dedicatedOutdoorAirLowSetpointTemperatureforDesign() const;
122
123 bool isDedicatedOutdoorAirLowSetpointTemperatureforDesignAutosized() const;
124
125 boost::optional<double> dedicatedOutdoorAirHighSetpointTemperatureforDesign() const;
126
127 bool isDedicatedOutdoorAirHighSetpointTemperatureforDesignAutosized() const;
128
129 std::string zoneLoadSizingMethod() const;
130
131 std::string zoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod() const;
132
133 boost::optional<double> zoneDehumidificationDesignSupplyAirHumidityRatio() const;
134
135 double zoneCoolingDesignSupplyAirHumidityRatioDifference() const;
136
137 std::string zoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod() const;
138
139 boost::optional<double> zoneHumidificationDesignSupplyAirHumidityRatio() const;
140
141 double zoneHumidificationDesignSupplyAirHumidityRatioDifference() const;
142
143 boost::optional<Schedule> zoneHumidistatDehumidificationSetPointSchedule() const;
144
145 boost::optional<Schedule> zoneHumidistatHumidificationSetPointSchedule() const;
146
147 // Fields from DesignSpecification:ZoneAirDistribution
148
149 double designZoneAirDistributionEffectivenessinCoolingMode() const;
150
151 bool isDesignZoneAirDistributionEffectivenessinCoolingModeDefaulted() const;
152
153 double designZoneAirDistributionEffectivenessinHeatingMode() const;
154
155 bool isDesignZoneAirDistributionEffectivenessinHeatingModeDefaulted() const;
156
157 double designZoneSecondaryRecirculationFraction() const;
158
159 bool isDesignZoneSecondaryRecirculationFractionDefaulted() const;
160
161 double designMinimumZoneVentilationEfficiency() const;
162
163 bool isDesignMinimumZoneVentilationEfficiencyDefaulted() const;
164
165 std::string sizingOption() const;
166
167 std::string heatingCoilSizingMethod() const;
168
169 double maximumHeatingCapacityToCoolingLoadSizingRatio() const;
170
171 //@}
172 /** @name Setters */
173 //@{
174
175 bool setThermalZone(const ThermalZone& thermalZone);
176
177 bool setZoneCoolingDesignSupplyAirTemperatureInputMethod(const std::string& value);
178
179 bool setZoneCoolingDesignSupplyAirTemperature(double zoneCoolingDesignSupplyAirTemperature);
180
181 bool setZoneCoolingDesignSupplyAirTemperatureDifference(double value);
182
183 bool setZoneHeatingDesignSupplyAirTemperatureInputMethod(const std::string& value);
184
185 bool setZoneHeatingDesignSupplyAirTemperature(double zoneHeatingDesignSupplyAirTemperature);
186
187 bool setZoneHeatingDesignSupplyAirTemperatureDifference(double value);
188
189 bool setZoneCoolingDesignSupplyAirHumidityRatio(double zoneCoolingDesignSupplyAirHumidityRatio);
190
191 bool setZoneHeatingDesignSupplyAirHumidityRatio(double zoneHeatingDesignSupplyAirHumidityRatio);
192
193 bool setZoneHeatingSizingFactor(boost::optional<double> zoneHeatingSizingFactor);
194
195 void resetZoneHeatingSizingFactor();
196
197 bool setZoneCoolingSizingFactor(boost::optional<double> zoneCoolingSizingFactor);
198
199 void resetZoneCoolingSizingFactor();
200
201 bool setCoolingDesignAirFlowMethod(const std::string& coolingDesignAirFlowMethod);
202
203 void resetCoolingDesignAirFlowMethod();
204
205 bool setCoolingDesignAirFlowRate(double coolingDesignAirFlowRate);
206
207 void resetCoolingDesignAirFlowRate();
208
209 bool setCoolingMinimumAirFlowperZoneFloorArea(double coolingMinimumAirFlowperZoneFloorArea);
210
211 void resetCoolingMinimumAirFlowperZoneFloorArea();
212
213 bool setCoolingMinimumAirFlow(double coolingMinimumAirFlow);
214
215 void resetCoolingMinimumAirFlow();
216
217 bool setCoolingMinimumAirFlowFraction(double coolingMinimumAirFlowFraction);
218
219 void resetCoolingMinimumAirFlowFraction();
220
221 bool setHeatingDesignAirFlowMethod(const std::string& heatingDesignAirFlowMethod);
222
223 void resetHeatingDesignAirFlowMethod();
224
225 bool setHeatingDesignAirFlowRate(double heatingDesignAirFlowRate);
226
227 void resetHeatingDesignAirFlowRate();
228
229 bool setHeatingMaximumAirFlowperZoneFloorArea(double heatingMaximumAirFlowperZoneFloorArea);
230
231 void resetHeatingMaximumAirFlowperZoneFloorArea();
232
233 bool setHeatingMaximumAirFlow(double heatingMaximumAirFlow);
234
235 void resetHeatingMaximumAirFlow();
236
237 bool setHeatingMaximumAirFlowFraction(double heatingMaximumAirFlowFraction);
238
239 void resetHeatingMaximumAirFlowFraction();
240
241 bool setAccountforDedicatedOutdoorAirSystem(bool accountforDedicatedOutdoorAirSystem);
242
243 bool setDedicatedOutdoorAirSystemControlStrategy(const std::string& dedicatedOutdoorAirSystemControlStrategy);
244
245 bool setDedicatedOutdoorAirLowSetpointTemperatureforDesign(boost::optional<double> dedicatedOutdoorAirLowSetpointTemperatureforDesign);
246
247 void autosizeDedicatedOutdoorAirLowSetpointTemperatureforDesign();
248
249 bool setDedicatedOutdoorAirHighSetpointTemperatureforDesign(boost::optional<double> dedicatedOutdoorAirHighSetpointTemperatureforDesign);
250
251 void autosizeDedicatedOutdoorAirHighSetpointTemperatureforDesign();
252
253 bool setZoneLoadSizingMethod(const std::string& zoneLoadSizingMethod);
254
255 bool setZoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod(const std::string& zoneLatentCoolingDesignSupplyAirHumidityRatioInputMethod);
256
257 bool setZoneDehumidificationDesignSupplyAirHumidityRatio(double zoneDehumidificationDesignSupplyAirHumidityRatio);
258 void resetZoneDehumidificationDesignSupplyAirHumidityRatio();
259
260 bool setZoneCoolingDesignSupplyAirHumidityRatioDifference(double zoneCoolingDesignSupplyAirHumidityRatioDifference);
261
262 bool setZoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod(const std::string& zoneLatentHeatingDesignSupplyAirHumidityRatioInputMethod);
263
264 bool setZoneHumidificationDesignSupplyAirHumidityRatio(double zoneHumidificationDesignSupplyAirHumidityRatio);
265 void resetZoneHumidificationDesignSupplyAirHumidityRatio();
266
267 bool setZoneHumidificationDesignSupplyAirHumidityRatioDifference(double zoneHumidificationDesignSupplyAirHumidityRatioDifference);
268
269 bool setZoneHumidistatDehumidificationSetPointSchedule(Schedule& schedule);
270 void resetZoneHumidistatDehumidificationSetPointSchedule();
271
272 bool setZoneHumidistatHumidificationSetPointSchedule(Schedule& schedule);
273 void resetZoneHumidistatHumidificationSetPointSchedule();
274
275 // Fields from DesignSpecification:ZoneAirDistribution
276
277 bool setDesignZoneAirDistributionEffectivenessinCoolingMode(double designZoneAirDistributionEffectivenessinCoolingMode);
278
279 void resetDesignZoneAirDistributionEffectivenessinCoolingMode();
280
281 bool setDesignZoneAirDistributionEffectivenessinHeatingMode(double designZoneAirDistributionEffectivenessinHeatingMode);
282
283 void resetDesignZoneAirDistributionEffectivenessinHeatingMode();
284
285 bool setDesignZoneSecondaryRecirculationFraction(double designZoneSecondaryRecirculationFraction);
286
287 void resetDesignZoneSecondaryRecirculationFraction();
288
289 bool setDesignMinimumZoneVentilationEfficiency(double designMinimumZoneVentilationEfficiency);
290
291 void resetDesignMinimumZoneVentilationEfficiency();
292
293 bool setSizingOption(const std::string& sizingOption);
294
295 bool setHeatingCoilSizingMethod(const std::string& heatingCoilSizingMethod);
296
297 bool setMaximumHeatingCapacityToCoolingLoadSizingRatio(double maximumHeatingCapacityToCoolingLoadSizingRatio);
298
299 //@}
300 /** @name Other */
301 //@{
302
303 void autosize();
304
305 void applySizingValues();
306
307 boost::optional<double> autosizedDedicatedOutdoorAirLowSetpointTemperatureforDesign() const;
308
309 boost::optional<double> autosizedDedicatedOutdoorAirHighSetpointTemperatureforDesign() const;
310
311 //@}
312 protected:
313 private:
314 − REGISTER_LOGGER("openstudio.model.SizingZone");
315
316 // Optional getters for use by methods like children() so can remove() if the constructor fails.
317 boost::optional<ThermalZone> optionalThermalZone() const;
318
319 std::vector<std::string> coolingDesignAirFlowMethodValues() const;
320 std::vector<std::string> heatingDesignAirFlowMethodValues() const;
321 boost::optional<ModelObject> thermalZoneAsModelObject() const;
322
323 bool setThermalZoneAsModelObject(const boost::optional<ModelObject>& modelObject);
324 };
325
326 } // namespace detail
327
328 } // namespace model
329 } // namespace openstudio
330
331 #endif // MODEL_SIZINGZONE_IMPL_HPP
332