GCC Code Coverage Report


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

src/model/HotWaterEquipment_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_HOTWATEREQUIPMENT_IMPL_HPP
7 #define MODEL_HOTWATEREQUIPMENT_IMPL_HPP
8
9 #include "ModelAPI.hpp"
10 #include "SpaceLoadInstance_Impl.hpp"
11
12 namespace openstudio {
13 namespace model {
14
15 class Schedule;
16 class HotWaterEquipment;
17 class HotWaterEquipmentDefinition;
18
19 namespace detail {
20
21 /** HotWaterEquipment_Impl is a SpaceLoadInstance_Impl that is the implementation class for HotWaterEquipment.*/
22 class MODEL_API HotWaterEquipment_Impl : public SpaceLoadInstance_Impl
23 {
24 public:
25 /** @name Constructors and Destructors */
26 //@{
27
28 HotWaterEquipment_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
29
30 HotWaterEquipment_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
31
32 HotWaterEquipment_Impl(const HotWaterEquipment_Impl& other, Model_Impl* model, bool keepHandle);
33
34 11 virtual ~HotWaterEquipment_Impl() override = default;
35
36 //@}
37 /** @name Virtual Methods */
38 //@{
39
40 virtual const std::vector<std::string>& outputVariableNames() const override;
41
42 virtual IddObjectType iddObjectType() const override;
43
44 virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override;
45
46 virtual bool hardSize() override;
47
48 virtual bool hardApplySchedules() override;
49
50 virtual double multiplier() const override;
51
52 virtual bool isMultiplierDefaulted() const override;
53
54 virtual bool isAbsolute() const override;
55
56 //@}
57 /** @name Getters */
58 //@{
59
60 /** Gets the HotWaterEquipmentDefinition object. */
61 HotWaterEquipmentDefinition hotWaterEquipmentDefinition() const;
62
63 /** Returns the (fractional) equipment schedule. If this object does not
64 * specify a schedule this function will search the hierarchy. */
65 boost::optional<Schedule> schedule() const;
66
67 /** Returns true if this object does not specify a schedule directly. */
68 bool isScheduleDefaulted() const;
69
70 std::string endUseSubcategory() const;
71
72 bool isEndUseSubcategoryDefaulted() const;
73
74 //@}
75 /** @name Setters */
76 //@{
77
78 /** Sets the HotWaterEquipmentDefinition object. */
79 bool setHotWaterEquipmentDefinition(const HotWaterEquipmentDefinition& definition);
80
81 /** Sets the definition of this instance. */
82 virtual bool setDefinition(const SpaceLoadDefinition& definition) override;
83
84 /** Sets the (fractional) Schedule. */
85 bool setSchedule(Schedule& schedule);
86
87 /** Resets the (fractional) Schedule. */
88 void resetSchedule();
89
90 bool setMultiplier(double multiplier);
91
92 void resetMultiplier();
93
94 bool setEndUseSubcategory(const std::string& endUseSubcategory);
95
96 void resetEndUseSubcategory();
97
98 //@}
99 /** @name Other */
100 //@{
101
102 boost::optional<double> designLevel() const;
103
104 boost::optional<double> powerPerFloorArea() const;
105
106 boost::optional<double> powerPerPerson() const;
107
108 /** Returns the design level represented by this instance, assuming floorArea (m^2) and
109 * numPeople. */
110 double getDesignLevel(double floorArea, double numPeople) const;
111
112 /** Returns the watts/m^2 represented by this instance, assuming floorArea (m^2) and
113 * numPeople. */
114 double getPowerPerFloorArea(double floorArea, double numPeople) const;
115
116 /** Returns the watts/person represented by this instance, assuming floorArea (m^2) and
117 * numPeople. */
118 double getPowerPerPerson(double floorArea, double numPeople) const;
119
120 virtual std::vector<EMSActuatorNames> emsActuatorNames() const override;
121
122 virtual std::vector<std::string> emsInternalVariableNames() const override;
123
124 //@}
125 protected:
126 // index of the space name
127 virtual int spaceIndex() const override;
128
129 // index of the definition name
130 virtual int definitionIndex() const override;
131
132 private:
133 REGISTER_LOGGER("openstudio.model.HotWaterEquipment");
134
135 boost::optional<ModelObject> hotWaterEquipmentDefinitionAsModelObject() const;
136 boost::optional<ModelObject> scheduleAsModelObject() const;
137
138 bool setHotWaterEquipmentDefinitionAsModelObject(const boost::optional<ModelObject>& modelObject);
139 bool setScheduleAsModelObject(const boost::optional<ModelObject>& modelObject);
140 };
141
142 } // namespace detail
143
144 } // namespace model
145 } // namespace openstudio
146
147 #endif // MODEL_HOTWATEREQUIPMENT_IMPL_HPP
148