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/PeopleDefinition_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_PEOPLEDEFINITION_IMPL_HPP
7 #define MODEL_PEOPLEDEFINITION_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadDefinition_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class PeopleDefinition;
16
17 namespace detail {
18
19 /** PeopleDefinition_Impl is a SpaceLoadDefinition_Impl that is the implementation class for PeopleDefinition.*/
20 class MODEL_API PeopleDefinition_Impl : public SpaceLoadDefinition_Impl
21 {
22 public:
23 /** @name Constructors and Destructors */
24 //@{
25
26 PeopleDefinition_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
27
28 PeopleDefinition_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
29
30 PeopleDefinition_Impl(const PeopleDefinition_Impl& other, Model_Impl* model, bool keepHandle);
31
32 1702 virtual ~PeopleDefinition_Impl() override = default;
33
34 //@}
35 /** @name Virtual Methods */
36 //@{
37
38 // TODO: remove
39 virtual const std::vector<std::string>& outputVariableNames() const override;
40
41 virtual IddObjectType iddObjectType() const override;
42
43 //@}
44 /** @name Getters */
45 //@{
46
47 std::string numberofPeopleCalculationMethod() const;
48
49 boost::optional<double> numberofPeople() const;
50
51 boost::optional<double> peopleperSpaceFloorArea() const;
52
53 boost::optional<double> spaceFloorAreaperPerson() const;
54
55 double fractionRadiant() const;
56
57 boost::optional<double> sensibleHeatFraction() const;
58
59 bool isSensibleHeatFractionDefaulted() const;
60
61 bool isSensibleHeatFractionAutocalculated() const;
62
63 double carbonDioxideGenerationRate() const;
64
65 bool isCarbonDioxideGenerationRateDefaulted() const;
66
67 bool enableASHRAE55ComfortWarnings() const;
68
69 bool isEnableASHRAE55ComfortWarningsDefaulted() const;
70
71 std::string meanRadiantTemperatureCalculationType() const;
72
73 bool isMeanRadiantTemperatureCalculationTypeDefaulted() const;
74
75 /** Return the thermal comfort model type in extensible group i. Indexing starts at 0, and
76 * i should be less than numThermalComfortModelTypes. */
77 boost::optional<std::string> getThermalComfortModelType(int i) const;
78
79 /** Returns the number of thermal comfort model types registered in this object. */
80 int numThermalComfortModelTypes() const;
81
82 //@}
83 /** @name Setters */
84 //@{
85
86 bool setNumberofPeople(boost::optional<double> numberofPeople);
87
88 bool setPeopleperSpaceFloorArea(boost::optional<double> peopleperSpaceFloorArea);
89
90 bool setSpaceFloorAreaperPerson(boost::optional<double> spaceFloorAreaperPerson);
91
92 bool setFractionRadiant(double fractionRadiant);
93
94 bool setSensibleHeatFraction(double sensibleHeatFraction);
95
96 void resetSensibleHeatFraction();
97
98 void autocalculateSensibleHeatFraction();
99
100 bool setCarbonDioxideGenerationRate(double carbonDioxideGenerationRate);
101
102 void resetCarbonDioxideGenerationRate();
103
104 bool setEnableASHRAE55ComfortWarnings(bool enableASHRAE55ComfortWarnings);
105
106 void resetEnableASHRAE55ComfortWarnings();
107
108 bool setMeanRadiantTemperatureCalculationType(const std::string& meanRadiantTemperatureCalculationType);
109
110 void resetMeanRadiantTemperatureCalculationType();
111
112 bool pushThermalComfortModelType(const std::string& thermalComfortModelType);
113
114 bool setThermalComfortModelType(int i, const std::string& thermalComfortModelType);
115
116 bool eraseThermalComfortModelType(int i);
117
118 //@}
119 /** @name Other */
120 //@{
121
122 /** Returns the number of people represented by this definition, assuming floorArea (m^2). */
123 double getNumberOfPeople(double floorArea) const;
124
125 /** Returns the people/m^2 represented by this definition, assuming floorArea (m^2). */
126 double getPeoplePerFloorArea(double floorArea) const;
127
128 /** Returns the m^2/person represented by this definition, assuming floorArea (m^2). */
129 double getFloorAreaPerPerson(double floorArea) const;
130
131 /** If method is a \link validNumberOfPeopleCalculationMethodValues valid number of people
132 * calculation method \endlnk, changes this definition to an equivalent number of people,
133 * under the assumption of floorArea (m^2). */
134 bool setNumberOfPeopleCalculationMethod(const std::string& method, double floorArea);
135
136 virtual std::vector<EMSActuatorNames> emsActuatorNames() const override;
137
138 virtual std::vector<std::string> emsInternalVariableNames() const override;
139
140 //@}
141 private:
142 − REGISTER_LOGGER("openstudio.model.PeopleDefinition");
143
144 std::vector<std::string> numberofPeopleCalculationMethodValues() const;
145 std::vector<std::string> meanRadiantTemperatureCalculationTypeValues() const;
146 std::vector<std::string> thermalComfortModelTypeValues() const;
147 };
148
149 } // namespace detail
150
151 } // namespace model
152 } // namespace openstudio
153
154 #endif // MODEL_PEOPLEDEFINITION_IMPL_HPP
155