GCC Code Coverage Report


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

src/model/CoilHeatingDXMultiSpeed.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_COILHEATINGDXMULTISPEED_HPP
7 #define MODEL_COILHEATINGDXMULTISPEED_HPP
8
9 #include "ModelAPI.hpp"
10 #include "StraightComponent.hpp"
11
12 namespace openstudio {
13
14 namespace model {
15
16 class AirflowNetworkEquivalentDuct;
17 class CoilHeatingDXMultiSpeedStageData;
18 class Curve;
19 class Schedule;
20
21 namespace detail {
22
23 class CoilHeatingDXMultiSpeed_Impl;
24
25 } // namespace detail
26
27 /** CoilHeatingDXMultiSpeed is a StraightComponent that wraps the OpenStudio IDD object 'OS:Coil:Heating:DX:MultiSpeed'. */
28 class MODEL_API CoilHeatingDXMultiSpeed : public StraightComponent
29 {
30 public:
31 /** @name Constructors and Destructors */
32 //@{
33
34 explicit CoilHeatingDXMultiSpeed(const Model& model);
35
36 52 virtual ~CoilHeatingDXMultiSpeed() override = default;
37 // Default the copy and move operators because the virtual dtor is explicit
38 4 CoilHeatingDXMultiSpeed(const CoilHeatingDXMultiSpeed& other) = default;
39 10 CoilHeatingDXMultiSpeed(CoilHeatingDXMultiSpeed&& other) = default;
40 ✗ CoilHeatingDXMultiSpeed& operator=(const CoilHeatingDXMultiSpeed&) = default;
41 ✗ CoilHeatingDXMultiSpeed& operator=(CoilHeatingDXMultiSpeed&&) = default;
42
43 //@}
44
45 static IddObjectType iddObjectType();
46
47 static std::vector<std::string> defrostStrategyValues();
48
49 static std::vector<std::string> defrostControlValues();
50
51 static std::vector<std::string> fuelTypeValues();
52
53 /** @name Getters */
54 //@{
55
56 boost::optional<Schedule> availabilitySchedule() const;
57
58 double minimumOutdoorDryBulbTemperatureforCompressorOperation() const;
59
60 boost::optional<double> outdoorDryBulbTemperaturetoTurnOnCompressor() const;
61
62 double crankcaseHeaterCapacity() const;
63
64 boost::optional<Curve> crankcaseHeaterCapacityFunctionofTemperatureCurve() const;
65
66 double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const;
67
68 boost::optional<Curve> defrostEnergyInputRatioFunctionofTemperatureCurve() const;
69
70 double maximumOutdoorDryBulbTemperatureforDefrostOperation() const;
71
72 std::string defrostStrategy() const;
73
74 std::string defrostControl() const;
75
76 double defrostTimePeriodFraction() const;
77
78 boost::optional<double> resistiveDefrostHeaterCapacity() const;
79
80 bool isResistiveDefrostHeaterCapacityAutosized() const;
81
82 bool applyPartLoadFractiontoSpeedsGreaterthan1() const;
83
84 std::string fuelType() const;
85
86 int regionnumberforCalculatingHSPF() const;
87
88 //@}
89 /** @name Setters */
90 //@{
91
92 bool setAvailabilitySchedule(Schedule& schedule);
93
94 void resetAvailabilitySchedule();
95
96 bool setMinimumOutdoorDryBulbTemperatureforCompressorOperation(double minimumOutdoorDryBulbTemperatureforCompressorOperation);
97
98 bool setOutdoorDryBulbTemperaturetoTurnOnCompressor(double outdoorDryBulbTemperaturetoTurnOnCompressor);
99
100 void resetOutdoorDryBulbTemperaturetoTurnOnCompressor();
101
102 bool setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity);
103
104 bool setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve);
105 void resetCrankcaseHeaterCapacityFunctionofTemperatureCurve();
106
107 bool setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation);
108
109 bool setDefrostEnergyInputRatioFunctionofTemperatureCurve(const Curve& curve);
110
111 void resetDefrostEnergyInputRatioFunctionofTemperatureCurve();
112
113 bool setMaximumOutdoorDryBulbTemperatureforDefrostOperation(double maximumOutdoorDryBulbTemperatureforDefrostOperation);
114
115 bool setDefrostStrategy(const std::string& defrostStrategy);
116
117 bool setDefrostControl(const std::string& defrostControl);
118
119 bool setDefrostTimePeriodFraction(double defrostTimePeriodFraction);
120
121 bool setResistiveDefrostHeaterCapacity(double resistiveDefrostHeaterCapacity);
122
123 void autosizeResistiveDefrostHeaterCapacity();
124
125 bool setApplyPartLoadFractiontoSpeedsGreaterthan1(bool applyPartLoadFractiontoSpeedsGreaterthan1);
126
127 bool setFuelType(const std::string& fuelType);
128
129 bool setRegionnumberforCalculatingHSPF(int regionnumberforCalculatingHSPF);
130
131 //@}
132 /** @name Other */
133 //@{
134
135 /** Return the performance data for each stage. **/
136 std::vector<CoilHeatingDXMultiSpeedStageData> stages() const;
137
138 unsigned numberOfStages() const;
139
140 /*
141 * Get the index of a given CoilHeatingDXMultiSpeedStageData (1-indexed)
142 */
143 boost::optional<unsigned> stageIndex(const CoilHeatingDXMultiSpeedStageData& stage) const;
144
145 /*
146 * Add a new stage after all of the existing stages.
147 */
148 bool addStage(const CoilHeatingDXMultiSpeedStageData& stage);
149
150 /*
151 * Add a new CoilHeatingDXMultiSpeedStageData to the list which a given index (1 to x).
152 * Internally calls addStage then setStageIndex, see remarks there
153 */
154 bool addStage(const CoilHeatingDXMultiSpeedStageData& stage, unsigned index);
155
156 /*
157 * You can shuffle the priority of a given CoilHeatingDXMultiSpeedStageData after having added it
158 * If index is below 1, it's reset to 1.
159 * If index is greater than the number of stages, will reset to last
160 */
161 bool setStageIndex(const CoilHeatingDXMultiSpeedStageData& stage, unsigned index);
162
163 /*
164 * Set all stages using a list of CoilHeatingDXMultiSpeedStageDatas
165 * Internally calls addStage, and will return the global status, but will continue trying if there are problems
166 * (eg: if you make a vector larger than the number of accepted stages, or a vector that has a stage from another model, the valid stages will be
167 * added indeed, but it'll eventually return false)
168 */
169 bool setStages(const std::vector<CoilHeatingDXMultiSpeedStageData>& stages);
170
171 /*
172 * Removes all CoilHeatingDXMultiSpeedStageDatas in this object
173 */
174 void removeAllStages();
175
176 /*
177 * Remove the given CoilHeatingDXMultiSpeedStageData from this object's stages
178 */
179 bool removeStage(const CoilHeatingDXMultiSpeedStageData& stage);
180
181 /*
182 * Remove the CoilHeatingDXMultiSpeedStageData at the given index (1-indexed)
183 */
184 bool removeStage(unsigned index);
185
186 /** Creates a new equivalent duct object if an object is not already attached. */
187 AirflowNetworkEquivalentDuct getAirflowNetworkEquivalentDuct(double length, double diameter);
188
189 /** Returns the attached equivalent duct object, if any. */
190 boost::optional<AirflowNetworkEquivalentDuct> airflowNetworkEquivalentDuct() const;
191
192 boost::optional<double> autosizedResistiveDefrostHeaterCapacity() const;
193
194 //@}
195 protected:
196 /// @cond
197 using ImplType = detail::CoilHeatingDXMultiSpeed_Impl;
198
199 explicit CoilHeatingDXMultiSpeed(std::shared_ptr<detail::CoilHeatingDXMultiSpeed_Impl> impl);
200
201 friend class detail::CoilHeatingDXMultiSpeed_Impl;
202 friend class Model;
203 friend class IdfObject;
204 friend class openstudio::detail::IdfObject_Impl;
205 /// @endcond
206 private:
207 REGISTER_LOGGER("openstudio.model.CoilHeatingDXMultiSpeed");
208 };
209
210 /** \relates CoilHeatingDXMultiSpeed*/
211 using OptionalCoilHeatingDXMultiSpeed = boost::optional<CoilHeatingDXMultiSpeed>;
212
213 /** \relates CoilHeatingDXMultiSpeed*/
214 using CoilHeatingDXMultiSpeedVector = std::vector<CoilHeatingDXMultiSpeed>;
215
216 } // namespace model
217 } // namespace openstudio
218
219 #endif // MODEL_COILHEATINGDXMULTISPEED_HPP
220