GCC Code Coverage Report


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

src/model/ElectricLoadCenterTransformer.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_ELECTRICLOADCENTERTRANSFORMER_HPP
7 #define MODEL_ELECTRICLOADCENTERTRANSFORMER_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ModelObject.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Schedule;
17 class ThermalZone;
18 class OutputMeter;
19
20 namespace detail {
21
22 class ElectricLoadCenterTransformer_Impl;
23
24 } // namespace detail
25
26 /** ElectricLoadCenterTransformer is a ModelObject that wraps the OpenStudio IDD object 'OS:ElectricLoadCenter:Transformer'. */
27 class MODEL_API ElectricLoadCenterTransformer : public ModelObject
28 {
29 public:
30 /** @name Constructors and Destructors */
31 //@{
32
33 explicit ElectricLoadCenterTransformer(const Model& model);
34
35 28 virtual ~ElectricLoadCenterTransformer() override = default;
36 // Default the copy and move operators because the virtual dtor is explicit
37 ✗ ElectricLoadCenterTransformer(const ElectricLoadCenterTransformer& other) = default;
38 10 ElectricLoadCenterTransformer(ElectricLoadCenterTransformer&& other) = default;
39 ✗ ElectricLoadCenterTransformer& operator=(const ElectricLoadCenterTransformer&) = default;
40 ✗ ElectricLoadCenterTransformer& operator=(ElectricLoadCenterTransformer&&) = default;
41
42 //@}
43
44 static IddObjectType iddObjectType();
45
46 static std::vector<std::string> transformerUsageValues();
47
48 static std::vector<std::string> phaseValues();
49
50 static std::vector<std::string> conductorMaterialValues();
51
52 static std::vector<std::string> performanceInputMethodValues();
53
54 /** @name Getters */
55 //@{
56
57 boost::optional<Schedule> availabilitySchedule() const;
58
59 std::string transformerUsage() const;
60
61 bool isTransformerUsageDefaulted() const;
62
63 boost::optional<ThermalZone> zone() const;
64
65 double radiativeFraction() const;
66
67 bool isRadiativeFractionDefaulted() const;
68
69 boost::optional<double> ratedCapacity() const;
70
71 std::string phase() const;
72
73 bool isPhaseDefaulted() const;
74
75 std::string conductorMaterial() const;
76
77 bool isConductorMaterialDefaulted() const;
78
79 double fullLoadTemperatureRise() const;
80
81 bool isFullLoadTemperatureRiseDefaulted() const;
82
83 double fractionofEddyCurrentLosses() const;
84
85 bool isFractionofEddyCurrentLossesDefaulted() const;
86
87 std::string performanceInputMethod() const;
88
89 bool isPerformanceInputMethodDefaulted() const;
90
91 boost::optional<double> ratedNoLoadLoss() const;
92
93 boost::optional<double> ratedLoadLoss() const;
94
95 double nameplateEfficiency() const;
96
97 bool isNameplateEfficiencyDefaulted() const;
98
99 double perUnitLoadforNameplateEfficiency() const;
100
101 bool isPerUnitLoadforNameplateEfficiencyDefaulted() const;
102
103 double referenceTemperatureforNameplateEfficiency() const;
104
105 bool isReferenceTemperatureforNameplateEfficiencyDefaulted() const;
106
107 boost::optional<double> perUnitLoadforMaximumEfficiency() const;
108
109 bool considerTransformerLossforUtilityCost() const;
110
111 bool isConsiderTransformerLossforUtilityCostDefaulted() const;
112
113 std::vector<std::string> meters() const;
114
115 boost::optional<std::string> getMeter(unsigned index) const;
116
117 //@}
118 /** @name Setters */
119 //@{
120
121 bool setAvailabilitySchedule(Schedule& schedule);
122
123 void resetAvailabilitySchedule();
124
125 bool setTransformerUsage(const std::string& transformerUsage);
126
127 void resetTransformerUsage();
128
129 bool setZone(const ThermalZone& thermalZone);
130
131 void resetZone();
132
133 bool setRadiativeFraction(double radiativeFraction);
134
135 void resetRadiativeFraction();
136
137 bool setRatedCapacity(double ratedCapacity);
138
139 void resetRatedCapacity();
140
141 bool setPhase(const std::string& phase);
142
143 void resetPhase();
144
145 bool setConductorMaterial(const std::string& conductorMaterial);
146
147 void resetConductorMaterial();
148
149 bool setFullLoadTemperatureRise(double fullLoadTemperatureRise);
150
151 void resetFullLoadTemperatureRise();
152
153 bool setFractionofEddyCurrentLosses(double fractionofEddyCurrentLosses);
154
155 void resetFractionofEddyCurrentLosses();
156
157 bool setPerformanceInputMethod(const std::string& performanceInputMethod);
158
159 void resetPerformanceInputMethod();
160
161 bool setRatedNoLoadLoss(double ratedNoLoadLoss);
162
163 void resetRatedNoLoadLoss();
164
165 bool setRatedLoadLoss(double ratedLoadLoss);
166
167 void resetRatedLoadLoss();
168
169 bool setNameplateEfficiency(double nameplateEfficiency);
170
171 void resetNameplateEfficiency();
172
173 bool setPerUnitLoadforNameplateEfficiency(double perUnitLoadforNameplateEfficiency);
174
175 void resetPerUnitLoadforNameplateEfficiency();
176
177 bool setReferenceTemperatureforNameplateEfficiency(double referenceTemperatureforNameplateEfficiency);
178
179 void resetReferenceTemperatureforNameplateEfficiency();
180
181 bool setPerUnitLoadforMaximumEfficiency(double perUnitLoadforMaximumEfficiency);
182
183 void resetPerUnitLoadforMaximumEfficiency();
184
185 bool setConsiderTransformerLossforUtilityCost(bool considerTransformerLossforUtilityCost);
186
187 void resetConsiderTransformerLossforUtilityCost();
188
189 void eraseMeters();
190
191 bool eraseMeter(unsigned index);
192
193 bool addMeter(const std::string& meterName);
194
195 bool setMeter(const std::string& meterName, unsigned index);
196
197 //@}
198 /** @name Other */
199 //@{
200
201 //@}
202 protected:
203 /// @cond
204 using ImplType = detail::ElectricLoadCenterTransformer_Impl;
205
206 explicit ElectricLoadCenterTransformer(std::shared_ptr<detail::ElectricLoadCenterTransformer_Impl> impl);
207
208 friend class detail::ElectricLoadCenterTransformer_Impl;
209 friend class Model;
210 friend class IdfObject;
211 friend class openstudio::detail::IdfObject_Impl;
212 /// @endcond
213 private:
214 REGISTER_LOGGER("openstudio.model.ElectricLoadCenterTransformer");
215 };
216
217 /** \relates ElectricLoadCenterTransformer*/
218 using OptionalElectricLoadCenterTransformer = boost::optional<ElectricLoadCenterTransformer>;
219
220 /** \relates ElectricLoadCenterTransformer*/
221 using ElectricLoadCenterTransformerVector = std::vector<ElectricLoadCenterTransformer>;
222
223 } // namespace model
224 } // namespace openstudio
225
226 #endif // MODEL_ELECTRICLOADCENTERTRANSFORMER_HPP
227