GCC Code Coverage Report


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

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