GCC Code Coverage Report


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

src/model/ElectricLoadCenterStorageSimple.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_ELECTRICLOADCENTERSTORAGESIMPLE_HPP
7 #define MODEL_ELECTRICLOADCENTERSTORAGESIMPLE_HPP
8
9 #include "ModelAPI.hpp"
10 #include "ElectricalStorage.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class Schedule;
17 class ThermalZone;
18
19 namespace detail {
20
21 class ElectricLoadCenterStorageSimple_Impl;
22
23 } // namespace detail
24
25 /** ElectricLoadCenterStorageSimple is a ElectricalStorage that wraps the OpenStudio IDD object 'OS:ElectricLoadCenter:Storage:Simple'. */
26 class MODEL_API ElectricLoadCenterStorageSimple : public ElectricalStorage
27 {
28 public:
29 /** @name Constructors and Destructors */
30 //@{
31
32 explicit ElectricLoadCenterStorageSimple(const Model& model);
33
34 2 virtual ~ElectricLoadCenterStorageSimple() override = default;
35 // Default the copy and move operators because the virtual dtor is explicit
36 ✗ ElectricLoadCenterStorageSimple(const ElectricLoadCenterStorageSimple& other) = default;
37 ✗ ElectricLoadCenterStorageSimple(ElectricLoadCenterStorageSimple&& other) = default;
38 ✗ ElectricLoadCenterStorageSimple& operator=(const ElectricLoadCenterStorageSimple&) = default;
39 ✗ ElectricLoadCenterStorageSimple& operator=(ElectricLoadCenterStorageSimple&&) = default;
40
41 //@}
42
43 static IddObjectType iddObjectType();
44
45 /** @name Getters */
46 //@{
47
48 // Convenience method to return the electricalLoadCenter on which it's assigned (optional)
49 // In parent
50 // boost::optional<ElectricLoadCenterDistribution> electricLoadCenterDistribution() const;
51
52 Schedule availabilitySchedule() const;
53 bool isAvailabilityScheduleDefaulted() const;
54
55 // TODO: Included in parent class, shouldn't need to define it here...
56 //virtual boost::optional<ThermalZone> thermalZone() const override;
57
58 double radiativeFractionforZoneHeatGains() const;
59 bool isRadiativeFractionforZoneHeatGainsDefaulted() const;
60
61 double nominalEnergeticEfficiencyforCharging() const;
62 bool isNominalEnergeticEfficiencyforChargingDefaulted() const;
63
64 double nominalDischargingEnergeticEfficiency() const;
65 bool isNominalDischargingEnergeticEfficiencyDefaulted() const;
66
67 double maximumStorageCapacity() const;
68
69 double maximumPowerforDischarging() const;
70
71 double maximumPowerforCharging() const;
72
73 double initialStateofCharge() const;
74 bool isInitialStateofChargeDefaulted() const;
75
76 //@}
77 /** @name Setters */
78 //@{
79
80 bool setAvailabilitySchedule(Schedule& schedule);
81 void resetAvailabilitySchedule();
82
83 // TODO: Included in parent class, shouldn't need to define it...
84 //virtual bool setThermalZone(ThermalZone& zone) override;
85 //virtual void resetThermalZone() override;
86
87 bool setRadiativeFractionforZoneHeatGains(double radiativeFractionforZoneHeatGains);
88 void resetRadiativeFractionforZoneHeatGains();
89
90 bool setNominalEnergeticEfficiencyforCharging(double nominalEnergeticEfficiencyforCharging);
91 void resetNominalEnergeticEfficiencyforCharging();
92
93 // TODO: I've requested an .IDD change in EnergyPlus, to make this "Nominal Energetic Efficiency for Discharging"
94 // TODO: https://github.com/NREL/EnergyPlus/issues/5730
95 bool setNominalDischargingEnergeticEfficiency(double nominalDischargingEnergeticEfficiency);
96 void resetNominalDischargingEnergeticEfficiency();
97
98 bool setMaximumStorageCapacity(double maximumStorageCapacity);
99
100 bool setMaximumPowerforDischarging(double maximumPowerforDischarging);
101
102 bool setMaximumPowerforCharging(double maximumPowerforCharging);
103
104 bool setInitialStateofCharge(double initialStateofCharge);
105 void resetInitialStateofCharge();
106
107 //@}
108 /** @name Other */
109 //@{
110
111 //@}
112 protected:
113 /// @cond
114 using ImplType = detail::ElectricLoadCenterStorageSimple_Impl;
115
116 explicit ElectricLoadCenterStorageSimple(std::shared_ptr<detail::ElectricLoadCenterStorageSimple_Impl> impl);
117
118 friend class detail::ElectricLoadCenterStorageSimple_Impl;
119 friend class Model;
120 friend class IdfObject;
121 friend class openstudio::detail::IdfObject_Impl;
122 /// @endcond
123 private:
124 REGISTER_LOGGER("openstudio.model.ElectricLoadCenterStorageSimple");
125 };
126
127 /** \relates ElectricLoadCenterStorageSimple*/
128 using OptionalElectricLoadCenterStorageSimple = boost::optional<ElectricLoadCenterStorageSimple>;
129
130 /** \relates ElectricLoadCenterStorageSimple*/
131 using ElectricLoadCenterStorageSimpleVector = std::vector<ElectricLoadCenterStorageSimple>;
132
133 } // namespace model
134 } // namespace openstudio
135
136 #endif // MODEL_ELECTRICLOADCENTERSTORAGESIMPLE_HPP
137