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