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/OtherEquipmentDefinition_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_OTHEREQUIPMENTDEFINITION_IMPL_HPP
7 #define MODEL_OTHEREQUIPMENTDEFINITION_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadDefinition_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 namespace detail {
16
17 /** OtherEquipmentDefinition_Impl is a SpaceLoadDefinition_Impl that is the implementation class for OtherEquipmentDefinition.*/
18 class MODEL_API OtherEquipmentDefinition_Impl : public SpaceLoadDefinition_Impl
19 {
20
21 public:
22 /** @name Constructors and Destructors */
23 //@{
24
25 OtherEquipmentDefinition_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
26
27 OtherEquipmentDefinition_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
28
29 OtherEquipmentDefinition_Impl(const OtherEquipmentDefinition_Impl& other, Model_Impl* model, bool keepHandle);
30
31 16 virtual ~OtherEquipmentDefinition_Impl() override = default;
32
33 //@}
34 /** @name Virtual Methods */
35 //@{
36
37 virtual const std::vector<std::string>& outputVariableNames() const override;
38
39 virtual IddObjectType iddObjectType() const override;
40
41 //@}
42 /** @name Getters */
43 //@{
44
45 std::string designLevelCalculationMethod() const;
46 boost::optional<double> designLevel() const;
47 boost::optional<double> wattsperSpaceFloorArea() const;
48 boost::optional<double> wattsperPerson() const;
49
50 double fractionLatent() const;
51 bool isFractionLatentDefaulted() const;
52
53 double fractionRadiant() const;
54 bool isFractionRadiantDefaulted() const;
55
56 double fractionLost() const;
57 bool isFractionLostDefaulted() const;
58
59 //@}
60 /** @name Setters */
61 //@{
62
63 /// Sets designLevelCalculationMethod to 'EquipmentLevel', clears wattsperSpaceFloorArea
64 /// and wattsperPerson, and sets designLevel.
65 bool setDesignLevel(boost::optional<double> designLevel);
66
67 /// Sets designLevelCalculationMethod to 'Watts/Area', clears designLevel
68 /// and wattsperPerson, and sets wattsperSpaceFloorArea.
69 bool setWattsperSpaceFloorArea(boost::optional<double> wattsperSpaceFloorArea);
70
71 /// Sets designLevelCalculationMethod to 'Watts/Person', clears designLevel
72 /// and wattsperSpaceFloorArea, and sets wattsperPerson.
73 bool setWattsperPerson(boost::optional<double> wattsperPerson);
74
75 bool setFractionLatent(double fractionLatent);
76 void resetFractionLatent();
77
78 bool setFractionRadiant(double fractionRadiant);
79 void resetFractionRadiant();
80
81 bool setFractionLost(double fractionLost);
82 void resetFractionLost();
83
84 //@}
85 /** @name Other */
86 //@{
87
88 /** Returns the design level represented by this definition, assuming floorArea (m^2) and
89 * numPeople. */
90 double getDesignLevel(double floorArea, double numPeople) const;
91
92 /** Returns the watts/m^2 represented by this definition, assuming floorArea (m^2) and
93 * numPeople. */
94 double getPowerPerFloorArea(double floorArea, double numPeople) const;
95
96 /** Returns the watts/person represented by this definition, assuming floorArea (m^2) and
97 * numPeople. */
98 double getPowerPerPerson(double floorArea, double numPeople) const;
99
100 /** If method is a \link validDesignLevelCalculationMethodValues valid design level
101 * calculation method \endlink, changes this definition to an equivalent power level, under
102 * the assumptions of floorArea (m^2) and numPeople. */
103 bool setDesignLevelCalculationMethod(const std::string& method, double floorArea, double numPeople);
104
105 virtual std::vector<EMSActuatorNames> emsActuatorNames() const override;
106
107 virtual std::vector<std::string> emsInternalVariableNames() const override;
108
109 //@}
110 private:
111 − REGISTER_LOGGER("openstudio.model.OtherEquipmentDefinition");
112 };
113
114 } // namespace detail
115
116 } // namespace model
117 } // namespace openstudio
118
119 #endif // MODEL_OTHEREQUIPMENTDEFINITION_IMPL_HPP
120