GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 80.6% 445 / 0 / 552
Functions: 84.8% 145 / 0 / 171
Branches: 62.7% 276 / 0 / 440

src/model/GeneratorMicroTurbine.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 "GeneratorMicroTurbine.hpp"
7 #include "GeneratorMicroTurbine_Impl.hpp"
8 #include "GeneratorMicroTurbineHeatRecovery.hpp"
9 #include "GeneratorMicroTurbineHeatRecovery_Impl.hpp"
10
11 // Need model to check if curve is part of model when setting
12 #include "Model.hpp"
13 #include "Model_Impl.hpp"
14
15 #include "Curve.hpp"
16 #include "Curve_Impl.hpp"
17 #include "CurveBiquadratic.hpp"
18 #include "CurveBiquadratic_Impl.hpp"
19 #include "CurveCubic.hpp"
20 #include "CurveCubic_Impl.hpp"
21 #include "CurveQuadratic.hpp"
22 #include "CurveQuadratic_Impl.hpp"
23
24 #include "StraightComponent.hpp"
25 #include "StraightComponent_Impl.hpp"
26
27 #include "Schedule.hpp"
28 #include "Schedule_Impl.hpp"
29 #include "ScheduleTypeLimits.hpp"
30 #include "ScheduleTypeRegistry.hpp"
31
32 // TODO: Add DataTables if added later to OS?
33 //#include "DataTables.hpp" // UniVariateTables and BiVariateTables
34 //#include "DataTables.hpp"
35
36 #include <utilities/idd/IddFactory.hxx>
37 #include <utilities/idd/IddEnums.hxx>
38 #include <utilities/idd/OS_Generator_MicroTurbine_FieldEnums.hxx>
39 #include <utilities/idd/OS_Generator_MicroTurbine_HeatRecovery_FieldEnums.hxx>
40
41 #include "../utilities/units/Unit.hpp"
42
43 #include "../utilities/core/Assert.hpp"
44
45 namespace openstudio {
46 namespace model {
47
48 namespace detail {
49
50 11 GeneratorMicroTurbine_Impl::GeneratorMicroTurbine_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
51 11 : Generator_Impl(idfObject, model, keepHandle) {
52
4/6
✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
✓ Branch 7 taken 11 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 11 times.
✗ Branch 13 not taken.
11 OS_ASSERT(idfObject.iddObject().type() == GeneratorMicroTurbine::iddObjectType());
53 11 }
54
55 1 GeneratorMicroTurbine_Impl::GeneratorMicroTurbine_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
56 1 : Generator_Impl(other, model, keepHandle) {
57
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() == GeneratorMicroTurbine::iddObjectType());
58 1 }
59
60 10 GeneratorMicroTurbine_Impl::GeneratorMicroTurbine_Impl(const GeneratorMicroTurbine_Impl& other, Model_Impl* model, bool keepHandle)
61 10 : Generator_Impl(other, model, keepHandle) {}
62
63 // Lists the output variables of a Generator:MicroTurbine, excepts the Heat Recovery specific ones
64 // (see GeneratorMicroTurbineHeatRecovery::outputVariableNames for these)
65 ✗ const std::vector<std::string>& GeneratorMicroTurbine_Impl::outputVariableNames() const {
66 static const std::vector<std::string> result{
67 "Generator Produced AC Electricity Rate", "Generator Produced AC Electricity Energy", "Generator LHV Basis Electric Efficiency",
68 // <FuelType>
69 "Generator NaturalGas HHV Basis Rate", "Generator NaturalGas HHV Basis Energy", "Generator NaturalGas Mass Flow Rate",
70
71 "Generator Propane HHV Basis Rate", "Generator Propane HHV Basis Energy", "Generator Propane Mass Flow Rate",
72 // </FuelType>
73 "Generator Fuel HHV Basis Rate", "Generator Fuel HHV Basis Energy",
74
75 // These are part of Generator:MicroTurbine:HeatRecovery
76 // "Generator Produced Thermal Rate",
77 // "Generator Produced Thermal Energy",
78 // "Generator Thermal Efficiency LHV Basis",
79 // "Generator Heat Recovery Inlet Temperature",
80 // "Generator Heat Recovery Outlet Temperature",
81 // "Generator Heat Recovery Water Mass Flow Rate",
82 "Generator Standby Electricity Rate", "Generator Standby Electric Energy", "Generator Ancillary Electricity Rate",
83 ✗ "Generator Ancillary Electricity Energy", "Generator Exhaust Air Mass Flow Rate", "Generator Exhaust Air Temperature"};
84 ✗ return result;
85 ✗ }
86
87 ✗ IddObjectType GeneratorMicroTurbine_Impl::iddObjectType() const {
88 ✗ return GeneratorMicroTurbine::iddObjectType();
89 }
90
91 1 std::string GeneratorMicroTurbine_Impl::generatorObjectType() const {
92 // translated to ElectricLoadCenter:Generators 'Generator Object Type'
93
1/1
✓ Branch 1 taken 1 time.
2 return "Generator:MicroTurbine";
94 }
95
96 // This will clone the GeneratorMicroTurbine as well as the GeneratorMicroTurbineHeatRecovery if there is one
97 // and will return a reference to the GeneratorMicroTurbine
98 4 ModelObject GeneratorMicroTurbine_Impl::clone(Model model) const {
99
3/3
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
4 auto newCHP = ModelObject_Impl::clone(model).cast<GeneratorMicroTurbine>();
100
101 // If there's a GeneratorMicroTurbineHeatRecovery, clone it as well
102
3/3
✓ Branch 1 taken 4 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 1 time.
8 if (boost::optional<GeneratorMicroTurbineHeatRecovery> mchpHR = generatorMicroTurbineHeatRecovery()) {
103 // Call the BaseClass (ModelObject) clone method to avoid circular references
104 auto mchpHRClone =
105
4/4
✓ Branch 1 taken 3 times.
✓ Branch 6 taken 3 times.
✓ Branch 9 taken 3 times.
✓ Branch 12 taken 3 times.
3 mchpHR->getImpl<detail::GeneratorMicroTurbineHeatRecovery_Impl>()->ModelObject_Impl::clone(model).cast<GeneratorMicroTurbineHeatRecovery>();
106
1/1
✓ Branch 3 taken 3 times.
3 newCHP.getImpl<detail::GeneratorMicroTurbine_Impl>()->setGeneratorMicroTurbineHeatRecovery(mchpHRClone);
107 7 }
108
109 8 return std::move(newCHP);
110 4 }
111
112 ✗ std::vector<IdfObject> GeneratorMicroTurbine_Impl::remove() {
113 ✗ std::vector<IdfObject> result;
114
115 ✗ if (boost::optional<GeneratorMicroTurbineHeatRecovery> mchpHR = generatorMicroTurbineHeatRecovery()) {
116 ✗ std::vector<IdfObject> objs = mchpHR->remove();
117 ✗ result.insert(result.end(), objs.begin(), objs.end());
118 ✗ }
119
120 ✗ std::vector<IdfObject> objs = Generator_Impl::remove();
121 ✗ result.insert(result.end(), objs.begin(), objs.end());
122
123 ✗ return result;
124 ✗ }
125
126 // Return allowable child types: Generator:MicroTurbine
127 ✗ std::vector<IddObjectType> GeneratorMicroTurbine_Impl::allowableChildTypes() const {
128 ✗ std::vector<IddObjectType> result;
129 ✗ result.push_back(IddObjectType::OS_Generator_MicroTurbine_HeatRecovery);
130 // Curves are now resources object, no need
131 /*
132 *result.push_back(IddObjectType::OS_Curve_Biquadratic);
133 *result.push_back(IddObjectType::OS_Curve_Cubic);
134 *result.push_back(IddObjectType::OS_Curve_Quadratic);
135 */
136 ✗ return result;
137 ✗ }
138
139 // Returns the children object: GeneratorMicroTurbineHeatRecovery if it exists
140 2 std::vector<ModelObject> GeneratorMicroTurbine_Impl::children() const {
141 2 std::vector<ModelObject> result;
142 2 boost::optional<Curve> oCurve;
143
144
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
4 if (boost::optional<GeneratorMicroTurbineHeatRecovery> mo = generatorMicroTurbineHeatRecovery()) {
145
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 result.push_back(mo.get());
146 2 }
147
148 // Curves are now resources object, no need
149
150 /*
151 *Curve curve = electricalPowerFunctionofTemperatureandElevationCurve();
152 *result.push_back(curve);
153 *
154 *curve = electricalEfficiencyFunctionofTemperatureCurve();
155 *result.push_back(curve);
156 *
157 *curve = electricalEfficiencyFunctionofPartLoadRatioCurve();
158 *result.push_back(curve);
159 *
160 *if ( (oCurve = exhaustAirFlowRateFunctionofTemperatureCurve()) ) {
161 * result.push_back(oCurve.get());
162 *}
163 *if ( (oCurve = exhaustAirFlowRateFunctionofPartLoadRatioCurve()) ) {
164 * result.push_back(oCurve.get());
165 *}
166 *
167 *if ( (oCurve = exhaustAirTemperatureFunctionofTemperatureCurve()) ) {
168 * result.push_back(oCurve.get());
169 *}
170 *if ( (oCurve = exhaustAirTemperatureFunctionofPartLoadRatioCurve() )) {
171 * result.push_back(oCurve.get());
172 *}
173 */
174
175 4 return result;
176 2 }
177
178 ✗ std::vector<ScheduleTypeKey> GeneratorMicroTurbine_Impl::getScheduleTypeKeys(const Schedule& schedule) const {
179 // TODO: Check schedule display names.
180 ✗ std::vector<ScheduleTypeKey> result;
181 ✗ UnsignedVector fieldIndices = getSourceIndices(schedule.handle());
182 ✗ UnsignedVector::const_iterator b(fieldIndices.begin());
183 ✗ UnsignedVector::const_iterator e(fieldIndices.end());
184 ✗ if (std::find(b, e, OS_Generator_MicroTurbineFields::AvailabilityScheduleName) != e) {
185 ✗ result.push_back(ScheduleTypeKey("GeneratorMicroTurbine", "Availability"));
186 }
187 ✗ return result;
188 ✗ }
189
190 // translated to ElectricLoadCenter:Generators 'Generator Rated Electric Power Output'
191 1 boost::optional<double> GeneratorMicroTurbine_Impl::ratedElectricPowerOutput() const {
192
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 return referenceElectricalPowerOutput();
193 }
194
195 4 boost::optional<Schedule> GeneratorMicroTurbine_Impl::availabilitySchedule() const {
196
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Generator_MicroTurbineFields::AvailabilityScheduleName);
197 }
198
199 // Convenience method to go fetch the connected GeneratorMicroTurbineHeatRecovery's 'Rated Thermal to Electrical Power Ratio'
200 2 boost::optional<double> GeneratorMicroTurbine_Impl::ratedThermaltoElectricalPowerRatio() const {
201 // translated to ElectricLoadCenter:Generators 'Generator Rated Thermal to Electrical Power Ratio'
202 //DLM: need to look into meaning of this field, is this heat recovery size divided by electrical power?
203 // TODO: Use the GeneratorMicroTurbineHeatRecovery method
204
1/1
✓ Branch 1 taken 2 times.
2 boost::optional<GeneratorMicroTurbineHeatRecovery> mchpHR = this->generatorMicroTurbineHeatRecovery();
205 2 boost::optional<double> value;
206
207
1/2
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
2 if (mchpHR) {
208
3/3
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
2 value = mchpHR->ratedThermaltoElectricalPowerRatio();
209 }
210 2 return value;
211 2 }
212
213 6 double GeneratorMicroTurbine_Impl::referenceElectricalPowerOutput() const {
214
1/1
✓ Branch 1 taken 6 times.
6 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::ReferenceElectricalPowerOutput, true);
215
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
✗ Branch 4 not taken.
6 OS_ASSERT(value);
216
1/1
✓ Branch 1 taken 6 times.
12 return value.get();
217 }
218
219 4 double GeneratorMicroTurbine_Impl::minimumFullLoadElectricalPowerOutput() const {
220
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::MinimumFullLoadElectricalPowerOutput, true);
221
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
222
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
223 }
224
225 3 bool GeneratorMicroTurbine_Impl::isMinimumFullLoadElectricalPowerOutputDefaulted() const {
226 3 return isEmpty(OS_Generator_MicroTurbineFields::MinimumFullLoadElectricalPowerOutput);
227 }
228
229 // If defaulted, return referenceElectricalPowerOutput
230 4 double GeneratorMicroTurbine_Impl::maximumFullLoadElectricalPowerOutput() const {
231 // TODO: Check if that's the typical way of doing this... Might has well write code that looks the same as usual. @danmacumber?
232 boost::optional<double> maximumFullLoadElectricalPowerOutput =
233
1/1
✓ Branch 1 taken 4 times.
4 getDouble(OS_Generator_MicroTurbineFields::MaximumFullLoadElectricalPowerOutput, true);
234 // If there is a Heat Recovery Object
235
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 3 times.
4 if (maximumFullLoadElectricalPowerOutput) {
236 // Get it and return
237
1/1
✓ Branch 1 taken 1 time.
1 return maximumFullLoadElectricalPowerOutput.get();
238 } else {
239
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<double> referenceElectricalPowerOutput = getDouble(OS_Generator_MicroTurbineFields::ReferenceElectricalPowerOutput, true);
240
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(referenceElectricalPowerOutput);
241
1/1
✓ Branch 1 taken 3 times.
3 return referenceElectricalPowerOutput.get();
242 }
243 }
244
245 3 bool GeneratorMicroTurbine_Impl::isMaximumFullLoadElectricalPowerOutputDefaulted() const {
246 3 return isEmpty(OS_Generator_MicroTurbineFields::MaximumFullLoadElectricalPowerOutput);
247 }
248
249 5 double GeneratorMicroTurbine_Impl::referenceElectricalEfficiencyUsingLowerHeatingValue() const {
250
1/1
✓ Branch 1 taken 5 times.
5 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::ReferenceElectricalEfficiencyUsingLowerHeatingValue, true);
251
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 4 not taken.
5 OS_ASSERT(value);
252
1/1
✓ Branch 1 taken 5 times.
10 return value.get();
253 }
254
255 4 double GeneratorMicroTurbine_Impl::referenceCombustionAirInletTemperature() const {
256
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::ReferenceCombustionAirInletTemperature, true);
257
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
258
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
259 }
260
261 3 bool GeneratorMicroTurbine_Impl::isReferenceCombustionAirInletTemperatureDefaulted() const {
262 3 return isEmpty(OS_Generator_MicroTurbineFields::ReferenceCombustionAirInletTemperature);
263 }
264
265 4 double GeneratorMicroTurbine_Impl::referenceCombustionAirInletHumidityRatio() const {
266
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::ReferenceCombustionAirInletHumidityRatio, true);
267
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
268
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
269 }
270
271 3 bool GeneratorMicroTurbine_Impl::isReferenceCombustionAirInletHumidityRatioDefaulted() const {
272 3 return isEmpty(OS_Generator_MicroTurbineFields::ReferenceCombustionAirInletHumidityRatio);
273 }
274
275 4 double GeneratorMicroTurbine_Impl::referenceElevation() const {
276
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::ReferenceElevation, true);
277
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
278
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
279 }
280
281 3 bool GeneratorMicroTurbine_Impl::isReferenceElevationDefaulted() const {
282 3 return isEmpty(OS_Generator_MicroTurbineFields::ReferenceElevation);
283 }
284
285 7 Curve GeneratorMicroTurbine_Impl::electricalPowerFunctionofTemperatureandElevationCurve() const {
286
1/1
✓ Branch 1 taken 7 times.
14 boost::optional<Curve> curve = getObject<ModelObject>().getModelObjectTarget<Curve>(
287
1/1
✓ Branch 1 taken 7 times.
7 OS_Generator_MicroTurbineFields::ElectricalPowerFunctionofTemperatureandElevationCurveName);
288
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 4 not taken.
7 OS_ASSERT(curve);
289
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 return curve.get();
290 7 }
291
292 7 Curve GeneratorMicroTurbine_Impl::electricalEfficiencyFunctionofTemperatureCurve() const {
293 boost::optional<Curve> curve =
294
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Generator_MicroTurbineFields::ElectricalEfficiencyFunctionofTemperatureCurveName);
295
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 4 not taken.
7 OS_ASSERT(curve);
296
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 return curve.get();
297 7 }
298
299 7 Curve GeneratorMicroTurbine_Impl::electricalEfficiencyFunctionofPartLoadRatioCurve() const {
300 boost::optional<Curve> curve =
301
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
7 getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Generator_MicroTurbineFields::ElectricalEfficiencyFunctionofPartLoadRatioCurveName);
302
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 4 not taken.
7 OS_ASSERT(curve);
303
2/2
✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
14 return curve.get();
304 7 }
305 /* Curve GeneratorMicroTurbine_Impl::electricalEfficiencyFunctionofPartLoadRatioCurve() const {
306 boost::optional<Curve> value = optionalElectricalEfficiencyFunctionofPartLoadRatioCurve();
307 if (!value) {
308 LOG_AND_THROW(briefDescription() << " does not have an Electrical Efficiency Function of Part Load Ratio Curve attached.");
309 }
310 return value.get();
311 }*/
312
313 4 std::string GeneratorMicroTurbine_Impl::fuelType() const {
314
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<std::string> value = getString(OS_Generator_MicroTurbineFields::FuelType, true);
315
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
316
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
8 return value.get();
317 4 }
318
319 3 bool GeneratorMicroTurbine_Impl::isFuelTypeDefaulted() const {
320 3 return isEmpty(OS_Generator_MicroTurbineFields::FuelType);
321 }
322
323 4 double GeneratorMicroTurbine_Impl::fuelHigherHeatingValue() const {
324
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::FuelHigherHeatingValue, true);
325
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
326
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
327 }
328
329 3 bool GeneratorMicroTurbine_Impl::isFuelHigherHeatingValueDefaulted() const {
330 3 return isEmpty(OS_Generator_MicroTurbineFields::FuelHigherHeatingValue);
331 }
332
333 4 double GeneratorMicroTurbine_Impl::fuelLowerHeatingValue() const {
334
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::FuelLowerHeatingValue, true);
335
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
336
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
337 }
338
339 3 bool GeneratorMicroTurbine_Impl::isFuelLowerHeatingValueDefaulted() const {
340 3 return isEmpty(OS_Generator_MicroTurbineFields::FuelLowerHeatingValue);
341 }
342
343 4 double GeneratorMicroTurbine_Impl::standbyPower() const {
344
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::StandbyPower, true);
345
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
346
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
347 }
348
349 3 bool GeneratorMicroTurbine_Impl::isStandbyPowerDefaulted() const {
350 3 return isEmpty(OS_Generator_MicroTurbineFields::StandbyPower);
351 }
352
353 4 double GeneratorMicroTurbine_Impl::ancillaryPower() const {
354
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_Generator_MicroTurbineFields::AncillaryPower, true);
355
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
356
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
357 }
358
359 3 bool GeneratorMicroTurbine_Impl::isAncillaryPowerDefaulted() const {
360 3 return isEmpty(OS_Generator_MicroTurbineFields::AncillaryPower);
361 }
362
363 5 boost::optional<Curve> GeneratorMicroTurbine_Impl::ancillaryPowerFunctionofFuelInputCurve() const {
364
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
5 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Generator_MicroTurbineFields::AncillaryPowerFunctionofFuelInputCurveName);
365 }
366
367 // Optional Generator:MicroTurbine:HeatRecovery
368 27 boost::optional<GeneratorMicroTurbineHeatRecovery> GeneratorMicroTurbine_Impl::generatorMicroTurbineHeatRecovery() const {
369
1/1
✓ Branch 1 taken 27 times.
54 return getObject<ModelObject>().getModelObjectTarget<GeneratorMicroTurbineHeatRecovery>(
370
1/1
✓ Branch 1 taken 27 times.
54 OS_Generator_MicroTurbineFields::GeneratorMicroTurbineHeatRecoveryName);
371 }
372
373 //boost::optional<Connection> GeneratorMicroTurbine_Impl::combustionAirInletNode() const {
374 // return getObject<ModelObject>().getModelObjectTarget<Connection>(OS_Generator_MicroTurbineFields::CombustionAirInletNodeName);
375 //}
376
377 //boost::optional<Connection> GeneratorMicroTurbine_Impl::combustionAirOutletNode() const {
378 // return getObject<ModelObject>().getModelObjectTarget<Connection>(OS_Generator_MicroTurbineFields::CombustionAirOutletNodeName);
379 //}
380
381 4 boost::optional<double> GeneratorMicroTurbine_Impl::referenceExhaustAirMassFlowRate() const {
382 4 return getDouble(OS_Generator_MicroTurbineFields::ReferenceExhaustAirMassFlowRate, true);
383 }
384
385 5 boost::optional<Curve> GeneratorMicroTurbine_Impl::exhaustAirFlowRateFunctionofTemperatureCurve() const {
386
2/2
✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
5 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Generator_MicroTurbineFields::ExhaustAirFlowRateFunctionofTemperatureCurveName);
387 }
388
389 5 boost::optional<Curve> GeneratorMicroTurbine_Impl::exhaustAirFlowRateFunctionofPartLoadRatioCurve() const {
390
1/1
✓ Branch 1 taken 5 times.
10 return getObject<ModelObject>().getModelObjectTarget<Curve>(
391
1/1
✓ Branch 1 taken 5 times.
10 OS_Generator_MicroTurbineFields::ExhaustAirFlowRateFunctionofPartLoadRatioCurveName);
392 }
393
394 4 boost::optional<double> GeneratorMicroTurbine_Impl::nominalExhaustAirOutletTemperature() const {
395 4 return getDouble(OS_Generator_MicroTurbineFields::NominalExhaustAirOutletTemperature, true);
396 }
397
398 2 boost::optional<Curve> GeneratorMicroTurbine_Impl::exhaustAirTemperatureFunctionofTemperatureCurve() const {
399
1/1
✓ Branch 1 taken 2 times.
4 return getObject<ModelObject>().getModelObjectTarget<Curve>(
400
1/1
✓ Branch 1 taken 2 times.
4 OS_Generator_MicroTurbineFields::ExhaustAirTemperatureFunctionofTemperatureCurveName);
401 }
402
403 5 boost::optional<Curve> GeneratorMicroTurbine_Impl::exhaustAirTemperatureFunctionofPartLoadRatioCurve() const {
404
1/1
✓ Branch 1 taken 5 times.
10 return getObject<ModelObject>().getModelObjectTarget<Curve>(
405
1/1
✓ Branch 1 taken 5 times.
10 OS_Generator_MicroTurbineFields::ExhaustAirTemperatureFunctionofPartLoadRatioCurveName);
406 }
407
408 1 bool GeneratorMicroTurbine_Impl::setAvailabilitySchedule(Schedule& schedule) {
409
3/3
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
4 bool result = setSchedule(OS_Generator_MicroTurbineFields::AvailabilityScheduleName, "GeneratorMicroTurbine", "Availability", schedule);
410 1 return result;
411 }
412
413 ✗ void GeneratorMicroTurbine_Impl::resetAvailabilitySchedule() {
414 ✗ bool result = setString(OS_Generator_MicroTurbineFields::AvailabilityScheduleName, "");
415 ✗ OS_ASSERT(result);
416 ✗ }
417
418 11 bool GeneratorMicroTurbine_Impl::setReferenceElectricalPowerOutput(double referenceElectricalPowerOutput) {
419 11 bool result = setDouble(OS_Generator_MicroTurbineFields::ReferenceElectricalPowerOutput, referenceElectricalPowerOutput);
420 11 return result;
421 }
422
423 1 bool GeneratorMicroTurbine_Impl::setMinimumFullLoadElectricalPowerOutput(double minimumFullLoadElectricalPowerOutput) {
424 1 bool result = setDouble(OS_Generator_MicroTurbineFields::MinimumFullLoadElectricalPowerOutput, minimumFullLoadElectricalPowerOutput);
425 1 return result;
426 }
427
428 1 void GeneratorMicroTurbine_Impl::resetMinimumFullLoadElectricalPowerOutput() {
429
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::MinimumFullLoadElectricalPowerOutput, "");
430
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
431 1 }
432
433 1 bool GeneratorMicroTurbine_Impl::setMaximumFullLoadElectricalPowerOutput(double maximumFullLoadElectricalPowerOutput) {
434 1 bool result = setDouble(OS_Generator_MicroTurbineFields::MaximumFullLoadElectricalPowerOutput, maximumFullLoadElectricalPowerOutput);
435 1 return result;
436 }
437
438 1 void GeneratorMicroTurbine_Impl::resetMaximumFullLoadElectricalPowerOutput() {
439
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::MaximumFullLoadElectricalPowerOutput, "");
440
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
441 1 }
442
443 bool
444 11 GeneratorMicroTurbine_Impl::setReferenceElectricalEfficiencyUsingLowerHeatingValue(double referenceElectricalEfficiencyUsingLowerHeatingValue) {
445 11 bool result = setDouble(OS_Generator_MicroTurbineFields::ReferenceElectricalEfficiencyUsingLowerHeatingValue,
446 referenceElectricalEfficiencyUsingLowerHeatingValue);
447 11 return result;
448 }
449
450 1 bool GeneratorMicroTurbine_Impl::setReferenceCombustionAirInletTemperature(double referenceCombustionAirInletTemperature) {
451 1 bool result = setDouble(OS_Generator_MicroTurbineFields::ReferenceCombustionAirInletTemperature, referenceCombustionAirInletTemperature);
452
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
453 1 return result;
454 }
455
456 1 void GeneratorMicroTurbine_Impl::resetReferenceCombustionAirInletTemperature() {
457
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::ReferenceCombustionAirInletTemperature, "");
458
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
459 1 }
460
461 1 bool GeneratorMicroTurbine_Impl::setReferenceCombustionAirInletHumidityRatio(double referenceCombustionAirInletHumidityRatio) {
462 1 bool result = setDouble(OS_Generator_MicroTurbineFields::ReferenceCombustionAirInletHumidityRatio, referenceCombustionAirInletHumidityRatio);
463 1 return result;
464 }
465
466 1 void GeneratorMicroTurbine_Impl::resetReferenceCombustionAirInletHumidityRatio() {
467
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::ReferenceCombustionAirInletHumidityRatio, "");
468
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
469 1 }
470
471 1 bool GeneratorMicroTurbine_Impl::setReferenceElevation(double referenceElevation) {
472 1 bool result = setDouble(OS_Generator_MicroTurbineFields::ReferenceElevation, referenceElevation);
473 1 return result;
474 }
475
476 1 void GeneratorMicroTurbine_Impl::resetReferenceElevation() {
477
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::ReferenceElevation, "");
478
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
479 1 }
480
481 12 bool GeneratorMicroTurbine_Impl::setElectricalPowerFunctionofTemperatureandElevationCurve(const Curve& curve) {
482
4/5
✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
✓ Branch 7 taken 12 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 12 times.
12 if (model() != curve.model()) {
483 ✗ LOG(Warn, briefDescription() << " does not belong to the same model as the curve you want to set.");
484 ✗ return false;
485 }
486 // Todo: do I need to explicitly check if the curve is of the right type? or does defining \object-list BiquadraticCurves in .idd suffice?
487
2/2
✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
12 bool result = setPointer(OS_Generator_MicroTurbineFields::ElectricalPowerFunctionofTemperatureandElevationCurveName, curve.handle());
488 12 return result;
489 }
490
491 12 bool GeneratorMicroTurbine_Impl::setElectricalEfficiencyFunctionofTemperatureCurve(const Curve& curve) {
492
4/5
✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
✓ Branch 7 taken 12 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 12 times.
12 if (model() != curve.model()) {
493 ✗ LOG(Warn, briefDescription() << " does not belong to the same model as the curve you want to set.");
494 ✗ return false;
495 }
496
2/2
✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
12 bool result = setPointer(OS_Generator_MicroTurbineFields::ElectricalEfficiencyFunctionofTemperatureCurveName, curve.handle());
497 12 return result;
498 }
499
500 12 bool GeneratorMicroTurbine_Impl::setElectricalEfficiencyFunctionofPartLoadRatioCurve(const Curve& curve) {
501
4/5
✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
✓ Branch 7 taken 12 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 12 times.
12 if (model() != curve.model()) {
502 ✗ LOG(Warn, briefDescription() << " does not belong to the same model as the curve you want to set.");
503 ✗ return false;
504 }
505
2/2
✓ Branch 1 taken 12 times.
✓ Branch 4 taken 12 times.
12 bool result = setPointer(OS_Generator_MicroTurbineFields::ElectricalEfficiencyFunctionofPartLoadRatioCurveName, curve.handle());
506 12 return result;
507 }
508
509 1 bool GeneratorMicroTurbine_Impl::setFuelType(const std::string& fuelType) {
510 1 bool result = setString(OS_Generator_MicroTurbineFields::FuelType, fuelType);
511 1 return result;
512 }
513
514 1 void GeneratorMicroTurbine_Impl::resetFuelType() {
515
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::FuelType, "");
516
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
517 1 }
518
519 1 bool GeneratorMicroTurbine_Impl::setFuelHigherHeatingValue(double fuelHigherHeatingValue) {
520 1 bool result = setDouble(OS_Generator_MicroTurbineFields::FuelHigherHeatingValue, fuelHigherHeatingValue);
521 1 return result;
522 }
523
524 1 void GeneratorMicroTurbine_Impl::resetFuelHigherHeatingValue() {
525
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::FuelHigherHeatingValue, "");
526
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
527 1 }
528
529 1 bool GeneratorMicroTurbine_Impl::setFuelLowerHeatingValue(double fuelLowerHeatingValue) {
530 1 bool result = setDouble(OS_Generator_MicroTurbineFields::FuelLowerHeatingValue, fuelLowerHeatingValue);
531 1 return result;
532 }
533
534 1 void GeneratorMicroTurbine_Impl::resetFuelLowerHeatingValue() {
535
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::FuelLowerHeatingValue, "");
536
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
537 1 }
538
539 1 bool GeneratorMicroTurbine_Impl::setStandbyPower(double standbyPower) {
540 1 bool result = setDouble(OS_Generator_MicroTurbineFields::StandbyPower, standbyPower);
541 1 return result;
542 }
543
544 1 void GeneratorMicroTurbine_Impl::resetStandbyPower() {
545
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::StandbyPower, "");
546
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
547 1 }
548
549 1 bool GeneratorMicroTurbine_Impl::setAncillaryPower(double ancillaryPower) {
550 1 bool result = setDouble(OS_Generator_MicroTurbineFields::AncillaryPower, ancillaryPower);
551 1 return result;
552 }
553
554 1 void GeneratorMicroTurbine_Impl::resetAncillaryPower() {
555
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 bool result = setString(OS_Generator_MicroTurbineFields::AncillaryPower, "");
556
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
557 1 }
558
559 1 bool GeneratorMicroTurbine_Impl::setAncillaryPowerFunctionofFuelInputCurve(const Curve& curve) {
560
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 bool result = setPointer(OS_Generator_MicroTurbineFields::AncillaryPowerFunctionofFuelInputCurveName, curve.handle());
561 1 return result;
562 }
563
564 ✗ void GeneratorMicroTurbine_Impl::resetAncillaryPowerFunctionofFuelInputCurve() {
565 ✗ bool result = setString(OS_Generator_MicroTurbineFields::AncillaryPowerFunctionofFuelInputCurveName, "");
566 ✗ OS_ASSERT(result);
567 ✗ }
568
569 // Private: Generator:MicroTurbine:HeatRecovery
570 bool
571 10 GeneratorMicroTurbine_Impl::setGeneratorMicroTurbineHeatRecovery(const GeneratorMicroTurbineHeatRecovery& generatorMicroTurbineHeatRecovery) {
572
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
10 bool result = setPointer(OS_Generator_MicroTurbineFields::GeneratorMicroTurbineHeatRecoveryName, generatorMicroTurbineHeatRecovery.handle());
573 10 return result;
574 }
575
576 /*
577 void GeneratorMicroTurbine_Impl::resetGeneratorMicroTurbineHeatRecovery() {
578 bool result = setString(OS_Generator_MicroTurbineFields::GeneratorMicroTurbineHeatRecoveryName, "");
579 OS_ASSERT(result);
580 }*/
581
582 /* void GeneratorMicroTurbine_Impl::resetCombustionAirInletNode() {
583 bool result = setString(OS_Generator_MicroTurbineFields::CombustionAirInletNodeName, "");
584 OS_ASSERT(result);
585 }
586
587 bool GeneratorMicroTurbine_Impl::setCombustionAirOutletNode(const boost::optional<Connection>& connection) {
588 bool result(false);
589 if (connection) {
590 result = setPointer(OS_Generator_MicroTurbineFields::CombustionAirOutletNodeName, connection.get().handle());
591 }
592 else {
593 resetCombustionAirOutletNode();
594 result = true;
595 }
596 return result;
597 }
598
599 void GeneratorMicroTurbine_Impl::resetCombustionAirOutletNode() {
600 bool result = setString(OS_Generator_MicroTurbineFields::CombustionAirOutletNodeName, "");
601 OS_ASSERT(result);
602 } */
603
604 1 bool GeneratorMicroTurbine_Impl::setReferenceExhaustAirMassFlowRate(double referenceExhaustAirMassFlowRate) {
605 1 bool result = setDouble(OS_Generator_MicroTurbineFields::ReferenceExhaustAirMassFlowRate, referenceExhaustAirMassFlowRate);
606 1 return result;
607 }
608
609 ✗ void GeneratorMicroTurbine_Impl::resetReferenceExhaustAirMassFlowRate() {
610 ✗ bool result = setString(OS_Generator_MicroTurbineFields::ReferenceExhaustAirMassFlowRate, "");
611 ✗ OS_ASSERT(result);
612 ✗ }
613
614 1 bool GeneratorMicroTurbine_Impl::setExhaustAirFlowRateFunctionofTemperatureCurve(const Curve& curve) {
615
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 bool result = setPointer(OS_Generator_MicroTurbineFields::ExhaustAirFlowRateFunctionofTemperatureCurveName, curve.handle());
616 1 return result;
617 }
618
619 ✗ void GeneratorMicroTurbine_Impl::resetExhaustAirFlowRateFunctionofTemperatureCurve() {
620 ✗ bool result = setString(OS_Generator_MicroTurbineFields::ExhaustAirFlowRateFunctionofTemperatureCurveName, "");
621 ✗ OS_ASSERT(result);
622 ✗ }
623
624 1 bool GeneratorMicroTurbine_Impl::setExhaustAirFlowRateFunctionofPartLoadRatioCurve(const Curve& curve) {
625
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 bool result = setPointer(OS_Generator_MicroTurbineFields::ExhaustAirFlowRateFunctionofPartLoadRatioCurveName, curve.handle());
626 1 return result;
627 }
628
629 ✗ void GeneratorMicroTurbine_Impl::resetExhaustAirFlowRateFunctionofPartLoadRatioCurve() {
630 ✗ bool result = setString(OS_Generator_MicroTurbineFields::ExhaustAirFlowRateFunctionofPartLoadRatioCurveName, "");
631 ✗ OS_ASSERT(result);
632 ✗ }
633
634 1 bool GeneratorMicroTurbine_Impl::setNominalExhaustAirOutletTemperature(double nominalExhaustAirOutletTemperature) {
635 1 bool result = setDouble(OS_Generator_MicroTurbineFields::NominalExhaustAirOutletTemperature, nominalExhaustAirOutletTemperature);
636
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
637 1 return result;
638 }
639
640 ✗ void GeneratorMicroTurbine_Impl::resetNominalExhaustAirOutletTemperature() {
641 ✗ bool result = setString(OS_Generator_MicroTurbineFields::NominalExhaustAirOutletTemperature, "");
642 ✗ OS_ASSERT(result);
643 ✗ }
644
645 ✗ bool GeneratorMicroTurbine_Impl::setExhaustAirTemperatureFunctionofTemperatureCurve(const Curve& curve) {
646 ✗ bool result = setPointer(OS_Generator_MicroTurbineFields::ExhaustAirTemperatureFunctionofTemperatureCurveName, curve.handle());
647 ✗ return result;
648 }
649
650 ✗ void GeneratorMicroTurbine_Impl::resetExhaustAirTemperatureFunctionofTemperatureCurve() {
651 ✗ bool result = setString(OS_Generator_MicroTurbineFields::ExhaustAirTemperatureFunctionofTemperatureCurveName, "");
652 ✗ OS_ASSERT(result);
653 ✗ }
654
655 1 bool GeneratorMicroTurbine_Impl::setExhaustAirTemperatureFunctionofPartLoadRatioCurve(const Curve& curve) {
656
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
1 bool result = setPointer(OS_Generator_MicroTurbineFields::ExhaustAirTemperatureFunctionofPartLoadRatioCurveName, curve.handle());
657 1 return result;
658 }
659
660 ✗ void GeneratorMicroTurbine_Impl::resetExhaustAirTemperatureFunctionofPartLoadRatioCurve() {
661 ✗ bool result = setString(OS_Generator_MicroTurbineFields::ExhaustAirTemperatureFunctionofPartLoadRatioCurveName, "");
662 ✗ OS_ASSERT(result);
663 ✗ }
664 /*
665 boost::optional<Curve> GeneratorMicroTurbine_Impl::optionalElectricalPowerFunctionofTemperatureandElevationCurve() const {
666 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Generator_MicroTurbineFields::ElectricalPowerFunctionofTemperatureandElevationCurveName);
667 }
668
669 boost::optional<Curve> GeneratorMicroTurbine_Impl::optionalElectricalEfficiencyFunctionofTemperatureCurve() const {
670 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Generator_MicroTurbineFields::ElectricalEfficiencyFunctionofTemperatureCurveName);
671 }
672
673 boost::optional<Curve> GeneratorMicroTurbine_Impl::optionalElectricalEfficiencyFunctionofPartLoadRatioCurve() const {
674 return getObject<ModelObject>().getModelObjectTarget<Curve>(OS_Generator_MicroTurbineFields::ElectricalEfficiencyFunctionofPartLoadRatioCurveName);
675 }
676 */
677
678 ✗ std::vector<EMSActuatorNames> GeneratorMicroTurbine_Impl::emsActuatorNames() const {
679 ✗ std::vector<EMSActuatorNames> actuators{{"On-Site Generator Control", "Requested Power"}};
680 ✗ return actuators;
681 ✗ }
682
683 ✗ std::vector<std::string> GeneratorMicroTurbine_Impl::emsInternalVariableNames() const {
684 ✗ std::vector<std::string> types{"Generator Nominal Maximum Power", "Generator Nominal Thermal To Electric Ratio"};
685 ✗ return types;
686 ✗ }
687
688 } // namespace detail
689
690 10 GeneratorMicroTurbine::GeneratorMicroTurbine(const Model& model) : Generator(GeneratorMicroTurbine::iddObjectType(), model) {
691
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 10 times.
✗ Branch 5 not taken.
10 OS_ASSERT(getImpl<detail::GeneratorMicroTurbine_Impl>());
692
693 // TODO set a value to all required fields with no default...
694 // Source: Generators.idf, Capstone C65
695 //setName("Generator MicroTurbine Capstone C65");
696
697 // Reference Electrical Power Output
698
1/1
✓ Branch 1 taken 10 times.
10 setReferenceElectricalPowerOutput(65000);
699
700 // Reference Electrical Efficiency Using Lower Heating Value
701
1/1
✓ Branch 1 taken 10 times.
10 setReferenceElectricalEfficiencyUsingLowerHeatingValue(0.29);
702
703 //Electrical Power Function of Temperature and Elevation Curve Name
704 // CurveBiquadratic
705
1/1
✓ Branch 1 taken 10 times.
10 CurveBiquadratic elecPowerFTempElevation(model);
706
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 elecPowerFTempElevation.setName(name().get() + " Capstone C65 Power_vs_Temp_Elev");
707
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setCoefficient1Constant(1.2027697);
708
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setCoefficient2x(-9.671305E-03);
709
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setCoefficient3xPOW2(-4.860793E-06);
710
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setCoefficient4y(-1.542394E-04);
711
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setCoefficient5yPOW2(9.111418E-09);
712
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setCoefficient6xTIMESY(8.797885E-07);
713
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setMinimumValueofx(-17.8);
714
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setMaximumValueofx(50);
715
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setMinimumValueofy(0);
716
1/1
✓ Branch 1 taken 10 times.
10 elecPowerFTempElevation.setMaximumValueofy(3050.);
717 // Temperature, !- Input Unit Type for X
718 // Distance, !- Input Unit Type for Y
719 // Dimensionless; !- Output Unit Type
720
1/1
✓ Branch 1 taken 10 times.
10 setElectricalPowerFunctionofTemperatureandElevationCurve(elecPowerFTempElevation);
721
722 // ElectricalEfficiencyFunctionofTemperatureCurveName
723 // \object - list QuadraticCubicCurves
724 /*! Electrical Efficiency Modifier Curve (function of temperature)
725 ! x = Dry-Bulb Temperature of Combustion Inlet Air (C)
726
727 Curve:Cubic,
728 Capstone C65 Efficiency_vs_Temp, !- Name
729 1.0402217, !- Coefficient1 Constant
730 -0.0017314, !- Coefficient2 x
731 -6.497040E-05, !- Coefficient3 x**2
732 5.133175E-07, !- Coefficient4 x**3
733 -20.0, !- Minimum Value of x
734 50.0, !- Maximum Value of x
735 , !- Minimum Curve Output
736 , !- Maximum Curve Output
737 Temperature, !- Input Unit Type for X
738 Dimensionless; !- Output Unit Type*/
739
1/1
✓ Branch 1 taken 10 times.
10 CurveCubic elecEffFT(model);
740
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 elecEffFT.setName(name().get() + " Capstone C65 Efficiency_vs_Temp");
741
1/1
✓ Branch 1 taken 10 times.
10 elecEffFT.setCoefficient1Constant(1.0402217);
742
1/1
✓ Branch 1 taken 10 times.
10 elecEffFT.setCoefficient2x(-0.0017314);
743
1/1
✓ Branch 1 taken 10 times.
10 elecEffFT.setCoefficient3xPOW2(-6.497040E-05);
744
1/1
✓ Branch 1 taken 10 times.
10 elecEffFT.setCoefficient4xPOW3(5.133175E-07);
745
1/1
✓ Branch 1 taken 10 times.
10 elecEffFT.setMinimumValueofx(-20);
746
1/1
✓ Branch 1 taken 10 times.
10 elecEffFT.setMaximumValueofx(50);
747
1/1
✓ Branch 1 taken 10 times.
10 setElectricalEfficiencyFunctionofTemperatureCurve(elecEffFT);
748
749 // ElectricalEfficiencyFunctionofPartLoadRatioCurveName
750 // QuadraticCubicCurves
751 /* Curve:Cubic,
752 Capstone C65 Efficiency_vs_PLR, !- Name
753 , !- Coefficient1 Constant
754 , !- Coefficient2 x
755 , !- Coefficient3 x**2
756 , !- Coefficient4 x**3
757 0.03, !- Minimum Value of x
758 1.0; !- Maximum Value of x*/
759
1/1
✓ Branch 1 taken 10 times.
10 CurveCubic elecEffFPLR(model);
760
4/4
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✓ Branch 10 taken 10 times.
10 elecEffFPLR.setName(name().get() + " Capstone C65 Efficiency_vs_PLR");
761
1/1
✓ Branch 1 taken 10 times.
10 elecEffFPLR.setCoefficient1Constant(0.215290);
762
1/1
✓ Branch 1 taken 10 times.
10 elecEffFPLR.setCoefficient2x(2.561463);
763
1/1
✓ Branch 1 taken 10 times.
10 elecEffFPLR.setCoefficient3xPOW2(-3.24613);
764
1/1
✓ Branch 1 taken 10 times.
10 elecEffFPLR.setCoefficient4xPOW3(1.497306);
765
1/1
✓ Branch 1 taken 10 times.
10 elecEffFPLR.setMinimumValueofx(0.03);
766
1/1
✓ Branch 1 taken 10 times.
10 elecEffFPLR.setMaximumValueofx(1.0);
767
1/1
✓ Branch 1 taken 10 times.
10 setElectricalEfficiencyFunctionofPartLoadRatioCurve(elecEffFPLR);
768 10 }
769
770 7758 IddObjectType GeneratorMicroTurbine::iddObjectType() {
771
1/1
✓ Branch 1 taken 7758 times.
7758 return {IddObjectType::OS_Generator_MicroTurbine};
772 }
773
774 // TODO: standardize on either fooValues or validFooValues
775 ✗ std::vector<std::string> GeneratorMicroTurbine::validFuelTypeValues() {
776 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Generator_MicroTurbineFields::FuelType);
777 }
778
779 5 double GeneratorMicroTurbine::referenceElectricalPowerOutput() const {
780
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::GeneratorMicroTurbine_Impl>()->referenceElectricalPowerOutput();
781 }
782
783 1 boost::optional<double> GeneratorMicroTurbine::ratedThermaltoElectricalPowerRatio() const {
784
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->ratedThermaltoElectricalPowerRatio();
785 }
786
787 3 boost::optional<Schedule> GeneratorMicroTurbine::availabilitySchedule() const {
788
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->availabilitySchedule();
789 }
790
791 4 double GeneratorMicroTurbine::minimumFullLoadElectricalPowerOutput() const {
792
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->minimumFullLoadElectricalPowerOutput();
793 }
794
795 3 bool GeneratorMicroTurbine::isMinimumFullLoadElectricalPowerOutputDefaulted() const {
796
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isMinimumFullLoadElectricalPowerOutputDefaulted();
797 }
798
799 4 double GeneratorMicroTurbine::maximumFullLoadElectricalPowerOutput() const {
800
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->maximumFullLoadElectricalPowerOutput();
801 }
802
803 3 bool GeneratorMicroTurbine::isMaximumFullLoadElectricalPowerOutputDefaulted() const {
804
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isMaximumFullLoadElectricalPowerOutputDefaulted();
805 }
806
807 5 double GeneratorMicroTurbine::referenceElectricalEfficiencyUsingLowerHeatingValue() const {
808
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::GeneratorMicroTurbine_Impl>()->referenceElectricalEfficiencyUsingLowerHeatingValue();
809 }
810
811 4 double GeneratorMicroTurbine::referenceCombustionAirInletTemperature() const {
812
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->referenceCombustionAirInletTemperature();
813 }
814
815 3 bool GeneratorMicroTurbine::isReferenceCombustionAirInletTemperatureDefaulted() const {
816
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isReferenceCombustionAirInletTemperatureDefaulted();
817 }
818
819 4 double GeneratorMicroTurbine::referenceCombustionAirInletHumidityRatio() const {
820
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->referenceCombustionAirInletHumidityRatio();
821 }
822
823 3 bool GeneratorMicroTurbine::isReferenceCombustionAirInletHumidityRatioDefaulted() const {
824
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isReferenceCombustionAirInletHumidityRatioDefaulted();
825 }
826
827 4 double GeneratorMicroTurbine::referenceElevation() const {
828
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->referenceElevation();
829 }
830
831 3 bool GeneratorMicroTurbine::isReferenceElevationDefaulted() const {
832
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isReferenceElevationDefaulted();
833 }
834
835 7 Curve GeneratorMicroTurbine::electricalPowerFunctionofTemperatureandElevationCurve() const {
836
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::GeneratorMicroTurbine_Impl>()->electricalPowerFunctionofTemperatureandElevationCurve();
837 }
838
839 7 Curve GeneratorMicroTurbine::electricalEfficiencyFunctionofTemperatureCurve() const {
840
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::GeneratorMicroTurbine_Impl>()->electricalEfficiencyFunctionofTemperatureCurve();
841 }
842
843 7 Curve GeneratorMicroTurbine::electricalEfficiencyFunctionofPartLoadRatioCurve() const {
844
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::GeneratorMicroTurbine_Impl>()->electricalEfficiencyFunctionofPartLoadRatioCurve();
845 }
846
847 4 std::string GeneratorMicroTurbine::fuelType() const {
848
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->fuelType();
849 }
850
851 3 bool GeneratorMicroTurbine::isFuelTypeDefaulted() const {
852
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isFuelTypeDefaulted();
853 }
854
855 4 double GeneratorMicroTurbine::fuelHigherHeatingValue() const {
856
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->fuelHigherHeatingValue();
857 }
858
859 3 bool GeneratorMicroTurbine::isFuelHigherHeatingValueDefaulted() const {
860
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isFuelHigherHeatingValueDefaulted();
861 }
862
863 4 double GeneratorMicroTurbine::fuelLowerHeatingValue() const {
864
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->fuelLowerHeatingValue();
865 }
866
867 3 bool GeneratorMicroTurbine::isFuelLowerHeatingValueDefaulted() const {
868
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isFuelLowerHeatingValueDefaulted();
869 }
870
871 4 double GeneratorMicroTurbine::standbyPower() const {
872
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->standbyPower();
873 }
874
875 3 bool GeneratorMicroTurbine::isStandbyPowerDefaulted() const {
876
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isStandbyPowerDefaulted();
877 }
878
879 4 double GeneratorMicroTurbine::ancillaryPower() const {
880
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->ancillaryPower();
881 }
882
883 3 bool GeneratorMicroTurbine::isAncillaryPowerDefaulted() const {
884
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::GeneratorMicroTurbine_Impl>()->isAncillaryPowerDefaulted();
885 }
886
887 5 boost::optional<Curve> GeneratorMicroTurbine::ancillaryPowerFunctionofFuelInputCurve() const {
888
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::GeneratorMicroTurbine_Impl>()->ancillaryPowerFunctionofFuelInputCurve();
889 }
890
891 19 boost::optional<GeneratorMicroTurbineHeatRecovery> GeneratorMicroTurbine::generatorMicroTurbineHeatRecovery() const {
892
1/1
✓ Branch 3 taken 19 times.
19 return getImpl<detail::GeneratorMicroTurbine_Impl>()->generatorMicroTurbineHeatRecovery();
893 }
894
895 /*
896 boost::optional<Connection> GeneratorMicroTurbine::combustionAirInletNode() const {
897 return getImpl<detail::GeneratorMicroTurbine_Impl>()->combustionAirInletNode();
898 }
899
900 boost::optional<Connection> GeneratorMicroTurbine::combustionAirOutletNode() const {
901 return getImpl<detail::GeneratorMicroTurbine_Impl>()->combustionAirOutletNode();
902 } */
903
904 4 boost::optional<double> GeneratorMicroTurbine::referenceExhaustAirMassFlowRate() const {
905
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->referenceExhaustAirMassFlowRate();
906 }
907
908 5 boost::optional<Curve> GeneratorMicroTurbine::exhaustAirFlowRateFunctionofTemperatureCurve() const {
909
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::GeneratorMicroTurbine_Impl>()->exhaustAirFlowRateFunctionofTemperatureCurve();
910 }
911
912 5 boost::optional<Curve> GeneratorMicroTurbine::exhaustAirFlowRateFunctionofPartLoadRatioCurve() const {
913
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::GeneratorMicroTurbine_Impl>()->exhaustAirFlowRateFunctionofPartLoadRatioCurve();
914 }
915
916 4 boost::optional<double> GeneratorMicroTurbine::nominalExhaustAirOutletTemperature() const {
917
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::GeneratorMicroTurbine_Impl>()->nominalExhaustAirOutletTemperature();
918 }
919
920 2 boost::optional<Curve> GeneratorMicroTurbine::exhaustAirTemperatureFunctionofTemperatureCurve() const {
921
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::GeneratorMicroTurbine_Impl>()->exhaustAirTemperatureFunctionofTemperatureCurve();
922 }
923
924 5 boost::optional<Curve> GeneratorMicroTurbine::exhaustAirTemperatureFunctionofPartLoadRatioCurve() const {
925
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::GeneratorMicroTurbine_Impl>()->exhaustAirTemperatureFunctionofPartLoadRatioCurve();
926 }
927
928 11 bool GeneratorMicroTurbine::setReferenceElectricalPowerOutput(double referenceElectricalPowerOutput) {
929
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setReferenceElectricalPowerOutput(referenceElectricalPowerOutput);
930 }
931
932 1 bool GeneratorMicroTurbine::setMinimumFullLoadElectricalPowerOutput(double minimumFullLoadElectricalPowerOutput) {
933
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setMinimumFullLoadElectricalPowerOutput(minimumFullLoadElectricalPowerOutput);
934 }
935
936 1 void GeneratorMicroTurbine::resetMinimumFullLoadElectricalPowerOutput() {
937
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetMinimumFullLoadElectricalPowerOutput();
938 1 }
939
940 1 bool GeneratorMicroTurbine::setAvailabilitySchedule(Schedule& schedule) {
941
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setAvailabilitySchedule(schedule);
942 }
943
944 ✗ void GeneratorMicroTurbine::resetAvailabilitySchedule() {
945 ✗ getImpl<detail::GeneratorMicroTurbine_Impl>()->resetAvailabilitySchedule();
946 ✗ }
947
948 1 bool GeneratorMicroTurbine::setMaximumFullLoadElectricalPowerOutput(double maximumFullLoadElectricalPowerOutput) {
949
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setMaximumFullLoadElectricalPowerOutput(maximumFullLoadElectricalPowerOutput);
950 }
951
952 1 void GeneratorMicroTurbine::resetMaximumFullLoadElectricalPowerOutput() {
953
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetMaximumFullLoadElectricalPowerOutput();
954 1 }
955
956 11 bool GeneratorMicroTurbine::setReferenceElectricalEfficiencyUsingLowerHeatingValue(double referenceElectricalEfficiencyUsingLowerHeatingValue) {
957
1/1
✓ Branch 3 taken 11 times.
22 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setReferenceElectricalEfficiencyUsingLowerHeatingValue(
958 22 referenceElectricalEfficiencyUsingLowerHeatingValue);
959 }
960
961 1 bool GeneratorMicroTurbine::setReferenceCombustionAirInletTemperature(double referenceCombustionAirInletTemperature) {
962
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setReferenceCombustionAirInletTemperature(referenceCombustionAirInletTemperature);
963 }
964
965 1 void GeneratorMicroTurbine::resetReferenceCombustionAirInletTemperature() {
966
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetReferenceCombustionAirInletTemperature();
967 1 }
968
969 1 bool GeneratorMicroTurbine::setReferenceCombustionAirInletHumidityRatio(double referenceCombustionAirInletHumidityRatio) {
970
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setReferenceCombustionAirInletHumidityRatio(referenceCombustionAirInletHumidityRatio);
971 }
972
973 1 void GeneratorMicroTurbine::resetReferenceCombustionAirInletHumidityRatio() {
974
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetReferenceCombustionAirInletHumidityRatio();
975 1 }
976
977 1 bool GeneratorMicroTurbine::setReferenceElevation(double referenceElevation) {
978
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setReferenceElevation(referenceElevation);
979 }
980
981 1 void GeneratorMicroTurbine::resetReferenceElevation() {
982
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetReferenceElevation();
983 1 }
984
985 12 bool GeneratorMicroTurbine::setElectricalPowerFunctionofTemperatureandElevationCurve(const Curve& curve) {
986
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setElectricalPowerFunctionofTemperatureandElevationCurve(curve);
987 }
988
989 12 bool GeneratorMicroTurbine::setElectricalEfficiencyFunctionofTemperatureCurve(const Curve& curve) {
990
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setElectricalEfficiencyFunctionofTemperatureCurve(curve);
991 }
992
993 12 bool GeneratorMicroTurbine::setElectricalEfficiencyFunctionofPartLoadRatioCurve(const Curve& curve) {
994
1/1
✓ Branch 3 taken 12 times.
12 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setElectricalEfficiencyFunctionofPartLoadRatioCurve(curve);
995 }
996
997 1 bool GeneratorMicroTurbine::setFuelType(const std::string& fuelType) {
998
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setFuelType(fuelType);
999 }
1000
1001 1 void GeneratorMicroTurbine::resetFuelType() {
1002
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetFuelType();
1003 1 }
1004
1005 1 bool GeneratorMicroTurbine::setFuelHigherHeatingValue(double fuelHigherHeatingValue) {
1006
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setFuelHigherHeatingValue(fuelHigherHeatingValue);
1007 }
1008
1009 1 void GeneratorMicroTurbine::resetFuelHigherHeatingValue() {
1010
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetFuelHigherHeatingValue();
1011 1 }
1012
1013 1 bool GeneratorMicroTurbine::setFuelLowerHeatingValue(double fuelLowerHeatingValue) {
1014
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setFuelLowerHeatingValue(fuelLowerHeatingValue);
1015 }
1016
1017 1 void GeneratorMicroTurbine::resetFuelLowerHeatingValue() {
1018
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetFuelLowerHeatingValue();
1019 1 }
1020
1021 1 bool GeneratorMicroTurbine::setStandbyPower(double standbyPower) {
1022
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setStandbyPower(standbyPower);
1023 }
1024
1025 1 void GeneratorMicroTurbine::resetStandbyPower() {
1026
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetStandbyPower();
1027 1 }
1028
1029 1 bool GeneratorMicroTurbine::setAncillaryPower(double ancillaryPower) {
1030
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setAncillaryPower(ancillaryPower);
1031 }
1032
1033 1 void GeneratorMicroTurbine::resetAncillaryPower() {
1034
1/1
✓ Branch 3 taken 1 time.
1 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetAncillaryPower();
1035 1 }
1036
1037 1 bool GeneratorMicroTurbine::setAncillaryPowerFunctionofFuelInputCurve(const Curve& curve) {
1038
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setAncillaryPowerFunctionofFuelInputCurve(curve);
1039 }
1040
1041 ✗ void GeneratorMicroTurbine::resetAncillaryPowerFunctionofFuelInputCurve() {
1042 ✗ getImpl<detail::GeneratorMicroTurbine_Impl>()->resetAncillaryPowerFunctionofFuelInputCurve();
1043 ✗ }
1044
1045 // These isn't made "public" to bindings
1046 /*bool GeneratorMicroTurbine::setGeneratorMicroTurbineHeatRecovery(const GeneratorMicroTurbineHeatRecovery& heatRecovery) {
1047 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setGeneratorMicroTurbineHeatRecovery(heatRecovery);
1048 }*/
1049
1050 /* This isn't implemented
1051 void GeneratorMicroTurbine::resetGeneratorMicroTurbineHeatRecovery() {
1052 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetGeneratorMicroTurbineHeatRecovery();
1053 }*/
1054
1055 /*
1056 bool GeneratorMicroTurbine::setCombustionAirInletNode(const Connection& connection) {
1057 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setCombustionAirInletNode(connection);
1058 }
1059
1060 void GeneratorMicroTurbine::resetCombustionAirInletNode() {
1061 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetCombustionAirInletNode();
1062 }
1063
1064 bool GeneratorMicroTurbine::setCombustionAirOutletNode(const Connection& connection) {
1065 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setCombustionAirOutletNode(connection);
1066 }
1067
1068 void GeneratorMicroTurbine::resetCombustionAirOutletNode() {
1069 getImpl<detail::GeneratorMicroTurbine_Impl>()->resetCombustionAirOutletNode();
1070 } */
1071
1072 1 bool GeneratorMicroTurbine::setReferenceExhaustAirMassFlowRate(double referenceExhaustAirMassFlowRate) {
1073
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setReferenceExhaustAirMassFlowRate(referenceExhaustAirMassFlowRate);
1074 }
1075
1076 ✗ void GeneratorMicroTurbine::resetReferenceExhaustAirMassFlowRate() {
1077 ✗ getImpl<detail::GeneratorMicroTurbine_Impl>()->resetReferenceExhaustAirMassFlowRate();
1078 ✗ }
1079
1080 1 bool GeneratorMicroTurbine::setExhaustAirFlowRateFunctionofTemperatureCurve(const Curve& curve) {
1081
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setExhaustAirFlowRateFunctionofTemperatureCurve(curve);
1082 }
1083
1084 ✗ void GeneratorMicroTurbine::resetExhaustAirFlowRateFunctionofTemperatureCurve() {
1085 ✗ getImpl<detail::GeneratorMicroTurbine_Impl>()->resetExhaustAirFlowRateFunctionofTemperatureCurve();
1086 ✗ }
1087
1088 1 bool GeneratorMicroTurbine::setExhaustAirFlowRateFunctionofPartLoadRatioCurve(const Curve& curve) {
1089
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setExhaustAirFlowRateFunctionofPartLoadRatioCurve(curve);
1090 }
1091
1092 ✗ void GeneratorMicroTurbine::resetExhaustAirFlowRateFunctionofPartLoadRatioCurve() {
1093 ✗ getImpl<detail::GeneratorMicroTurbine_Impl>()->resetExhaustAirFlowRateFunctionofPartLoadRatioCurve();
1094 ✗ }
1095
1096 1 bool GeneratorMicroTurbine::setNominalExhaustAirOutletTemperature(double nominalExhaustAirOutletTemperature) {
1097
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setNominalExhaustAirOutletTemperature(nominalExhaustAirOutletTemperature);
1098 }
1099
1100 ✗ void GeneratorMicroTurbine::resetNominalExhaustAirOutletTemperature() {
1101 ✗ getImpl<detail::GeneratorMicroTurbine_Impl>()->resetNominalExhaustAirOutletTemperature();
1102 ✗ }
1103
1104 ✗ bool GeneratorMicroTurbine::setExhaustAirTemperatureFunctionofTemperatureCurve(const Curve& curve) {
1105 ✗ return getImpl<detail::GeneratorMicroTurbine_Impl>()->setExhaustAirTemperatureFunctionofTemperatureCurve(curve);
1106 }
1107
1108 ✗ void GeneratorMicroTurbine::resetExhaustAirTemperatureFunctionofTemperatureCurve() {
1109 ✗ getImpl<detail::GeneratorMicroTurbine_Impl>()->resetExhaustAirTemperatureFunctionofTemperatureCurve();
1110 ✗ }
1111
1112 1 bool GeneratorMicroTurbine::setExhaustAirTemperatureFunctionofPartLoadRatioCurve(const Curve& curve) {
1113
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::GeneratorMicroTurbine_Impl>()->setExhaustAirTemperatureFunctionofPartLoadRatioCurve(curve);
1114 }
1115
1116 ✗ void GeneratorMicroTurbine::resetExhaustAirTemperatureFunctionofPartLoadRatioCurve() {
1117 ✗ getImpl<detail::GeneratorMicroTurbine_Impl>()->resetExhaustAirTemperatureFunctionofPartLoadRatioCurve();
1118 ✗ }
1119
1120 /// @cond
1121
1/1
✓ Branch 3 taken 18 times.
18 GeneratorMicroTurbine::GeneratorMicroTurbine(std::shared_ptr<detail::GeneratorMicroTurbine_Impl> impl) : Generator(std::move(impl)) {}
1122 /// @endcond
1123
1124 } // namespace model
1125 } // namespace openstudio
1126