GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 80.0% 4 / 0 / 5
Functions: 80.0% 4 / 0 / 5
Branches: -% 0 / 0 / 0

src/model/RefrigerationCase.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_REFRIGERATIONCASE_HPP
7 #define MODEL_REFRIGERATIONCASE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ParentObject.hpp"
11 #include "RefrigerationSystem.hpp"
12 #include "RefrigerationSecondarySystem.hpp"
13 #include "RefrigerationCompressorRack.hpp"
14
15 namespace openstudio {
16
17 class Time;
18
19 namespace model {
20
21 class Schedule;
22 class ThermalZone;
23 class CurveCubic;
24
25 namespace detail {
26
27 class RefrigerationCase_Impl;
28
29 } // namespace detail
30
31 /** RefrigerationCase is a ParentObject that wraps the OpenStudio IDD object 'OS:Refrigeration:Case'. */
32 class MODEL_API RefrigerationCase : public ParentObject
33 {
34 public:
35 /** @name Constructors and Destructors */
36 //@{
37
38 explicit RefrigerationCase(const Model& model, Schedule& caseDefrostSchedule);
39
40 431 virtual ~RefrigerationCase() override = default;
41 // Default the copy and move operators because the virtual dtor is explicit
42 46 RefrigerationCase(const RefrigerationCase& other) = default;
43 117 RefrigerationCase(RefrigerationCase&& other) = default;
44 ✗ RefrigerationCase& operator=(const RefrigerationCase&) = default;
45 1 RefrigerationCase& operator=(RefrigerationCase&&) = default;
46
47 //@}
48
49 static IddObjectType iddObjectType();
50
51 static std::vector<std::string> latentCaseCreditCurveTypeValues();
52
53 static std::vector<std::string> antiSweatHeaterControlTypeValues();
54
55 static std::vector<std::string> caseDefrostTypeValues();
56
57 static std::vector<std::string> defrostEnergyCorrectionCurveTypeValues();
58
59 static std::vector<std::string> unitTypeValues();
60
61 /** @name Getters */
62 //@{
63
64 boost::optional<Schedule> availabilitySchedule() const;
65
66 boost::optional<ThermalZone> thermalZone() const;
67
68 double ratedAmbientTemperature() const;
69
70 bool isRatedAmbientTemperatureDefaulted() const;
71
72 double ratedAmbientRelativeHumidity() const;
73
74 bool isRatedAmbientRelativeHumidityDefaulted() const;
75
76 double ratedTotalCoolingCapacityperUnitLength() const;
77
78 bool isRatedTotalCoolingCapacityperUnitLengthDefaulted() const;
79
80 double ratedLatentHeatRatio() const;
81
82 bool isRatedLatentHeatRatioDefaulted() const;
83
84 double ratedRuntimeFraction() const;
85
86 bool isRatedRuntimeFractionDefaulted() const;
87
88 double caseLength() const;
89
90 bool isCaseLengthDefaulted() const;
91
92 double caseOperatingTemperature() const;
93
94 bool isCaseOperatingTemperatureDefaulted() const;
95
96 std::string latentCaseCreditCurveType() const;
97
98 bool isLatentCaseCreditCurveTypeDefaulted() const;
99
100 CurveCubic latentCaseCreditCurve() const;
101
102 double standardCaseFanPowerperUnitLength() const;
103
104 bool isStandardCaseFanPowerperUnitLengthDefaulted() const;
105
106 double operatingCaseFanPowerperUnitLength() const;
107
108 bool isOperatingCaseFanPowerperUnitLengthDefaulted() const;
109
110 double standardCaseLightingPowerperUnitLength() const;
111
112 bool isStandardCaseLightingPowerperUnitLengthDefaulted() const;
113
114 boost::optional<double> installedCaseLightingPowerperUnitLength() const;
115
116 boost::optional<Schedule> caseLightingSchedule() const;
117
118 double fractionofLightingEnergytoCase() const;
119
120 bool isFractionofLightingEnergytoCaseDefaulted() const;
121
122 double caseAntiSweatHeaterPowerperUnitLength() const;
123
124 bool isCaseAntiSweatHeaterPowerperUnitLengthDefaulted() const;
125
126 double minimumAntiSweatHeaterPowerperUnitLength() const;
127
128 bool isMinimumAntiSweatHeaterPowerperUnitLengthDefaulted() const;
129
130 std::string antiSweatHeaterControlType() const;
131
132 bool isAntiSweatHeaterControlTypeDefaulted() const;
133
134 double humidityatZeroAntiSweatHeaterEnergy() const;
135
136 bool isHumidityatZeroAntiSweatHeaterEnergyDefaulted() const;
137
138 double caseHeight() const;
139
140 bool isCaseHeightDefaulted() const;
141
142 double fractionofAntiSweatHeaterEnergytoCase() const;
143
144 bool isFractionofAntiSweatHeaterEnergytoCaseDefaulted() const;
145
146 double caseDefrostPowerperUnitLength() const;
147
148 bool isCaseDefrostPowerperUnitLengthDefaulted() const;
149
150 std::string caseDefrostType() const;
151
152 bool isCaseDefrostTypeDefaulted() const;
153
154 boost::optional<Schedule> caseDefrostSchedule() const;
155
156 boost::optional<Schedule> caseDefrostDripDownSchedule() const;
157
158 std::string defrostEnergyCorrectionCurveType() const;
159
160 bool isDefrostEnergyCorrectionCurveTypeDefaulted() const;
161
162 boost::optional<CurveCubic> defrostEnergyCorrectionCurve() const;
163
164 double underCaseHVACReturnAirFraction() const;
165
166 bool isUnderCaseHVACReturnAirFractionDefaulted() const;
167
168 boost::optional<Schedule> refrigeratedCaseRestockingSchedule() const;
169
170 boost::optional<Schedule> caseCreditFractionSchedule() const;
171
172 boost::optional<double> designEvaporatorTemperatureorBrineInletTemperature() const;
173
174 double averageRefrigerantChargeInventory() const;
175
176 bool isAverageRefrigerantChargeInventoryDefaulted() const;
177
178 boost::optional<int> numberOfDoors() const;
179
180 boost::optional<double> ratedTotalCoolingCapacityperDoor() const;
181
182 boost::optional<double> standardCaseFanPowerperDoor() const;
183
184 boost::optional<double> operatingCaseFanPowerperDoor() const;
185
186 boost::optional<double> standardCaseLightingPowerperDoor() const;
187
188 boost::optional<double> installedCaseLightingPowerperDoor() const;
189
190 boost::optional<double> caseAntiSweatHeaterPowerperDoor() const;
191
192 boost::optional<double> minimumAntiSweatHeaterPowerperDoor() const;
193
194 boost::optional<double> caseDefrostPowerperDoor() const;
195
196 /** Read the method for defining loads.
197 * Options are UnitLength and NumberOfDoors. If UnitLength values will be used
198 * from the *perUnitLength methods. If NumberOfDoors, the values will be used
199 * from the *perDoor methods.
200 */
201 std::string unitType() const;
202
203 bool isUnitTypeDefaulted() const;
204
205 boost::optional<int> durationofDefrostCycle() const;
206
207 boost::optional<int> dripDownTime() const;
208
209 boost::optional<openstudio::Time> defrost1StartTime() const;
210
211 boost::optional<openstudio::Time> defrost2StartTime() const;
212
213 boost::optional<openstudio::Time> defrost3StartTime() const;
214
215 boost::optional<openstudio::Time> defrost4StartTime() const;
216
217 boost::optional<openstudio::Time> defrost5StartTime() const;
218
219 boost::optional<openstudio::Time> defrost6StartTime() const;
220
221 boost::optional<openstudio::Time> defrost7StartTime() const;
222
223 boost::optional<openstudio::Time> defrost8StartTime() const;
224
225 // Returns the parent RefrigerationSystem if any
226 boost::optional<RefrigerationSystem> system() const;
227
228 // Returns the parent RefrigerationSecondarySystem if any
229 boost::optional<RefrigerationSecondarySystem> secondarySystem() const;
230
231 // Returns the parent RefrigerationCompresorRack if any
232 boost::optional<RefrigerationCompressorRack> compressorRack() const;
233
234 //@}
235 /** @name Setters */
236 //@{
237
238 bool setAvailabilitySchedule(Schedule& schedule);
239
240 void resetAvailabilitySchedule();
241
242 bool setThermalZone(const ThermalZone& thermalZone);
243
244 void resetThermalZone();
245
246 bool setRatedAmbientTemperature(double ratedAmbientTemperature);
247
248 void resetRatedAmbientTemperature();
249
250 bool setRatedAmbientRelativeHumidity(double ratedAmbientRelativeHumidity);
251
252 void resetRatedAmbientRelativeHumidity();
253
254 bool setRatedTotalCoolingCapacityperUnitLength(double ratedTotalCoolingCapacityperUnitLength);
255
256 void resetRatedTotalCoolingCapacityperUnitLength();
257
258 bool setRatedLatentHeatRatio(double ratedLatentHeatRatio);
259
260 void resetRatedLatentHeatRatio();
261
262 bool setRatedRuntimeFraction(double ratedRuntimeFraction);
263
264 void resetRatedRuntimeFraction();
265
266 bool setCaseLength(double caseLength);
267
268 void resetCaseLength();
269
270 bool setCaseOperatingTemperature(double caseOperatingTemperature);
271
272 void resetCaseOperatingTemperature();
273
274 bool setLatentCaseCreditCurveType(const std::string& latentCaseCreditCurveType);
275
276 void resetLatentCaseCreditCurveType();
277
278 bool setLatentCaseCreditCurve(const CurveCubic& curveCubic);
279
280 bool setStandardCaseFanPowerperUnitLength(double standardCaseFanPowerperUnitLength);
281
282 void resetStandardCaseFanPowerperUnitLength();
283
284 bool setOperatingCaseFanPowerperUnitLength(double operatingCaseFanPowerperUnitLength);
285
286 void resetOperatingCaseFanPowerperUnitLength();
287
288 bool setStandardCaseLightingPowerperUnitLength(double standardCaseLightingPowerperUnitLength);
289
290 void resetStandardCaseLightingPowerperUnitLength();
291
292 bool setInstalledCaseLightingPowerperUnitLength(double installedCaseLightingPowerperUnitLength);
293
294 void resetInstalledCaseLightingPowerperUnitLength();
295
296 bool setCaseLightingSchedule(Schedule& schedule);
297
298 void resetCaseLightingSchedule();
299
300 bool setFractionofLightingEnergytoCase(double fractionofLightingEnergytoCase);
301
302 void resetFractionofLightingEnergytoCase();
303
304 bool setCaseAntiSweatHeaterPowerperUnitLength(double caseAntiSweatHeaterPowerperUnitLength);
305
306 void resetCaseAntiSweatHeaterPowerperUnitLength();
307
308 bool setMinimumAntiSweatHeaterPowerperUnitLength(double minimumAntiSweatHeaterPowerperUnitLength);
309
310 void resetMinimumAntiSweatHeaterPowerperUnitLength();
311
312 bool setAntiSweatHeaterControlType(const std::string& antiSweatHeaterControlType);
313
314 void resetAntiSweatHeaterControlType();
315
316 bool setHumidityatZeroAntiSweatHeaterEnergy(double humidityatZeroAntiSweatHeaterEnergy);
317
318 void resetHumidityatZeroAntiSweatHeaterEnergy();
319
320 bool setCaseHeight(double caseHeight);
321
322 void resetCaseHeight();
323
324 bool setFractionofAntiSweatHeaterEnergytoCase(double fractionofAntiSweatHeaterEnergytoCase);
325
326 void resetFractionofAntiSweatHeaterEnergytoCase();
327
328 bool setCaseDefrostPowerperUnitLength(double caseDefrostPowerperUnitLength);
329
330 void resetCaseDefrostPowerperUnitLength();
331
332 bool setCaseDefrostType(const std::string& caseDefrostType);
333
334 void resetCaseDefrostType();
335
336 bool setCaseDefrostSchedule(Schedule& schedule);
337
338 void resetCaseDefrostSchedule();
339
340 bool setCaseDefrostDripDownSchedule(Schedule& schedule);
341
342 void resetCaseDefrostDripDownSchedule();
343
344 bool setDefrostEnergyCorrectionCurveType(const std::string& defrostEnergyCorrectionCurveType);
345
346 void resetDefrostEnergyCorrectionCurveType();
347
348 bool setDefrostEnergyCorrectionCurve(const CurveCubic& curveCubic);
349
350 void resetDefrostEnergyCorrectionCurve();
351
352 bool setUnderCaseHVACReturnAirFraction(double underCaseHVACReturnAirFraction);
353
354 void resetUnderCaseHVACReturnAirFraction();
355
356 bool setRefrigeratedCaseRestockingSchedule(Schedule& schedule);
357
358 void resetRefrigeratedCaseRestockingSchedule();
359
360 bool setCaseCreditFractionSchedule(Schedule& schedule);
361
362 void resetCaseCreditFractionSchedule();
363
364 bool setDesignEvaporatorTemperatureorBrineInletTemperature(double designEvaporatorTemperatureorBrineInletTemperature);
365
366 void resetDesignEvaporatorTemperatureorBrineInletTemperature();
367
368 bool setAverageRefrigerantChargeInventory(double averageRefrigerantChargeInventory);
369
370 void resetAverageRefrigerantChargeInventory();
371
372 bool setNumberOfDoors(int numberOfDoors);
373
374 void resetNumberOfDoors();
375
376 bool setRatedTotalCoolingCapacityperDoor(double ratedTotalCoolingCapacityperDoor);
377
378 void resetRatedTotalCoolingCapacityperDoor();
379
380 bool setStandardCaseFanPowerperDoor(double standardCaseFanPowerperDoor);
381
382 void resetStandardCaseFanPowerperDoor();
383
384 bool setOperatingCaseFanPowerperDoor(double operatingCaseFanPowerperDoor);
385
386 void resetOperatingCaseFanPowerperDoor();
387
388 bool setStandardCaseLightingPowerperDoor(double standardCaseLightingPowerperDoor);
389
390 void resetStandardCaseLightingPowerperDoor();
391
392 bool setInstalledCaseLightingPowerperDoor(double installedCaseLightingPowerperDoor);
393
394 void resetInstalledCaseLightingPowerperDoor();
395
396 bool setCaseAntiSweatHeaterPowerperDoor(double caseAntiSweatHeaterPowerperDoor);
397
398 void resetCaseAntiSweatHeaterPowerperDoor();
399
400 bool setMinimumAntiSweatHeaterPowerperDoor(double minimumAntiSweatHeaterPowerperDoor);
401
402 void resetMinimumAntiSweatHeaterPowerperDoor();
403
404 bool setCaseDefrostPowerperDoor(double caseDefrostPowerperDoor);
405
406 void resetCaseDefrostPowerperDoor();
407
408 /** Set the method for defining loads.
409 * Options are UnitLength and NumberOfDoors. If UnitLength values will be used
410 * from the *perUnitLength methods. If NumberOfDoors, the values will be used
411 * from the *perDoor methods.
412 */
413 bool setUnitType(const std::string& unitType);
414
415 /** Reset unit type to the default, "UnitLength" **/
416 void resetUnitType();
417
418 bool setDurationofDefrostCycle(int durationofDefrostCycle);
419
420 void resetDurationofDefrostCycle();
421
422 bool setDripDownTime(int dripDownTime);
423
424 void resetDripDownTime();
425
426 bool setDefrost1StartTime(const openstudio::Time& defrost1StartTime);
427
428 void resetDefrost1StartTime();
429
430 bool setDefrost2StartTime(const openstudio::Time& defrost2StartTime);
431
432 void resetDefrost2StartTime();
433
434 bool setDefrost3StartTime(const openstudio::Time& defrost3StartTime);
435
436 void resetDefrost3StartTime();
437
438 bool setDefrost4StartTime(const openstudio::Time& defrost4StartTime);
439
440 void resetDefrost4StartTime();
441
442 bool setDefrost5StartTime(const openstudio::Time& defrost5StartTime);
443
444 void resetDefrost5StartTime();
445
446 bool setDefrost6StartTime(const openstudio::Time& defrost6StartTime);
447
448 void resetDefrost6StartTime();
449
450 bool setDefrost7StartTime(const openstudio::Time& defrost7StartTime);
451
452 void resetDefrost7StartTime();
453
454 bool setDefrost8StartTime(const openstudio::Time& defrost8StartTime);
455
456 void resetDefrost8StartTime();
457
458 bool addToSystem(RefrigerationSystem& system);
459
460 bool addToSecondarySystem(RefrigerationSecondarySystem& secondarySystem);
461
462 bool addToCompressorRack(RefrigerationCompressorRack& compressorRack);
463
464 // Remove from parent system if any
465 void removeFromSystem();
466
467 // Remove from parent secondary system if any
468 void removeFromSecondarySystem();
469
470 // Remove from parent compressor rack if any
471 void removeFromCompressorRack();
472
473 //@}
474 /** @name Other */
475 //@{
476
477 //@}
478 protected:
479 /// @cond
480 using ImplType = detail::RefrigerationCase_Impl;
481
482 explicit RefrigerationCase(std::shared_ptr<detail::RefrigerationCase_Impl> impl);
483
484 friend class detail::RefrigerationCase_Impl;
485 friend class Model;
486 friend class IdfObject;
487 friend class openstudio::detail::IdfObject_Impl;
488 /// @endcond
489 private:
490 REGISTER_LOGGER("openstudio.model.RefrigerationCase");
491 };
492
493 /** \relates RefrigerationCase*/
494 using OptionalRefrigerationCase = boost::optional<RefrigerationCase>;
495
496 /** \relates RefrigerationCase*/
497 using RefrigerationCaseVector = std::vector<RefrigerationCase>;
498
499 } // namespace model
500 } // namespace openstudio
501
502 #endif // MODEL_REFRIGERATIONCASE_HPP
503