GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 80.1% 165 / 0 / 206
Functions: 83.6% 56 / 0 / 67
Branches: 57.7% 90 / 0 / 156

src/model/ElectricLoadCenterStorageSimple.cpp
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 #include "ElectricLoadCenterStorageSimple.hpp"
7 #include "ElectricLoadCenterStorageSimple_Impl.hpp"
8
9 #include "Schedule.hpp"
10 #include "Schedule_Impl.hpp"
11 #include "ThermalZone.hpp"
12 #include "ThermalZone_Impl.hpp"
13 #include "Model.hpp"
14 #include "Model_Impl.hpp"
15
16 #include "ScheduleTypeLimits.hpp"
17 #include "ScheduleTypeRegistry.hpp"
18
19 #include <utilities/idd/IddEnums.hxx>
20 #include <utilities/idd/OS_ElectricLoadCenter_Storage_Simple_FieldEnums.hxx>
21
22 #include "../utilities/units/Unit.hpp"
23 #include "../utilities/core/Assert.hpp"
24
25 namespace openstudio {
26 namespace model {
27
28 namespace detail {
29
30 2 ElectricLoadCenterStorageSimple_Impl::ElectricLoadCenterStorageSimple_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
31 2 : ElectricalStorage_Impl(idfObject, model, keepHandle) {
32
4/6
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 13 not taken.
2 OS_ASSERT(idfObject.iddObject().type() == ElectricLoadCenterStorageSimple::iddObjectType());
33 2 }
34
35 ✗ ElectricLoadCenterStorageSimple_Impl::ElectricLoadCenterStorageSimple_Impl(const openstudio::detail::WorkspaceObject_Impl& other,
36 ✗ Model_Impl* model, bool keepHandle)
37 ✗ : ElectricalStorage_Impl(other, model, keepHandle) {
38 ✗ OS_ASSERT(other.iddObject().type() == ElectricLoadCenterStorageSimple::iddObjectType());
39 ✗ }
40
41 ✗ ElectricLoadCenterStorageSimple_Impl::ElectricLoadCenterStorageSimple_Impl(const ElectricLoadCenterStorageSimple_Impl& other, Model_Impl* model,
42 ✗ bool keepHandle)
43 ✗ : ElectricalStorage_Impl(other, model, keepHandle) {}
44
45 ✗ const std::vector<std::string>& ElectricLoadCenterStorageSimple_Impl::outputVariableNames() const {
46 static const std::vector<std::string> result{"Electric Storage Simple Charge State", "Electric Storage Charge Power",
47 "Electric Storage Charge Energy", "Electric Storage Production Decrement Energy",
48 "Electric Storage Discharge Power", "Electric Storage Discharge Energy",
49 ✗ "Electric Storage Thermal Loss Rate", "Electric Storage Thermal Loss Energy"};
50 ✗ return result;
51 ✗ }
52
53 ✗ IddObjectType ElectricLoadCenterStorageSimple_Impl::iddObjectType() const {
54 ✗ return ElectricLoadCenterStorageSimple::iddObjectType();
55 }
56
57 ✗ std::vector<ScheduleTypeKey> ElectricLoadCenterStorageSimple_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
58 ✗ std::vector<ScheduleTypeKey> result;
59 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
60 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
61 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
62 ✗ if (std::find(b, e, OS_ElectricLoadCenter_Storage_SimpleFields::AvailabilityScheduleName) != e) {
63 ✗ result.push_back(ScheduleTypeKey("ElectricLoadCenterStorageSimple", "Availability"));
64 }
65 ✗ return result;
66 ✗ }
67
68 //@}
69 /** @name Getters */
70 //@{
71
72 // Included in parent class
73 // boost::optional<ElectricLoadCenterDistribution> ElectricLoadCenterStorageSimple_Impl::electricLoadCenterDistribution() const
74 // {
75 // boost::optional<ElectricLoadCenterDistribution> result;
76 // for (const auto& list : getObject<ModelObject>().getModelObjectSources<ModelObjectList>(ModelObjectList::iddObjectType())){
77 // auto elcds = list.getModelObjectSources<ElectricLoadCenterDistribution>(ElectricLoadCenterDistribution::iddObjectType());
78 // if (elcds.empty()){
79 // error
80 // } else if (elcds.size() == 1u){
81 // return elcds[0];
82 // }else{
83 // error
84 // }
85 // }
86 // return boost::none;
87 // }
88
89 //boost::optional<ElectricLoadCenterDistribution> ElectricLoadCenterStorageSimple_Impl::electricLoadCenterDistribution const {
90
91 // boost::optional<ElectricLoadCenterDistribution> value;
92 // for ( const ElectricLoadCenterDistribution& elcd : this->model().getConcreteModelObjects<ElectricLoadCenterDistribution>() )
93 // {
94 // if ( boost::optional<ElectricalStorage> elecStor = mchp.electricalStorage() )
95 // {
96 // if (elecStor->handle() == this->handle())
97 // {
98 // value = elcd;
99 // }
100 // }
101 // }
102 // return value;
103
104 //}
105
106 3 boost::optional<Schedule> ElectricLoadCenterStorageSimple_Impl::optionalAvailabilitySchedule() const {
107
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ElectricLoadCenter_Storage_SimpleFields::AvailabilityScheduleName);
108 }
109
110 3 Schedule ElectricLoadCenterStorageSimple_Impl::availabilitySchedule() const {
111
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<Schedule> value = optionalAvailabilitySchedule();
112
2/2
✓ Branch 1 taken 2 times.
✓ Branch 2 taken 1 time.
3 if (!value) {
113 //LOG_AND_THROW(briefDescription() << " does not have an Availability Schedule attached.");
114 // I'm choosing to just return alwaysOnDiscreteSchedule
115
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 return this->model().alwaysOnDiscreteSchedule();
116 }
117
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 return value.get();
118 3 }
119
120 ✗ bool ElectricLoadCenterStorageSimple_Impl::isAvailabilityScheduleDefaulted() const {
121 ✗ return isEmpty(OS_ElectricLoadCenter_Storage_SimpleFields::AvailabilityScheduleName);
122 }
123
124 // Optional thermal Zone for heat gains
125 2 boost::optional<ThermalZone> ElectricLoadCenterStorageSimple_Impl::thermalZone() const {
126
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 return getObject<ModelObject>().getModelObjectTarget<ThermalZone>(OS_ElectricLoadCenter_Storage_SimpleFields::ZoneName);
127 }
128
129 // Radiative fraction for zone heat gains, defaults to 0, and not used if thermalZone above isn't used
130 1 double ElectricLoadCenterStorageSimple_Impl::radiativeFractionforZoneHeatGains() const {
131
1/1
✓ Branch 1 taken 1 time.
1 boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_SimpleFields::RadiativeFractionforZoneHeatGains, true);
132
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(value);
133
1/1
✓ Branch 1 taken 1 time.
2 return value.get();
134 }
135
136 3 bool ElectricLoadCenterStorageSimple_Impl::isRadiativeFractionforZoneHeatGainsDefaulted() const {
137 3 return isEmpty(OS_ElectricLoadCenter_Storage_SimpleFields::RadiativeFractionforZoneHeatGains);
138 }
139
140 // Nominal Efficiency for Charging for zone heat gains, has a default in IDD
141 1 double ElectricLoadCenterStorageSimple_Impl::nominalEnergeticEfficiencyforCharging() const {
142
1/1
✓ Branch 1 taken 1 time.
1 boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_SimpleFields::NominalEnergeticEfficiencyforCharging, true);
143
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(value);
144
1/1
✓ Branch 1 taken 1 time.
2 return value.get();
145 }
146
147 3 bool ElectricLoadCenterStorageSimple_Impl::isNominalEnergeticEfficiencyforChargingDefaulted() const {
148 3 return isEmpty(OS_ElectricLoadCenter_Storage_SimpleFields::NominalEnergeticEfficiencyforCharging);
149 }
150
151 // Nominal Efficiency for Discharging for zone heat gains, has a default in IDD
152 1 double ElectricLoadCenterStorageSimple_Impl::nominalDischargingEnergeticEfficiency() const {
153
1/1
✓ Branch 1 taken 1 time.
1 boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_SimpleFields::NominalDischargingEnergeticEfficiency, true);
154
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(value);
155
1/1
✓ Branch 1 taken 1 time.
2 return value.get();
156 }
157
158 3 bool ElectricLoadCenterStorageSimple_Impl::isNominalDischargingEnergeticEfficiencyDefaulted() const {
159 3 return isEmpty(OS_ElectricLoadCenter_Storage_SimpleFields::NominalDischargingEnergeticEfficiency);
160 }
161
162 // Maximum Storage Capacity, required, no default
163 5 double ElectricLoadCenterStorageSimple_Impl::maximumStorageCapacity() const {
164
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_SimpleFields::MaximumStorageCapacity, true);
165
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
166
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
167 }
168
169 // Maximum Rate of Discharge, required, no default
170 3 double ElectricLoadCenterStorageSimple_Impl::maximumPowerforDischarging() const {
171
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_SimpleFields::MaximumPowerforDischarging, true);
172
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(value);
173
1/1
✓ Branch 1 taken 3 times.
6 return value.get();
174 }
175
176 // Maximum Rate of Charge, required, no default
177 3 double ElectricLoadCenterStorageSimple_Impl::maximumPowerforCharging() const {
178
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<double> value = getDouble(OS_ElectricLoadCenter_Storage_SimpleFields::MaximumPowerforCharging, true);
179
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(value);
180
1/1
✓ Branch 1 taken 3 times.
6 return value.get();
181 }
182
183 // Initial state of charge, if empty it will default to half of the maximum capacity
184 2 double ElectricLoadCenterStorageSimple_Impl::initialStateofCharge() const {
185
1/1
✓ Branch 1 taken 2 times.
2 boost::optional<double> optIniStateCharge = getDouble(OS_ElectricLoadCenter_Storage_SimpleFields::InitialStateofCharge, true);
186 // if it's set
187
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
2 if (optIniStateCharge) {
188 // Get it and return
189
1/1
✓ Branch 1 taken 1 time.
1 return optIniStateCharge.get();
190 }
191 // We Default it to half the maximum capacity
192
1/1
✓ Branch 1 taken 1 time.
1 double maxCap = maximumStorageCapacity();
193 1 return maxCap / 2.0;
194 }
195
196 3 bool ElectricLoadCenterStorageSimple_Impl::isInitialStateofChargeDefaulted() const {
197 3 return isEmpty(OS_ElectricLoadCenter_Storage_SimpleFields::InitialStateofCharge);
198 }
199
200 //@}
201 /** @name Setters */
202 //@{
203
204 1 bool ElectricLoadCenterStorageSimple_Impl::setAvailabilitySchedule(Schedule& schedule) {
205
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
4 bool result = setSchedule(OS_ElectricLoadCenter_Storage_SimpleFields::AvailabilityScheduleName, "ElectricLoadCenterStorageSimple",
206 "Availability", schedule);
207 1 return result;
208 }
209
210 1 void ElectricLoadCenterStorageSimple_Impl::resetAvailabilitySchedule() {
211
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ElectricLoadCenter_Storage_SimpleFields::AvailabilityScheduleName, "");
212
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
213 1 }
214
215 // Set the thermal Zone for heat gains
216 1 bool ElectricLoadCenterStorageSimple_Impl::setThermalZone(const ThermalZone& thermalZone) {
217
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 bool result = setPointer(OS_ElectricLoadCenter_Storage_SimpleFields::ZoneName, thermalZone.handle());
218 1 return result;
219 }
220
221 // Reset the zone (leave blank)
222 ✗ void ElectricLoadCenterStorageSimple_Impl::resetThermalZone() {
223 ✗ bool result = setString(OS_ElectricLoadCenter_Storage_SimpleFields::ZoneName, "");
224 ✗ OS_ASSERT(result);
225 ✗ }
226
227 1 bool ElectricLoadCenterStorageSimple_Impl::setRadiativeFractionforZoneHeatGains(double radiativeFractionforZoneHeatGains) {
228 1 bool result = setDouble(OS_ElectricLoadCenter_Storage_SimpleFields::RadiativeFractionforZoneHeatGains, radiativeFractionforZoneHeatGains);
229 1 return result;
230 }
231
232 1 void ElectricLoadCenterStorageSimple_Impl::resetRadiativeFractionforZoneHeatGains() {
233
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ElectricLoadCenter_Storage_SimpleFields::RadiativeFractionforZoneHeatGains, "");
234
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
235 1 }
236
237 3 bool ElectricLoadCenterStorageSimple_Impl::setNominalEnergeticEfficiencyforCharging(double nominalEnergeticEfficiencyforCharging) {
238 bool result =
239 3 setDouble(OS_ElectricLoadCenter_Storage_SimpleFields::NominalEnergeticEfficiencyforCharging, nominalEnergeticEfficiencyforCharging);
240 3 return result;
241 }
242
243 1 void ElectricLoadCenterStorageSimple_Impl::resetNominalEnergeticEfficiencyforCharging() {
244
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ElectricLoadCenter_Storage_SimpleFields::NominalEnergeticEfficiencyforCharging, "");
245
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
246 1 }
247
248 3 bool ElectricLoadCenterStorageSimple_Impl::setNominalDischargingEnergeticEfficiency(double nominalDischargingEnergeticEfficiency) {
249 bool result =
250 3 setDouble(OS_ElectricLoadCenter_Storage_SimpleFields::NominalDischargingEnergeticEfficiency, nominalDischargingEnergeticEfficiency);
251 3 return result;
252 }
253
254 1 void ElectricLoadCenterStorageSimple_Impl::resetNominalDischargingEnergeticEfficiency() {
255
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ElectricLoadCenter_Storage_SimpleFields::NominalDischargingEnergeticEfficiency, "");
256
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
257 1 }
258
259 3 bool ElectricLoadCenterStorageSimple_Impl::setMaximumStorageCapacity(double maximumStorageCapacity) {
260 3 bool result = setDouble(OS_ElectricLoadCenter_Storage_SimpleFields::MaximumStorageCapacity, maximumStorageCapacity);
261 3 return result;
262 }
263
264 3 bool ElectricLoadCenterStorageSimple_Impl::setMaximumPowerforDischarging(double maximumPowerforDischarging) {
265 3 bool result = setDouble(OS_ElectricLoadCenter_Storage_SimpleFields::MaximumPowerforDischarging, maximumPowerforDischarging);
266 3 return result;
267 }
268
269 3 bool ElectricLoadCenterStorageSimple_Impl::setMaximumPowerforCharging(double maximumPowerforCharging) {
270 3 bool result = setDouble(OS_ElectricLoadCenter_Storage_SimpleFields::MaximumPowerforCharging, maximumPowerforCharging);
271 3 return result;
272 }
273
274 1 bool ElectricLoadCenterStorageSimple_Impl::setInitialStateofCharge(double value) {
275 1 bool result = setDouble(OS_ElectricLoadCenter_Storage_SimpleFields::InitialStateofCharge, value);
276 1 return result;
277 }
278
279 1 void ElectricLoadCenterStorageSimple_Impl::resetInitialStateofCharge() {
280
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_ElectricLoadCenter_Storage_SimpleFields::InitialStateofCharge, "");
281
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
282 1 }
283
284 ✗ std::vector<EMSActuatorNames> ElectricLoadCenterStorageSimple_Impl::emsActuatorNames() const {
285 ✗ std::vector<EMSActuatorNames> actuators{{"Electrical Storage", "Power Draw Rate"}, {"Electrical Storage", "Power Charge Rate"}};
286 ✗ return actuators;
287 ✗ }
288
289 ✗ std::vector<std::string> ElectricLoadCenterStorageSimple_Impl::emsInternalVariableNames() const {
290 ✗ std::vector<std::string> types{"Electrical Storage Simple Maximum Capacity"};
291 ✗ return types;
292 ✗ }
293 } // namespace detail
294
295 /* Constructor. Defaults the availabilitySchedule to alwaysOnDiscreteSchedule,
296 * Defaults efficiencies for charge and discharge to 0.8
297 * maximum storage capacity to 1.0E13
298 * Maximum Power for Charge/Discharge to 1.0E6
299 * Reference: EnergyPlus example files (v8.5, LrgOff_GridStorageDemandLeveling */
300 2 ElectricLoadCenterStorageSimple::ElectricLoadCenterStorageSimple(const Model& model)
301 2 : ElectricalStorage(ElectricLoadCenterStorageSimple::iddObjectType(), model) {
302
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 2 times.
✗ Branch 5 not taken.
2 OS_ASSERT(getImpl<detail::ElectricLoadCenterStorageSimple_Impl>());
303
304 // already defaults to alwaysOn
305 //Schedule schedule = model.alwaysOnDiscreteSchedule();
306 //setAvailabilitySchedule(schedule);
307
308
1/1
✓ Branch 1 taken 2 times.
2 setNominalEnergeticEfficiencyforCharging(0.8);
309
1/1
✓ Branch 1 taken 2 times.
2 setNominalDischargingEnergeticEfficiency(0.8);
310
1/1
✓ Branch 1 taken 2 times.
2 setMaximumStorageCapacity(1.0E13);
311
1/1
✓ Branch 1 taken 2 times.
2 setMaximumPowerforDischarging(1.0E6);
312
1/1
✓ Branch 1 taken 2 times.
2 setMaximumPowerforCharging(1.0E6);
313 2 }
314
315 7732 IddObjectType ElectricLoadCenterStorageSimple::iddObjectType() {
316
1/1
✓ Branch 1 taken 7732 times.
7732 return {IddObjectType::OS_ElectricLoadCenter_Storage_Simple};
317 }
318
319 // Convenience method to return the electricalLoadCenter on which it's assigned (optional)
320 // Included in parent
321 // boost::optional<ElectricLoadCenterDistribution> ElectricLoadCenterStorageSimple::electricLoadCenterDistribution() const
322 // {
323 // return getImpl<detail::Generator_Impl>()->electricLoadCenterDistribution();
324 // }
325
326 3 Schedule ElectricLoadCenterStorageSimple::availabilitySchedule() const {
327
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->availabilitySchedule();
328 }
329
330 ✗ bool ElectricLoadCenterStorageSimple::isAvailabilityScheduleDefaulted() const {
331 ✗ return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->isAvailabilityScheduleDefaulted();
332 }
333
334 // TODO: Included in parent shouldn't need that
335 //boost::optional<ThermalZone> ElectricLoadCenterStorageSimple::thermalZone() const {
336 // return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->thermalZone();
337 //}
338
339 1 double ElectricLoadCenterStorageSimple::radiativeFractionforZoneHeatGains() const {
340
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->radiativeFractionforZoneHeatGains();
341 }
342
343 3 bool ElectricLoadCenterStorageSimple::isRadiativeFractionforZoneHeatGainsDefaulted() const {
344
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->isRadiativeFractionforZoneHeatGainsDefaulted();
345 }
346
347 1 double ElectricLoadCenterStorageSimple::nominalEnergeticEfficiencyforCharging() const {
348
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->nominalEnergeticEfficiencyforCharging();
349 }
350
351 3 bool ElectricLoadCenterStorageSimple::isNominalEnergeticEfficiencyforChargingDefaulted() const {
352
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->isNominalEnergeticEfficiencyforChargingDefaulted();
353 }
354
355 1 double ElectricLoadCenterStorageSimple::nominalDischargingEnergeticEfficiency() const {
356
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->nominalDischargingEnergeticEfficiency();
357 }
358
359 3 bool ElectricLoadCenterStorageSimple::isNominalDischargingEnergeticEfficiencyDefaulted() const {
360
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->isNominalDischargingEnergeticEfficiencyDefaulted();
361 }
362
363 4 double ElectricLoadCenterStorageSimple::maximumStorageCapacity() const {
364
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->maximumStorageCapacity();
365 }
366
367 3 double ElectricLoadCenterStorageSimple::maximumPowerforDischarging() const {
368
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->maximumPowerforDischarging();
369 }
370
371 3 double ElectricLoadCenterStorageSimple::maximumPowerforCharging() const {
372
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->maximumPowerforCharging();
373 }
374
375 2 double ElectricLoadCenterStorageSimple::initialStateofCharge() const {
376
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->initialStateofCharge();
377 }
378
379 3 bool ElectricLoadCenterStorageSimple::isInitialStateofChargeDefaulted() const {
380
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->isInitialStateofChargeDefaulted();
381 }
382
383 // Setters
384 1 bool ElectricLoadCenterStorageSimple::setAvailabilitySchedule(Schedule& schedule) {
385
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->setAvailabilitySchedule(schedule);
386 }
387
388 1 void ElectricLoadCenterStorageSimple::resetAvailabilitySchedule() {
389
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->resetAvailabilitySchedule();
390 1 }
391
392 // TODO: Included in parent shouldn't need that
393 //bool ElectricLoadCenterStorageSimple::setThermalZone(ThermalZone& zone) {
394 // return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->setThermalZone(zone);
395 //}
396 //void ElectricLoadCenterStorageSimple::resetThermalZone() {
397 // getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->resetThermalZone();
398 //}
399
400 1 bool ElectricLoadCenterStorageSimple::setRadiativeFractionforZoneHeatGains(double radiativeFractionforZoneHeatGains) {
401
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->setRadiativeFractionforZoneHeatGains(radiativeFractionforZoneHeatGains);
402 }
403
404 1 void ElectricLoadCenterStorageSimple::resetRadiativeFractionforZoneHeatGains() {
405
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->resetRadiativeFractionforZoneHeatGains();
406 1 }
407
408 3 bool ElectricLoadCenterStorageSimple::setNominalEnergeticEfficiencyforCharging(double nominalEnergeticEfficiencyforCharging) {
409
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->setNominalEnergeticEfficiencyforCharging(nominalEnergeticEfficiencyforCharging);
410 }
411
412 1 void ElectricLoadCenterStorageSimple::resetNominalEnergeticEfficiencyforCharging() {
413
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->resetNominalEnergeticEfficiencyforCharging();
414 1 }
415
416 3 bool ElectricLoadCenterStorageSimple::setNominalDischargingEnergeticEfficiency(double nominalDischargingEnergeticEfficiency) {
417
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->setNominalDischargingEnergeticEfficiency(nominalDischargingEnergeticEfficiency);
418 }
419
420 1 void ElectricLoadCenterStorageSimple::resetNominalDischargingEnergeticEfficiency() {
421
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->resetNominalDischargingEnergeticEfficiency();
422 1 }
423
424 3 bool ElectricLoadCenterStorageSimple::setMaximumStorageCapacity(double maximumStorageCapacity) {
425
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->setMaximumStorageCapacity(maximumStorageCapacity);
426 }
427
428 3 bool ElectricLoadCenterStorageSimple::setMaximumPowerforDischarging(double maximumPowerforDischarging) {
429
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->setMaximumPowerforDischarging(maximumPowerforDischarging);
430 }
431
432 3 bool ElectricLoadCenterStorageSimple::setMaximumPowerforCharging(double maximumPowerforCharging) {
433
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->setMaximumPowerforCharging(maximumPowerforCharging);
434 }
435
436 1 bool ElectricLoadCenterStorageSimple::setInitialStateofCharge(double initialStateofCharge) {
437
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->setInitialStateofCharge(initialStateofCharge);
438 }
439
440 1 void ElectricLoadCenterStorageSimple::resetInitialStateofCharge() {
441
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::ElectricLoadCenterStorageSimple_Impl>()->resetInitialStateofCharge();
442 1 }
443
444 /// @cond
445 ✗ ElectricLoadCenterStorageSimple::ElectricLoadCenterStorageSimple(std::shared_ptr<detail::ElectricLoadCenterStorageSimple_Impl> impl)
446 ✗ : ElectricalStorage(std::move(impl)) {}
447 /// @endcond
448
449 } // namespace model
450 } // namespace openstudio
451