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/LightsDefinition_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_LIGHTSDEFINITION_IMPL_HPP
7 #define MODEL_LIGHTSDEFINITION_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadDefinition_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class LightsDefinition;
16
17 namespace detail {
18
19 /** LightsDefinition_Impl is a SpaceLoadDefinition_Impl that is the implementation class for LightsDefinition.*/
20 class MODEL_API LightsDefinition_Impl : public SpaceLoadDefinition_Impl
21 {
22
23 public:
24 /** @name Constructors and Destructors */
25 //@{
26
27 LightsDefinition_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
28
29 LightsDefinition_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
30
31 LightsDefinition_Impl(const LightsDefinition_Impl& other, Model_Impl* model, bool keepHandle);
32
33 2490 virtual ~LightsDefinition_Impl() override = default;
34
35 //@}
36 /** @name Virtual Methods */
37 //@{
38
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 designLevelCalculationMethod() const;
48 boost::optional<double> lightingLevel() const;
49 boost::optional<double> wattsperSpaceFloorArea() const;
50 boost::optional<double> wattsperPerson() const;
51
52 double fractionRadiant() const;
53 bool isFractionRadiantDefaulted() const;
54
55 double fractionVisible() const;
56 bool isFractionVisibleDefaulted() const;
57
58 double returnAirFraction() const;
59 bool isReturnAirFractionDefaulted() const;
60
61 bool returnAirFractionCalculatedfromPlenumTemperature() const;
62 bool isReturnAirFractionCalculatedfromPlenumTemperatureDefaulted() const;
63
64 double returnAirFractionFunctionofPlenumTemperatureCoefficient1() const;
65 bool isReturnAirFractionFunctionofPlenumTemperatureCoefficient1Defaulted() const;
66
67 double returnAirFractionFunctionofPlenumTemperatureCoefficient2() const;
68 bool isReturnAirFractionFunctionofPlenumTemperatureCoefficient2Defaulted() const;
69
70 //@}
71 /** @name Setters */
72 //@{
73
74 bool setLightingLevel(boost::optional<double> lightingLevel);
75
76 bool setWattsperSpaceFloorArea(boost::optional<double> wattsperSpaceFloorArea);
77
78 bool setWattsperPerson(boost::optional<double> wattsperPerson);
79
80 bool setFractionRadiant(double fractionRadiant);
81 void resetFractionRadiant();
82
83 bool setFractionVisible(double fractionVisible);
84 void resetFractionVisible();
85
86 bool setReturnAirFraction(double returnAirFraction);
87 void resetReturnAirFraction();
88
89 bool setReturnAirFractionCalculatedfromPlenumTemperature(bool returnAirFractionCalculatedfromPlenumTemperature);
90 void resetReturnAirFractionCalculatedfromPlenumTemperature();
91
92 bool setReturnAirFractionFunctionofPlenumTemperatureCoefficient1(double returnAirFractionFunctionofPlenumTemperatureCoefficient1);
93 void resetReturnAirFractionFunctionofPlenumTemperatureCoefficient1();
94
95 bool setReturnAirFractionFunctionofPlenumTemperatureCoefficient2(double returnAirFractionFunctionofPlenumTemperatureCoefficient2);
96 void resetReturnAirFractionFunctionofPlenumTemperatureCoefficient2();
97
98 //@}
99 /** @name Other */
100 //@{
101
102 /** Returns the lighting level represented by this definition, assuming floorArea (m^2) and
103 * numPeople. */
104 double getLightingPower(double floorArea, double numPeople) const;
105
106 /** Returns the watts/m^2 represented by this definition, assuming floorArea (m^2) and
107 * numPeople. */
108 double getPowerPerFloorArea(double floorArea, double numPeople) const;
109
110 /** Returns the watts/person represented by this definition, assuming floorArea (m^2) and
111 * numPeople. */
112 double getPowerPerPerson(double floorArea, double numPeople) const;
113
114 /** If method is a \link validDesignLevelCalculationMethodValues valid design level
115 * calculation method \endlink, changes this definition to an equivalent lighting level, under
116 * the assumptions of floorArea (m^2) and numPeople. */
117 bool setDesignLevelCalculationMethod(const std::string& method, double floorArea, double numPeople);
118
119 virtual std::vector<EMSActuatorNames> emsActuatorNames() const override;
120
121 virtual std::vector<std::string> emsInternalVariableNames() const override;
122
123 //@}
124 protected:
125 private:
126 − REGISTER_LOGGER("openstudio.model.LightsDefinition");
127 };
128
129 } // namespace detail
130
131 } // namespace model
132 } // namespace openstudio
133
134 #endif // MODEL_LIGHTSDEFINITION_IMPL_HPP
135