GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 81.4% 281 / 0 / 345
Functions: 84.2% 85 / 0 / 101
Branches: 64.1% 150 / 0 / 234

src/model/BoilerSteam.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 "BoilerSteam.hpp"
7 #include "BoilerSteam_Impl.hpp"
8 #include "Node.hpp"
9 #include "Node_Impl.hpp"
10
11 #include "../utilities/core/Assert.hpp"
12 #include "../utilities/data/DataEnums.hpp"
13
14 #include <utilities/idd/IddFactory.hxx>
15 #include <utilities/idd/OS_Boiler_Steam_FieldEnums.hxx>
16 #include <utilities/idd/IddEnums.hxx>
17
18 namespace openstudio {
19 namespace model {
20
21 namespace detail {
22
23 4 BoilerSteam_Impl::BoilerSteam_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
24 4 : StraightComponent_Impl(idfObject, model, keepHandle) {
25
4/6
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 4 times.
✗ Branch 13 not taken.
4 OS_ASSERT(idfObject.iddObject().type() == BoilerSteam::iddObjectType());
26 4 }
27
28 1 BoilerSteam_Impl::BoilerSteam_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
29 1 : StraightComponent_Impl(other, model, keepHandle) {
30
4/6
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 10 not taken.
✓ Branch 11 taken 1 time.
✗ Branch 13 not taken.
1 OS_ASSERT(other.iddObject().type() == BoilerSteam::iddObjectType());
31 1 }
32
33 2 BoilerSteam_Impl::BoilerSteam_Impl(const BoilerSteam_Impl& other, Model_Impl* model, bool keepHandle)
34 2 : StraightComponent_Impl(other, model, keepHandle) {}
35
36 ✗ const std::vector<std::string>& BoilerSteam_Impl::outputVariableNames() const {
37 static const std::vector<std::string> result{
38 "Boiler Heating Rate", "Boiler Heating Energy", "Boiler Steam Inlet Temperature", "Boiler Steam Outlet Temperature", "Boiler Mass Flow Rate",
39
40 // One of the following blocks will be applicable based on fuel type:
41 // TODO: DLM: the return type of this method needs to change to std::vector<std::string> in ModelObject
42 // until then, make this include all possible outputVariableNames for class regardless of fuelType
43 // std::string fuelType = this->fuelType(,
44 // if (fuelType == "Electricity") {
45 "Boiler Electricity Rate", "Boiler Electricity Energy",
46 // } else if (fuelType == "NaturalGas") {
47 "Boiler NaturalGas Rate", "Boiler NaturalGas Energy",
48 // } else if (fuelType == "Propane") {
49 "Boiler Propane Rate", "Boiler Propane Energy",
50 // } else if (fuelType == "FuelOilNo1") {
51 "Boiler FuelOilNo1 Rate", "Boiler FuelOilNo1 Energy",
52 // } else if (fuelType == "FuelOilNo2") {
53 "Boiler FuelOilNo2 Rate", "Boiler FuelOilNo2 Energy",
54 // } else if (fuelType == "Coal") {
55 "Boiler Coal Rate", "Boiler Coal Energy",
56 // } else if (fuelType == "Diesel") {
57 "Boiler Diesel Rate", "Boiler Diesel Energy",
58 // } else if (fuelType == "Gasoline") {
59 "Boiler Gasoline Rate", "Boiler Gasoline Energy",
60 // } else if (fuelType == "OtherFuel1") {
61 "Boiler OtherFuel1 Rate", "Boiler OtherFuel1 Energy",
62 // } else if (fuelType == "OtherFuel2") {
63 "Boiler OtherFuel2 Rate", "Boiler OtherFuel2 Energy"
64 // }
65
66 ✗ };
67 ✗ return result;
68 ✗ }
69
70 ✗ IddObjectType BoilerSteam_Impl::iddObjectType() const {
71 ✗ return BoilerSteam::iddObjectType();
72 }
73
74 2 std::string BoilerSteam_Impl::fuelType() const {
75
1/1
✓ Branch 1 taken 2 times.
2 boost::optional<std::string> value = getString(OS_Boiler_SteamFields::FuelType, true);
76
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
2 OS_ASSERT(value);
77
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
4 return value.get();
78 2 }
79
80 3 boost::optional<double> BoilerSteam_Impl::maximumOperatingPressure() const {
81 3 return getDouble(OS_Boiler_SteamFields::MaximumOperatingPressure, true);
82 }
83
84 3 boost::optional<double> BoilerSteam_Impl::theoreticalEfficiency() const {
85 3 return getDouble(OS_Boiler_SteamFields::TheoreticalEfficiency, true);
86 }
87
88 3 boost::optional<double> BoilerSteam_Impl::designOutletSteamTemperature() const {
89 3 return getDouble(OS_Boiler_SteamFields::DesignOutletSteamTemperature, true);
90 }
91
92 3 boost::optional<double> BoilerSteam_Impl::nominalCapacity() const {
93 3 return getDouble(OS_Boiler_SteamFields::NominalCapacity, true);
94 }
95
96 ✗ bool BoilerSteam_Impl::isNominalCapacityAutosized() const {
97 ✗ bool result = false;
98 ✗ boost::optional<std::string> value = getString(OS_Boiler_SteamFields::NominalCapacity, true);
99 ✗ if (value) {
100 ✗ result = openstudio::istringEqual(value.get(), "autosize");
101 }
102 ✗ return result;
103 ✗ }
104
105 3 boost::optional<double> BoilerSteam_Impl::minimumPartLoadRatio() const {
106 3 return getDouble(OS_Boiler_SteamFields::MinimumPartLoadRatio, true);
107 }
108
109 3 boost::optional<double> BoilerSteam_Impl::maximumPartLoadRatio() const {
110 3 return getDouble(OS_Boiler_SteamFields::MaximumPartLoadRatio, true);
111 }
112
113 3 boost::optional<double> BoilerSteam_Impl::optimumPartLoadRatio() const {
114 3 return getDouble(OS_Boiler_SteamFields::OptimumPartLoadRatio, true);
115 }
116
117 3 boost::optional<double> BoilerSteam_Impl::coefficient1ofFuelUseFunctionofPartLoadRatioCurve() const {
118 3 return getDouble(OS_Boiler_SteamFields::Coefficient1ofFuelUseFunctionofPartLoadRatioCurve, true);
119 }
120
121 3 boost::optional<double> BoilerSteam_Impl::coefficient2ofFuelUseFunctionofPartLoadRatioCurve() const {
122 3 return getDouble(OS_Boiler_SteamFields::Coefficient2ofFuelUseFunctionofPartLoadRatioCurve, true);
123 }
124
125 3 boost::optional<double> BoilerSteam_Impl::coefficient3ofFuelUseFunctionofPartLoadRatioCurve() const {
126 3 return getDouble(OS_Boiler_SteamFields::Coefficient3ofFuelUseFunctionofPartLoadRatioCurve, true);
127 }
128
129 3 double BoilerSteam_Impl::sizingFactor() const {
130
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<double> value = getDouble(OS_Boiler_SteamFields::SizingFactor, true);
131
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(value);
132
1/1
✓ Branch 1 taken 3 times.
6 return value.get();
133 }
134
135 ✗ bool BoilerSteam_Impl::isSizingFactorDefaulted() const {
136 ✗ return isEmpty(OS_Boiler_SteamFields::SizingFactor);
137 }
138
139 5 bool BoilerSteam_Impl::setFuelType(const std::string& fuelType) {
140 5 bool result = setString(OS_Boiler_SteamFields::FuelType, fuelType);
141 5 return result;
142 }
143
144 4 bool BoilerSteam_Impl::setMaximumOperatingPressure(boost::optional<double> maximumOperatingPressure) {
145 4 bool result(false);
146
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (maximumOperatingPressure) {
147 4 result = setDouble(OS_Boiler_SteamFields::MaximumOperatingPressure, maximumOperatingPressure.get());
148 } else {
149 ✗ resetMaximumOperatingPressure();
150 ✗ result = true;
151 }
152
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
4 OS_ASSERT(result);
153 4 return result;
154 }
155
156 1 void BoilerSteam_Impl::resetMaximumOperatingPressure() {
157
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::MaximumOperatingPressure, "");
158
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
159 1 }
160
161 4 bool BoilerSteam_Impl::setTheoreticalEfficiency(boost::optional<double> theoreticalEfficiency) {
162 4 bool result(false);
163
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (theoreticalEfficiency) {
164 4 result = setDouble(OS_Boiler_SteamFields::TheoreticalEfficiency, theoreticalEfficiency.get());
165 } else {
166 ✗ resetTheoreticalEfficiency();
167 ✗ result = true;
168 }
169 4 return result;
170 }
171
172 1 void BoilerSteam_Impl::resetTheoreticalEfficiency() {
173
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::TheoreticalEfficiency, "");
174
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
175 1 }
176
177 4 bool BoilerSteam_Impl::setDesignOutletSteamTemperature(boost::optional<double> designOutletSteamTemperature) {
178 4 bool result(false);
179
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (designOutletSteamTemperature) {
180 4 result = setDouble(OS_Boiler_SteamFields::DesignOutletSteamTemperature, designOutletSteamTemperature.get());
181 } else {
182 ✗ resetDesignOutletSteamTemperature();
183 ✗ result = true;
184 }
185
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
4 OS_ASSERT(result);
186 4 return result;
187 }
188
189 1 void BoilerSteam_Impl::resetDesignOutletSteamTemperature() {
190
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::DesignOutletSteamTemperature, "");
191
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
192 1 }
193
194 1 bool BoilerSteam_Impl::setNominalCapacity(boost::optional<double> nominalCapacity) {
195 1 bool result(false);
196
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (nominalCapacity) {
197 1 result = setDouble(OS_Boiler_SteamFields::NominalCapacity, nominalCapacity.get());
198 } else {
199 ✗ resetNominalCapacity();
200 ✗ result = true;
201 }
202
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
203 1 return result;
204 }
205
206 1 void BoilerSteam_Impl::resetNominalCapacity() {
207
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::NominalCapacity, "");
208
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
209 1 }
210
211 3 void BoilerSteam_Impl::autosizeNominalCapacity() {
212
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 bool result = setString(OS_Boiler_SteamFields::NominalCapacity, "autosize");
213
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
214 3 }
215
216 4 bool BoilerSteam_Impl::setMinimumPartLoadRatio(boost::optional<double> minimumPartLoadRatio) {
217 4 bool result(false);
218
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (minimumPartLoadRatio) {
219 4 result = setDouble(OS_Boiler_SteamFields::MinimumPartLoadRatio, minimumPartLoadRatio.get());
220 } else {
221 ✗ resetMinimumPartLoadRatio();
222 ✗ result = true;
223 }
224 4 return result;
225 }
226
227 1 void BoilerSteam_Impl::resetMinimumPartLoadRatio() {
228
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::MinimumPartLoadRatio, "");
229
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
230 1 }
231
232 4 bool BoilerSteam_Impl::setMaximumPartLoadRatio(boost::optional<double> maximumPartLoadRatio) {
233 4 bool result(false);
234
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (maximumPartLoadRatio) {
235 4 result = setDouble(OS_Boiler_SteamFields::MaximumPartLoadRatio, maximumPartLoadRatio.get());
236 } else {
237 ✗ resetMaximumPartLoadRatio();
238 ✗ result = true;
239 }
240 4 return result;
241 }
242
243 1 void BoilerSteam_Impl::resetMaximumPartLoadRatio() {
244
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::MaximumPartLoadRatio, "");
245
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
246 1 }
247
248 4 bool BoilerSteam_Impl::setOptimumPartLoadRatio(boost::optional<double> optimumPartLoadRatio) {
249 4 bool result(false);
250
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (optimumPartLoadRatio) {
251 4 result = setDouble(OS_Boiler_SteamFields::OptimumPartLoadRatio, optimumPartLoadRatio.get());
252 } else {
253 ✗ resetOptimumPartLoadRatio();
254 ✗ result = true;
255 }
256 4 return result;
257 }
258
259 1 void BoilerSteam_Impl::resetOptimumPartLoadRatio() {
260
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::OptimumPartLoadRatio, "");
261
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
262 1 }
263
264 4 bool BoilerSteam_Impl::setCoefficient1ofFuelUseFunctionofPartLoadRatioCurve(
265 boost::optional<double> coefficient1ofFuelUseFunctionofPartLoadRatioCurve) {
266 4 bool result(false);
267
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (coefficient1ofFuelUseFunctionofPartLoadRatioCurve) {
268 4 result = setDouble(OS_Boiler_SteamFields::Coefficient1ofFuelUseFunctionofPartLoadRatioCurve,
269 4 coefficient1ofFuelUseFunctionofPartLoadRatioCurve.get());
270 } else {
271 ✗ resetCoefficient1ofFuelUseFunctionofPartLoadRatioCurve();
272 ✗ result = true;
273 }
274
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
4 OS_ASSERT(result);
275 4 return result;
276 }
277
278 1 void BoilerSteam_Impl::resetCoefficient1ofFuelUseFunctionofPartLoadRatioCurve() {
279
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::Coefficient1ofFuelUseFunctionofPartLoadRatioCurve, "");
280
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
281 1 }
282
283 4 bool BoilerSteam_Impl::setCoefficient2ofFuelUseFunctionofPartLoadRatioCurve(
284 boost::optional<double> coefficient2ofFuelUseFunctionofPartLoadRatioCurve) {
285 4 bool result(false);
286
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (coefficient2ofFuelUseFunctionofPartLoadRatioCurve) {
287 4 result = setDouble(OS_Boiler_SteamFields::Coefficient2ofFuelUseFunctionofPartLoadRatioCurve,
288 4 coefficient2ofFuelUseFunctionofPartLoadRatioCurve.get());
289 } else {
290 ✗ resetCoefficient2ofFuelUseFunctionofPartLoadRatioCurve();
291 ✗ result = true;
292 }
293
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
4 OS_ASSERT(result);
294 4 return result;
295 }
296
297 1 void BoilerSteam_Impl::resetCoefficient2ofFuelUseFunctionofPartLoadRatioCurve() {
298
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::Coefficient2ofFuelUseFunctionofPartLoadRatioCurve, "");
299
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
300 1 }
301
302 4 bool BoilerSteam_Impl::setCoefficient3ofFuelUseFunctionofPartLoadRatioCurve(
303 boost::optional<double> coefficient3ofFuelUseFunctionofPartLoadRatioCurve) {
304 4 bool result(false);
305
1/2
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
4 if (coefficient3ofFuelUseFunctionofPartLoadRatioCurve) {
306 4 result = setDouble(OS_Boiler_SteamFields::Coefficient3ofFuelUseFunctionofPartLoadRatioCurve,
307 4 coefficient3ofFuelUseFunctionofPartLoadRatioCurve.get());
308 } else {
309 ✗ resetCoefficient3ofFuelUseFunctionofPartLoadRatioCurve();
310 ✗ result = true;
311 }
312
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
4 OS_ASSERT(result);
313 4 return result;
314 }
315
316 1 void BoilerSteam_Impl::resetCoefficient3ofFuelUseFunctionofPartLoadRatioCurve() {
317
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::Coefficient3ofFuelUseFunctionofPartLoadRatioCurve, "");
318
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
319 1 }
320
321 4 bool BoilerSteam_Impl::setSizingFactor(double sizingFactor) {
322 4 bool result = setDouble(OS_Boiler_SteamFields::SizingFactor, sizingFactor);
323 4 return result;
324 }
325
326 1 void BoilerSteam_Impl::resetSizingFactor() {
327
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Boiler_SteamFields::SizingFactor, "");
328
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
329 1 }
330
331 ✗ std::vector<std::string> BoilerSteam_Impl::fuelTypeValues() const {
332 ✗ return BoilerSteam::fuelTypeValues();
333 }
334
335 3 unsigned BoilerSteam_Impl::inletPort() const {
336 3 return OS_Boiler_SteamFields::WaterInletNodeName;
337 }
338
339 12 unsigned BoilerSteam_Impl::outletPort() const {
340 12 return OS_Boiler_SteamFields::SteamOutletNodeName;
341 }
342
343 5 bool BoilerSteam_Impl::addToNode(Node& node) {
344
3/3
✓ Branch 1 taken 5 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 2 times.
10 if (boost::optional<PlantLoop> plant = node.plantLoop()) {
345
5/5
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
✓ Branch 10 taken 2 times.
✓ Branch 11 taken 1 time.
6 if (plant->supplyComponent(node.handle())) {
346
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
2 if (StraightComponent_Impl::addToNode(node)) {
347
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
4 plant->setFluidType("Steam");
348 2 return true;
349 }
350 }
351 5 }
352
353 3 return false;
354 }
355
356 ✗ boost::optional<double> BoilerSteam_Impl::autosizedNominalCapacity() const {
357 ✗ return getAutosizedValue("Design Size Nominal Capacity", "W");
358 }
359
360 ✗ void BoilerSteam_Impl::autosize() {
361 ✗ autosizeNominalCapacity();
362 ✗ }
363
364 ✗ void BoilerSteam_Impl::applySizingValues() {
365 ✗ boost::optional<double> val;
366 ✗ val = autosizedNominalCapacity();
367 ✗ if (val) {
368 ✗ setNominalCapacity(val.get());
369 }
370 ✗ }
371
372 2 std::string BoilerSteam_Impl::endUseSubcategory() const {
373
1/1
✓ Branch 1 taken 2 times.
2 auto value = getString(OS_Boiler_SteamFields::EndUseSubcategory, true);
374
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
2 OS_ASSERT(value);
375
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
4 return value.get();
376 2 }
377
378 4 bool BoilerSteam_Impl::setEndUseSubcategory(const std::string& endUseSubcategory) {
379 4 return setString(OS_Boiler_SteamFields::EndUseSubcategory, endUseSubcategory);
380 }
381
382 ✗ ComponentType BoilerSteam_Impl::componentType() const {
383 ✗ return ComponentType::Heating;
384 }
385
386 ✗ std::vector<FuelType> BoilerSteam_Impl::coolingFuelTypes() const {
387 ✗ return {};
388 }
389
390 ✗ std::vector<FuelType> BoilerSteam_Impl::heatingFuelTypes() const {
391 ✗ return {FuelType(fuelType())};
392 }
393
394 ✗ std::vector<AppGFuelType> BoilerSteam_Impl::appGHeatingFuelTypes() const {
395 ✗ return {convertFuelTypeToAppG(FuelType(fuelType()))};
396 }
397
398 } // namespace detail
399
400 3 BoilerSteam::BoilerSteam(const Model& model) : StraightComponent(BoilerSteam::iddObjectType(), model) {
401
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 3 times.
✗ Branch 5 not taken.
3 OS_ASSERT(getImpl<detail::BoilerSteam_Impl>());
402
403
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 setFuelType("NaturalGas");
404
1/1
✓ Branch 1 taken 3 times.
3 setMaximumOperatingPressure(160000);
405
1/1
✓ Branch 1 taken 3 times.
3 setTheoreticalEfficiency(0.8);
406
1/1
✓ Branch 1 taken 3 times.
3 setDesignOutletSteamTemperature(115);
407
1/1
✓ Branch 1 taken 3 times.
3 autosizeNominalCapacity();
408
1/1
✓ Branch 1 taken 3 times.
3 setMinimumPartLoadRatio(0.00001);
409
1/1
✓ Branch 1 taken 3 times.
3 setMaximumPartLoadRatio(1.0);
410
1/1
✓ Branch 1 taken 3 times.
3 setOptimumPartLoadRatio(0.2);
411
1/1
✓ Branch 1 taken 3 times.
3 setCoefficient1ofFuelUseFunctionofPartLoadRatioCurve(0.8);
412
1/1
✓ Branch 1 taken 3 times.
3 setCoefficient2ofFuelUseFunctionofPartLoadRatioCurve(0.1);
413
1/1
✓ Branch 1 taken 3 times.
3 setCoefficient3ofFuelUseFunctionofPartLoadRatioCurve(0.1);
414
1/1
✓ Branch 1 taken 3 times.
3 setSizingFactor(1.0);
415
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 setEndUseSubcategory("General");
416 3 }
417
418 7607 IddObjectType BoilerSteam::iddObjectType() {
419
1/1
✓ Branch 1 taken 7607 times.
7607 return {IddObjectType::OS_Boiler_Steam};
420 }
421
422 ✗ std::vector<std::string> BoilerSteam::fuelTypeValues() {
423 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Boiler_SteamFields::FuelType);
424 }
425
426 2 std::string BoilerSteam::fuelType() const {
427
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::BoilerSteam_Impl>()->fuelType();
428 }
429
430 3 boost::optional<double> BoilerSteam::maximumOperatingPressure() const {
431
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->maximumOperatingPressure();
432 }
433
434 3 boost::optional<double> BoilerSteam::theoreticalEfficiency() const {
435
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->theoreticalEfficiency();
436 }
437
438 3 boost::optional<double> BoilerSteam::designOutletSteamTemperature() const {
439
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->designOutletSteamTemperature();
440 }
441
442 3 boost::optional<double> BoilerSteam::nominalCapacity() const {
443
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->nominalCapacity();
444 }
445
446 ✗ bool BoilerSteam::isNominalCapacityAutosized() const {
447 ✗ return getImpl<detail::BoilerSteam_Impl>()->isNominalCapacityAutosized();
448 }
449
450 3 boost::optional<double> BoilerSteam::minimumPartLoadRatio() const {
451
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->minimumPartLoadRatio();
452 }
453
454 3 boost::optional<double> BoilerSteam::maximumPartLoadRatio() const {
455
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->maximumPartLoadRatio();
456 }
457
458 3 boost::optional<double> BoilerSteam::optimumPartLoadRatio() const {
459
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->optimumPartLoadRatio();
460 }
461
462 3 boost::optional<double> BoilerSteam::coefficient1ofFuelUseFunctionofPartLoadRatioCurve() const {
463
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->coefficient1ofFuelUseFunctionofPartLoadRatioCurve();
464 }
465
466 3 boost::optional<double> BoilerSteam::coefficient2ofFuelUseFunctionofPartLoadRatioCurve() const {
467
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->coefficient2ofFuelUseFunctionofPartLoadRatioCurve();
468 }
469
470 3 boost::optional<double> BoilerSteam::coefficient3ofFuelUseFunctionofPartLoadRatioCurve() const {
471
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->coefficient3ofFuelUseFunctionofPartLoadRatioCurve();
472 }
473
474 3 double BoilerSteam::sizingFactor() const {
475
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::BoilerSteam_Impl>()->sizingFactor();
476 }
477
478 ✗ bool BoilerSteam::isSizingFactorDefaulted() const {
479 ✗ return getImpl<detail::BoilerSteam_Impl>()->isSizingFactorDefaulted();
480 }
481
482 5 bool BoilerSteam::setFuelType(const std::string& fuelType) {
483
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::BoilerSteam_Impl>()->setFuelType(fuelType);
484 }
485
486 4 bool BoilerSteam::setMaximumOperatingPressure(double maximumOperatingPressure) {
487
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
4 return getImpl<detail::BoilerSteam_Impl>()->setMaximumOperatingPressure(maximumOperatingPressure);
488 }
489
490 1 void BoilerSteam::resetMaximumOperatingPressure() {
491
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetMaximumOperatingPressure();
492 1 }
493
494 4 bool BoilerSteam::setTheoreticalEfficiency(double theoreticalEfficiency) {
495
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
4 return getImpl<detail::BoilerSteam_Impl>()->setTheoreticalEfficiency(theoreticalEfficiency);
496 }
497
498 1 void BoilerSteam::resetTheoreticalEfficiency() {
499
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetTheoreticalEfficiency();
500 1 }
501
502 4 bool BoilerSteam::setDesignOutletSteamTemperature(double designOutletSteamTemperature) {
503
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
4 return getImpl<detail::BoilerSteam_Impl>()->setDesignOutletSteamTemperature(designOutletSteamTemperature);
504 }
505
506 1 void BoilerSteam::resetDesignOutletSteamTemperature() {
507
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetDesignOutletSteamTemperature();
508 1 }
509
510 1 bool BoilerSteam::setNominalCapacity(double nominalCapacity) {
511
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
1 return getImpl<detail::BoilerSteam_Impl>()->setNominalCapacity(nominalCapacity);
512 }
513
514 1 void BoilerSteam::resetNominalCapacity() {
515
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetNominalCapacity();
516 1 }
517
518 3 void BoilerSteam::autosizeNominalCapacity() {
519
1/1
✓ Branch 3 taken 3 times.
3 getImpl<detail::BoilerSteam_Impl>()->autosizeNominalCapacity();
520 3 }
521
522 4 bool BoilerSteam::setMinimumPartLoadRatio(double minimumPartLoadRatio) {
523
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
4 return getImpl<detail::BoilerSteam_Impl>()->setMinimumPartLoadRatio(minimumPartLoadRatio);
524 }
525
526 1 void BoilerSteam::resetMinimumPartLoadRatio() {
527
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetMinimumPartLoadRatio();
528 1 }
529
530 4 bool BoilerSteam::setMaximumPartLoadRatio(double maximumPartLoadRatio) {
531
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
4 return getImpl<detail::BoilerSteam_Impl>()->setMaximumPartLoadRatio(maximumPartLoadRatio);
532 }
533
534 1 void BoilerSteam::resetMaximumPartLoadRatio() {
535
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetMaximumPartLoadRatio();
536 1 }
537
538 4 bool BoilerSteam::setOptimumPartLoadRatio(double optimumPartLoadRatio) {
539
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
4 return getImpl<detail::BoilerSteam_Impl>()->setOptimumPartLoadRatio(optimumPartLoadRatio);
540 }
541
542 1 void BoilerSteam::resetOptimumPartLoadRatio() {
543
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetOptimumPartLoadRatio();
544 1 }
545
546 4 bool BoilerSteam::setCoefficient1ofFuelUseFunctionofPartLoadRatioCurve(double coefficient1ofFuelUseFunctionofPartLoadRatioCurve) {
547
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
8 return getImpl<detail::BoilerSteam_Impl>()->setCoefficient1ofFuelUseFunctionofPartLoadRatioCurve(
548 8 coefficient1ofFuelUseFunctionofPartLoadRatioCurve);
549 }
550
551 1 void BoilerSteam::resetCoefficient1ofFuelUseFunctionofPartLoadRatioCurve() {
552
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetCoefficient1ofFuelUseFunctionofPartLoadRatioCurve();
553 1 }
554
555 4 bool BoilerSteam::setCoefficient2ofFuelUseFunctionofPartLoadRatioCurve(double coefficient2ofFuelUseFunctionofPartLoadRatioCurve) {
556
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
8 return getImpl<detail::BoilerSteam_Impl>()->setCoefficient2ofFuelUseFunctionofPartLoadRatioCurve(
557 8 coefficient2ofFuelUseFunctionofPartLoadRatioCurve);
558 }
559
560 1 void BoilerSteam::resetCoefficient2ofFuelUseFunctionofPartLoadRatioCurve() {
561
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetCoefficient2ofFuelUseFunctionofPartLoadRatioCurve();
562 1 }
563
564 4 bool BoilerSteam::setCoefficient3ofFuelUseFunctionofPartLoadRatioCurve(double coefficient3ofFuelUseFunctionofPartLoadRatioCurve) {
565
2/2
✓ Branch 3 taken 4 times.
✓ Branch 6 taken 4 times.
8 return getImpl<detail::BoilerSteam_Impl>()->setCoefficient3ofFuelUseFunctionofPartLoadRatioCurve(
566 8 coefficient3ofFuelUseFunctionofPartLoadRatioCurve);
567 }
568
569 1 void BoilerSteam::resetCoefficient3ofFuelUseFunctionofPartLoadRatioCurve() {
570
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetCoefficient3ofFuelUseFunctionofPartLoadRatioCurve();
571 1 }
572
573 4 bool BoilerSteam::setSizingFactor(double sizingFactor) {
574
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::BoilerSteam_Impl>()->setSizingFactor(sizingFactor);
575 }
576
577 1 void BoilerSteam::resetSizingFactor() {
578
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::BoilerSteam_Impl>()->resetSizingFactor();
579 1 }
580
581 2 std::string BoilerSteam::endUseSubcategory() const {
582
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::BoilerSteam_Impl>()->endUseSubcategory();
583 }
584
585 4 bool BoilerSteam::setEndUseSubcategory(const std::string& endUseSubcategory) {
586
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::BoilerSteam_Impl>()->setEndUseSubcategory(endUseSubcategory);
587 }
588
589 /// @cond
590
1/1
✓ Branch 3 taken 1 time.
1 BoilerSteam::BoilerSteam(std::shared_ptr<detail::BoilerSteam_Impl> impl) : StraightComponent(std::move(impl)) {}
591 /// @endcond
592
593 ✗ boost::optional<double> BoilerSteam::autosizedNominalCapacity() const {
594 ✗ return getImpl<detail::BoilerSteam_Impl>()->autosizedNominalCapacity();
595 }
596
597 } // namespace model
598 } // namespace openstudio
599