GCC Code Coverage Report


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

src/model/HotWaterEquipmentDefinition.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_HOTWATEREQUIPMENTDEFINITION_HPP
7 #define MODEL_HOTWATEREQUIPMENTDEFINITION_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadDefinition.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 class HotWaterEquipmentDefinition_Impl;
18
19 } // namespace detail
20
21 /** HotWaterEquipmentDefinition is a SpaceLoadDefinition that wraps the OpenStudio IDD object
22 * 'OS:HotWaterEquipment:Definition'. Its fields are derived from the EnergyPlus IDD object
23 * 'HotWaterEquipment'. Note that this object is not tied into any plant loop or water system,
24 * so it should not be used in models for which water use is an important output.
25 * \sa HotWaterEquipment */
26 class MODEL_API HotWaterEquipmentDefinition : public SpaceLoadDefinition
27 {
28 public:
29 /** @name Constructors and Destructors */
30 //@{
31
32 explicit HotWaterEquipmentDefinition(const Model& model);
33
34 58 virtual ~HotWaterEquipmentDefinition() override = default;
35 // Default the copy and move operators because the virtual dtor is explicit
36 ✗ HotWaterEquipmentDefinition(const HotWaterEquipmentDefinition& other) = default;
37 ✗ HotWaterEquipmentDefinition(HotWaterEquipmentDefinition&& other) = default;
38 ✗ HotWaterEquipmentDefinition& operator=(const HotWaterEquipmentDefinition&) = default;
39 ✗ HotWaterEquipmentDefinition& operator=(HotWaterEquipmentDefinition&&) = default;
40
41 //@}
42 /** @name Static Methods */
43 //@{
44
45 static IddObjectType iddObjectType();
46
47 static std::vector<std::string> validDesignLevelCalculationMethodValues();
48
49 //@}
50 /** @name Getters */
51 //@{
52
53 std::string designLevelCalculationMethod() const;
54
55 boost::optional<double> designLevel() const;
56
57 boost::optional<double> wattsperSpaceFloorArea() const;
58
59 boost::optional<double> wattsperPerson() const;
60
61 double fractionLatent() const;
62
63 bool isFractionLatentDefaulted() const;
64
65 double fractionRadiant() const;
66
67 bool isFractionRadiantDefaulted() const;
68
69 double fractionLost() const;
70
71 bool isFractionLostDefaulted() const;
72
73 //@}
74 /** @name Setters */
75 //@{
76
77 /// Sets designLevelCalculationMethod to 'DesignLevel', clears wattsperSpaceFloorArea
78 /// and wattsperPerson, and sets designLevel.
79 bool setDesignLevel(double designLevel);
80
81 /// Sets designLevelCalculationMethod to 'Watts/Area', clears designLevel
82 /// and wattsperPerson, and sets wattsperSpaceFloorArea.
83 bool setWattsperSpaceFloorArea(double wattsperSpaceFloorArea);
84
85 /// Sets designLevelCalculationMethod to 'Watts/Person', clears designLevel
86 /// and wattsperSpaceFloorArea, and sets wattsperPerson.
87 bool setWattsperPerson(double wattsperPerson);
88
89 bool setFractionLatent(double fractionLatent);
90
91 void resetFractionLatent();
92
93 bool setFractionRadiant(double fractionRadiant);
94
95 void resetFractionRadiant();
96
97 bool setFractionLost(double fractionLost);
98
99 void resetFractionLost();
100
101 //@}
102 /** @name Other */
103 //@{
104
105 /** Returns the design level represented by this definition, assuming floorArea (m^2) and
106 * numPeople. */
107 double getDesignLevel(double floorArea, double numPeople) const;
108
109 /** Returns the watts/m^2 represented by this definition, assuming floorArea (m^2) and
110 * numPeople. */
111 double getPowerPerFloorArea(double floorArea, double numPeople) const;
112
113 /** Returns the watts/person represented by this definition, assuming floorArea (m^2) and
114 * numPeople. */
115 double getPowerPerPerson(double floorArea, double numPeople) const;
116
117 /** If method is a \link validDesignLevelCalculationMethodValues valid design level
118 * calculation method \endlink, changes this definition to an equivalent power level, under
119 * the assumptions of floorArea (m^2) and numPeople. */
120 bool setDesignLevelCalculationMethod(const std::string& method, double floorArea, double numPeople);
121
122 //@}
123 protected:
124 /// @cond
125 using ImplType = detail::HotWaterEquipmentDefinition_Impl;
126
127 friend class Model;
128 friend class openstudio::IdfObject;
129
130 explicit HotWaterEquipmentDefinition(std::shared_ptr<detail::HotWaterEquipmentDefinition_Impl> impl);
131
132 /// @endcond
133 private:
134 REGISTER_LOGGER("openstudio.model.HotWaterEquipmentDefinition");
135 };
136
137 /** \relates HotWaterEquipmentDefinition*/
138 using OptionalHotWaterEquipmentDefinition = boost::optional<HotWaterEquipmentDefinition>;
139
140 /** \relates HotWaterEquipmentDefinition*/
141 using HotWaterEquipmentDefinitionVector = std::vector<HotWaterEquipmentDefinition>;
142
143 } // namespace model
144 } // namespace openstudio
145
146 #endif // MODEL_HOTWATEREQUIPMENTDEFINITION_HPP
147