GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 56.5% 414 / 0 / 733
Functions: 53.1% 113 / 0 / 213
Branches: 51.1% 296 / 0 / 579

src/model/LifeCycleCostParameters.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 "LifeCycleCostParameters.hpp"
7 #include "LifeCycleCostParameters_Impl.hpp"
8
9 #include "Model_Impl.hpp"
10
11 #include <utilities/idd/OS_LifeCycleCost_Parameters_FieldEnums.hxx>
12 #include <utilities/idd/IddEnums.hxx>
13 #include <utilities/idd/IddFactory.hxx>
14
15 #include "../utilities/time/Date.hpp"
16
17 #include "../utilities/core/Assert.hpp"
18
19 #include <boost/algorithm/string.hpp>
20
21 namespace openstudio {
22 namespace model {
23
24 namespace detail {
25
26 943 LifeCycleCostParameters_Impl::LifeCycleCostParameters_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
27 943 : ParentObject_Impl(idfObject, model, keepHandle) {
28
4/6
✓ Branch 1 taken 943 times.
✓ Branch 4 taken 943 times.
✓ Branch 7 taken 943 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 943 times.
✗ Branch 13 not taken.
943 OS_ASSERT(idfObject.iddObject().type() == LifeCycleCostParameters::iddObjectType());
29 943 }
30
31 35 LifeCycleCostParameters_Impl::LifeCycleCostParameters_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
32 35 bool keepHandle)
33 35 : ParentObject_Impl(other, model, keepHandle) {
34
4/6
✓ Branch 1 taken 35 times.
✓ Branch 4 taken 35 times.
✓ Branch 7 taken 35 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 35 times.
✗ Branch 13 not taken.
35 OS_ASSERT(other.iddObject().type() == LifeCycleCostParameters::iddObjectType());
35 35 }
36
37 92 LifeCycleCostParameters_Impl::LifeCycleCostParameters_Impl(const LifeCycleCostParameters_Impl& other, Model_Impl* model, bool keepHandle)
38 92 : ParentObject_Impl(other, model, keepHandle) {}
39
40 // return the parent object in the hierarchy
41 19 boost::optional<ParentObject> LifeCycleCostParameters_Impl::parent() const {
42 19 return {};
43 }
44
45 // return any children objects in the hierarchy
46 875 std::vector<ModelObject> LifeCycleCostParameters_Impl::children() const {
47 875 std::vector<ModelObject> result;
48 875 return result;
49 }
50
51 ✗ std::vector<IddObjectType> LifeCycleCostParameters_Impl::allowableChildTypes() const {
52 ✗ IddObjectTypeVector result;
53 ✗ return result;
54 }
55
56 // Get all output variable names that could be associated with this object.
57 ✗ const std::vector<std::string>& LifeCycleCostParameters_Impl::outputVariableNames() const {
58 ✗ static const std::vector<std::string> result;
59 // Not appropriate: no specific variables available
60 ✗ return result;
61 }
62
63 32 std::string LifeCycleCostParameters_Impl::analysisType() const {
64
1/1
✓ Branch 1 taken 32 times.
32 OptionalString os = getString(OS_LifeCycleCost_ParametersFields::AnalysisType, true);
65
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 32 times.
✗ Branch 4 not taken.
32 OS_ASSERT(os);
66
2/4
✓ Branch 1 taken 32 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 32 times.
✗ Branch 7 not taken.
32 OS_ASSERT(!os->empty());
67
2/2
✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
64 return *os;
68 32 }
69
70 ✗ bool LifeCycleCostParameters_Impl::isAnalysisTypeDefaulted() const {
71 ✗ return isEmpty(OS_LifeCycleCost_ParametersFields::AnalysisType);
72 }
73
74 27 bool LifeCycleCostParameters_Impl::isFEMPAnalysis() const {
75
2/2
✓ Branch 1 taken 27 times.
✓ Branch 4 taken 27 times.
27 return ("FEMP" == this->analysisType());
76 }
77
78 856 std::string LifeCycleCostParameters_Impl::discountingConvention() const {
79
1/1
✓ Branch 1 taken 856 times.
856 OptionalString os = getString(OS_LifeCycleCost_ParametersFields::DiscountingConvention, true);
80
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 856 times.
✗ Branch 4 not taken.
856 OS_ASSERT(os);
81
2/4
✓ Branch 1 taken 856 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 856 times.
✗ Branch 7 not taken.
856 OS_ASSERT(!os->empty());
82
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
1712 return *os;
83 856 }
84
85 1 bool LifeCycleCostParameters_Impl::isDiscountingConventionDefaulted() const {
86 1 return isEmpty(OS_LifeCycleCost_ParametersFields::DiscountingConvention);
87 }
88
89 3481 std::string LifeCycleCostParameters_Impl::inflationApproach() const {
90
1/1
✓ Branch 1 taken 3481 times.
3481 OptionalString os = getString(OS_LifeCycleCost_ParametersFields::InflationApproach, true);
91
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3481 times.
✗ Branch 4 not taken.
3481 OS_ASSERT(os);
92
2/4
✓ Branch 1 taken 3481 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 3481 times.
✗ Branch 7 not taken.
3481 OS_ASSERT(!os->empty());
93
2/2
✓ Branch 1 taken 3481 times.
✓ Branch 4 taken 3481 times.
6962 return *os;
94 3481 }
95
96 3 bool LifeCycleCostParameters_Impl::isInflationApproachDefaulted() const {
97 3 return isEmpty(OS_LifeCycleCost_ParametersFields::InflationApproach);
98 }
99
100 2621 bool LifeCycleCostParameters_Impl::isConstantDollarAnalysis() const {
101
2/2
✓ Branch 1 taken 2621 times.
✓ Branch 4 taken 2621 times.
2621 return ("ConstantDollar" == this->inflationApproach());
102 }
103
104 866 boost::optional<double> LifeCycleCostParameters_Impl::realDiscountRate() const {
105 866 boost::optional<double> result;
106
3/3
✓ Branch 1 taken 866 times.
✓ Branch 3 taken 863 times.
✓ Branch 4 taken 3 times.
866 if (this->isConstantDollarAnalysis()) {
107
1/1
✓ Branch 1 taken 863 times.
863 result = getDouble(OS_LifeCycleCost_ParametersFields::RealDiscountRate, true);
108
2/2
✓ Branch 1 taken 861 times.
✓ Branch 2 taken 2 times.
863 if (!result) {
109 // default is not in the IDD, act like it is here
110
2/2
✓ Branch 1 taken 861 times.
✓ Branch 4 taken 861 times.
861 result = LifeCycleCostParameters::fempRealDiscountRate();
111 }
112 }
113 866 return result;
114 }
115
116 865 boost::optional<double> LifeCycleCostParameters_Impl::nominalDiscountRate() const {
117 865 boost::optional<double> result;
118
3/3
✓ Branch 1 taken 865 times.
✓ Branch 3 taken 6 times.
✓ Branch 4 taken 859 times.
865 if (!this->isConstantDollarAnalysis()) {
119
1/1
✓ Branch 1 taken 6 times.
6 result = getDouble(OS_LifeCycleCost_ParametersFields::NominalDiscountRate, true);
120
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 2 times.
6 if (!result) {
121 // default is not in the IDD, act like it is here
122
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 result = LifeCycleCostParameters::fempNominalDiscountRate();
123 }
124 }
125 865 return result;
126 }
127
128 865 boost::optional<double> LifeCycleCostParameters_Impl::inflation() const {
129 865 boost::optional<double> result;
130
3/3
✓ Branch 1 taken 865 times.
✓ Branch 3 taken 6 times.
✓ Branch 4 taken 859 times.
865 if (!this->isConstantDollarAnalysis()) {
131
1/1
✓ Branch 1 taken 6 times.
6 result = getDouble(OS_LifeCycleCost_ParametersFields::Inflation, true);
132
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 2 times.
6 if (!result) {
133 // default is not in the IDD, act like it is here
134
2/2
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
4 result = LifeCycleCostParameters::fempInflation();
135 }
136 }
137 865 return result;
138 }
139
140 1 MonthOfYear LifeCycleCostParameters_Impl::baseDateMonth() const {
141
1/1
✓ Branch 1 taken 1 time.
1 OptionalString os = getString(OS_LifeCycleCost_ParametersFields::BaseDateMonth, true);
142
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(os);
143
2/4
✓ Branch 1 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 7 not taken.
1 OS_ASSERT(!os->empty());
144
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 return MonthOfYear(*os);
145 1 }
146
147 858 bool LifeCycleCostParameters_Impl::isBaseDateMonthDefaulted() const {
148 858 return isEmpty(OS_LifeCycleCost_ParametersFields::BaseDateMonth);
149 }
150
151 858 int LifeCycleCostParameters_Impl::baseDateYear() const {
152
1/1
✓ Branch 1 taken 858 times.
858 boost::optional<int> result = getInt(OS_LifeCycleCost_ParametersFields::BaseDateYear, true);
153
1/2
✓ Branch 1 taken 858 times.
✗ Branch 2 not taken.
858 if (!result) {
154
2/2
✓ Branch 1 taken 858 times.
✓ Branch 4 taken 858 times.
858 result = LifeCycleCostParameters::nistYear();
155 }
156
1/1
✓ Branch 1 taken 858 times.
1716 return *result;
157 }
158
159 1 bool LifeCycleCostParameters_Impl::isBaseDateYearDefaulted() const {
160 1 return isEmpty(OS_LifeCycleCost_ParametersFields::BaseDateYear);
161 }
162
163 1 MonthOfYear LifeCycleCostParameters_Impl::serviceDateMonth() const {
164
1/1
✓ Branch 1 taken 1 time.
1 OptionalString os = getString(OS_LifeCycleCost_ParametersFields::ServiceDateMonth, true);
165
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(os);
166
2/4
✓ Branch 1 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 7 not taken.
1 OS_ASSERT(!os->empty());
167
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 return MonthOfYear(*os);
168 1 }
169
170 856 bool LifeCycleCostParameters_Impl::isServiceDateMonthDefaulted() const {
171 856 return isEmpty(OS_LifeCycleCost_ParametersFields::BaseDateMonth);
172 }
173
174 856 int LifeCycleCostParameters_Impl::serviceDateYear() const {
175
1/1
✓ Branch 1 taken 856 times.
856 boost::optional<int> result = getInt(OS_LifeCycleCost_ParametersFields::ServiceDateYear, true);
176
1/2
✓ Branch 1 taken 856 times.
✗ Branch 2 not taken.
856 if (!result) {
177
2/2
✓ Branch 1 taken 856 times.
✓ Branch 4 taken 856 times.
856 result = LifeCycleCostParameters::nistYear();
178 }
179
1/1
✓ Branch 1 taken 856 times.
1712 return *result;
180 }
181
182 1 bool LifeCycleCostParameters_Impl::isServiceDateYearDefaulted() const {
183 1 return isEmpty(OS_LifeCycleCost_ParametersFields::ServiceDateYear);
184 }
185
186 888 int LifeCycleCostParameters_Impl::lengthOfStudyPeriodInYears() const {
187
1/1
✓ Branch 1 taken 888 times.
888 OptionalInt result = getInt(OS_LifeCycleCost_ParametersFields::LengthofStudyPeriodinYears, true);
188
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 888 times.
✗ Branch 4 not taken.
888 OS_ASSERT(result);
189
1/1
✓ Branch 1 taken 888 times.
1776 return *result;
190 }
191
192 11 bool LifeCycleCostParameters_Impl::isLengthOfStudyPeriodInYearsDefaulted() const {
193 11 return isEmpty(OS_LifeCycleCost_ParametersFields::LengthofStudyPeriodinYears);
194 }
195
196 856 boost::optional<double> LifeCycleCostParameters_Impl::taxRate() const {
197 856 return getDouble(OS_LifeCycleCost_ParametersFields::TaxRate, true);
198 }
199
200 1 std::string LifeCycleCostParameters_Impl::depreciationMethod() const {
201
1/1
✓ Branch 1 taken 1 time.
1 OptionalString os = getString(OS_LifeCycleCost_ParametersFields::DepreciationMethod, true);
202
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(os);
203
2/4
✓ Branch 1 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 7 not taken.
1 OS_ASSERT(!os->empty());
204
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 return *os;
205 1 }
206
207 856 bool LifeCycleCostParameters_Impl::isDepreciationMethodDefaulted() const {
208 856 return isEmpty(OS_LifeCycleCost_ParametersFields::DepreciationMethod);
209 }
210
211 2647 bool LifeCycleCostParameters_Impl::useNISTFuelEscalationRates() const {
212
1/1
✓ Branch 1 taken 2647 times.
2647 OptionalString os = getString(OS_LifeCycleCost_ParametersFields::UseNISTFuelEscalationRates, true);
213
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 2647 times.
✗ Branch 4 not taken.
2647 OS_ASSERT(os);
214
2/4
✓ Branch 1 taken 2647 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 2647 times.
✗ Branch 7 not taken.
2647 OS_ASSERT(!os->empty());
215
2/2
✓ Branch 1 taken 2647 times.
✓ Branch 4 taken 2647 times.
5294 return ("Yes" == *os);
216 2647 }
217
218 1 bool LifeCycleCostParameters_Impl::isUseNISTFuelEscalationRatesDefaulted() const {
219 1 return isEmpty(OS_LifeCycleCost_ParametersFields::UseNISTFuelEscalationRates);
220 }
221
222 855 boost::optional<std::string> LifeCycleCostParameters_Impl::nistRegion() const {
223 855 boost::optional<std::string> result;
224
2/3
✓ Branch 1 taken 855 times.
✓ Branch 3 taken 855 times.
✗ Branch 4 not taken.
855 if (this->useNISTFuelEscalationRates()) {
225
1/1
✓ Branch 1 taken 855 times.
855 result = getString(OS_LifeCycleCost_ParametersFields::NISTRegion, true);
226 }
227 855 return result;
228 ✗ }
229
230 ✗ std::vector<std::string> LifeCycleCostParameters_Impl::validNistRegionValues() const {
231 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_LifeCycleCost_ParametersFields::NISTRegion);
232 }
233
234 1 bool LifeCycleCostParameters_Impl::isNISTRegionDefaulted() const {
235 1 return isEmpty(OS_LifeCycleCost_ParametersFields::NISTRegion);
236 }
237
238 855 boost::optional<std::string> LifeCycleCostParameters_Impl::nistSector() const {
239 855 boost::optional<std::string> result;
240
2/3
✓ Branch 1 taken 855 times.
✓ Branch 3 taken 855 times.
✗ Branch 4 not taken.
855 if (this->useNISTFuelEscalationRates()) {
241
1/1
✓ Branch 1 taken 855 times.
855 result = getString(OS_LifeCycleCost_ParametersFields::NISTSector, true);
242 }
243 855 return result;
244 ✗ }
245
246 ✗ std::vector<std::string> LifeCycleCostParameters_Impl::validNistSectorValues() const {
247 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_LifeCycleCost_ParametersFields::NISTSector);
248 }
249
250 1 bool LifeCycleCostParameters_Impl::isNISTSectorDefaulted() const {
251 1 return isEmpty(OS_LifeCycleCost_ParametersFields::NISTSector);
252 }
253
254 7 boost::optional<double> LifeCycleCostParameters_Impl::electricityInflation() const {
255 7 boost::optional<double> result;
256
3/3
✓ Branch 1 taken 7 times.
✓ Branch 3 taken 5 times.
✓ Branch 4 taken 2 times.
7 if (!this->useNISTFuelEscalationRates()) {
257
1/1
✓ Branch 1 taken 5 times.
5 result = getDouble(OS_LifeCycleCost_ParametersFields::ElectricityInflation, true);
258
259 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
260 }
261 7 return result;
262 }
263
264 3 boost::optional<double> LifeCycleCostParameters_Impl::naturalGasInflation() const {
265 3 boost::optional<double> result;
266
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
3 if (!this->useNISTFuelEscalationRates()) {
267
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::NaturalGasInflation, true);
268
269 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
270 }
271 3 return result;
272 }
273
274 3 boost::optional<double> LifeCycleCostParameters_Impl::steamInflation() const {
275 3 boost::optional<double> result;
276
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
3 if (!this->useNISTFuelEscalationRates()) {
277
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::SteamInflation, true);
278
279 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
280 }
281 3 return result;
282 }
283
284 3 boost::optional<double> LifeCycleCostParameters_Impl::gasolineInflation() const {
285 3 boost::optional<double> result;
286
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
3 if (!this->useNISTFuelEscalationRates()) {
287
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::GasolineInflation, true);
288
289 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
290 }
291 3 return result;
292 }
293
294 3 boost::optional<double> LifeCycleCostParameters_Impl::dieselInflation() const {
295 3 boost::optional<double> result;
296
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
3 if (!this->useNISTFuelEscalationRates()) {
297
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::DieselInflation, true);
298
299 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
300 }
301 3 return result;
302 }
303
304 3 boost::optional<double> LifeCycleCostParameters_Impl::coalInflation() const {
305 3 boost::optional<double> result;
306
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
3 if (!this->useNISTFuelEscalationRates()) {
307
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::CoalInflation, true);
308
309 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
310 }
311 3 return result;
312 }
313
314 3 boost::optional<double> LifeCycleCostParameters_Impl::fuelOil1Inflation() const {
315 3 boost::optional<double> result;
316
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
3 if (!this->useNISTFuelEscalationRates()) {
317
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::FuelOil1Inflation, true);
318
319 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
320 }
321 3 return result;
322 }
323
324 3 boost::optional<double> LifeCycleCostParameters_Impl::fuelOil2Inflation() const {
325 3 boost::optional<double> result;
326
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
3 if (!this->useNISTFuelEscalationRates()) {
327
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::FuelOil2Inflation, true);
328
329 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
330 }
331 3 return result;
332 }
333
334 3 boost::optional<double> LifeCycleCostParameters_Impl::propaneInflation() const {
335 3 boost::optional<double> result;
336
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
3 if (!this->useNISTFuelEscalationRates()) {
337
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::PropaneInflation, true);
338
339 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
340 }
341 3 return result;
342 }
343
344 3 boost::optional<double> LifeCycleCostParameters_Impl::waterInflation() const {
345 3 boost::optional<double> result;
346
3/3
✓ Branch 1 taken 3 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 time.
3 if (!this->useNISTFuelEscalationRates()) {
347
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::WaterInflation, true);
348
349 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length if no result?
350 }
351 3 return result;
352 }
353
354 // set the parent, child may have to call methods on the parent
355 ✗ bool LifeCycleCostParameters_Impl::setParent(ParentObject& /*newParent*/) {
356 ✗ return false;
357 }
358
359 5 bool LifeCycleCostParameters_Impl::setAnalysisType(const std::string& analysisType) {
360
1/1
✓ Branch 1 taken 5 times.
5 bool changed = (this->analysisType() != analysisType);
361
362 5 bool result = setString(OS_LifeCycleCost_ParametersFields::AnalysisType, analysisType, false);
363
2/4
✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
✗ Branch 3 not taken.
5 if (result && changed) {
364
2/2
✓ Branch 1 taken 2 times.
✓ Branch 2 taken 3 times.
5 if (isFEMPAnalysis()) {
365
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
2 if (isConstantDollarAnalysis()) {
366 // DLM: this call has logic that prevents it from working if isFEMPAnalysis
367 // DLM: don't emit change signals until end
368 //setRealDiscountRate(LifeCycleCostParameters::fempRealDiscountRate());
369 ✗ setDouble(OS_LifeCycleCost_ParametersFields::RealDiscountRate, LifeCycleCostParameters::fempRealDiscountRate(), false);
370 ✗ setString(OS_LifeCycleCost_ParametersFields::NominalDiscountRate, "", false);
371 ✗ setString(OS_LifeCycleCost_ParametersFields::Inflation, "", false);
372 } else {
373 // DLM: this call has logic that prevents it from working if isFEMPAnalysis
374 // DLM: don't emit change signals until end
375 //setNominalDiscountRate(LifeCycleCostParameters::fempNominalDiscountRate());
376 //setInflation(LifeCycleCostParameters::fempInflation());
377
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
4 setString(OS_LifeCycleCost_ParametersFields::RealDiscountRate, "", false);
378 2 setDouble(OS_LifeCycleCost_ParametersFields::NominalDiscountRate, LifeCycleCostParameters::fempNominalDiscountRate(), false);
379 2 setDouble(OS_LifeCycleCost_ParametersFields::Inflation, LifeCycleCostParameters::fempInflation(), false);
380 }
381
382
2/2
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 1 time.
2 if (lengthOfStudyPeriodInYears() > 25) {
383 1 setLengthOfStudyPeriodInYears(25);
384 }
385 }
386 }
387
388 5 emitChangeSignals();
389
390 5 return result;
391 }
392
393 ✗ void LifeCycleCostParameters_Impl::resetAnalysisType() {
394 ✗ bool test = setAnalysisType("FEMP");
395 ✗ OS_ASSERT(test);
396 ✗ test = setString(OS_LifeCycleCost_ParametersFields::AnalysisType, "");
397 ✗ OS_ASSERT(test);
398 ✗ }
399
400 ✗ bool LifeCycleCostParameters_Impl::setDiscountingConvention(const std::string& discountingConvention) {
401 ✗ return setString(OS_LifeCycleCost_ParametersFields::DiscountingConvention, discountingConvention);
402 }
403
404 ✗ void LifeCycleCostParameters_Impl::resetDiscountingConvention() {
405 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::DiscountingConvention, "");
406 ✗ OS_ASSERT(test);
407 ✗ }
408
409 4 bool LifeCycleCostParameters_Impl::setInflationApproach(const std::string& inflationApproach) {
410
1/1
✓ Branch 1 taken 4 times.
4 bool changed = (this->inflationApproach() != inflationApproach);
411
412 4 bool result = setString(OS_LifeCycleCost_ParametersFields::InflationApproach, inflationApproach);
413
3/4
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✓ Branch 3 taken 1 time.
4 if (result && changed) {
414
2/2
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 2 times.
3 if (isConstantDollarAnalysis()) {
415 1 setRealDiscountRate(LifeCycleCostParameters::fempRealDiscountRate());
416
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
2 setString(OS_LifeCycleCost_ParametersFields::NominalDiscountRate, "");
417
2/2
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
3 setString(OS_LifeCycleCost_ParametersFields::Inflation, "");
418 } else {
419
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
4 setString(OS_LifeCycleCost_ParametersFields::RealDiscountRate, "");
420 2 setNominalDiscountRate(LifeCycleCostParameters::fempNominalDiscountRate());
421 2 setInflation(LifeCycleCostParameters::fempInflation());
422 }
423 }
424
425 4 return result;
426 }
427
428 ✗ void LifeCycleCostParameters_Impl::resetInflationApproach() {
429 ✗ bool test = setAnalysisType("ConstantDollar");
430 ✗ OS_ASSERT(test);
431 ✗ test = setString(OS_LifeCycleCost_ParametersFields::AnalysisType, "");
432 ✗ OS_ASSERT(test);
433 ✗ }
434
435 5 bool LifeCycleCostParameters_Impl::setRealDiscountRate(double realDiscountRate) {
436 5 bool result = false;
437
2/2
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
5 if (isConstantDollarAnalysis()) {
438
2/2
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 2 times.
3 if (!isFEMPAnalysis()) {
439 1 result = setDouble(OS_LifeCycleCost_ParametersFields::RealDiscountRate, realDiscountRate);
440 }
441 }
442 5 return result;
443 }
444
445 6 bool LifeCycleCostParameters_Impl::setNominalDiscountRate(double nominalDiscountRate) {
446 6 bool result = false;
447
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 2 times.
6 if (!isConstantDollarAnalysis()) {
448
2/2
✓ Branch 1 taken 2 times.
✓ Branch 2 taken 2 times.
4 if (!isFEMPAnalysis()) {
449 2 result = setDouble(OS_LifeCycleCost_ParametersFields::NominalDiscountRate, nominalDiscountRate);
450 }
451 }
452 6 return result;
453 }
454
455 6 bool LifeCycleCostParameters_Impl::setInflation(double inflation) {
456 6 bool result = false;
457
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 2 times.
6 if (!isConstantDollarAnalysis()) {
458
2/2
✓ Branch 1 taken 2 times.
✓ Branch 2 taken 2 times.
4 if (!isFEMPAnalysis()) {
459 2 result = setDouble(OS_LifeCycleCost_ParametersFields::Inflation, inflation);
460 }
461 }
462 6 return result;
463 }
464
465 ✗ bool LifeCycleCostParameters_Impl::setBaseDateMonth(const MonthOfYear& baseDateMonth) {
466 ✗ return setString(OS_LifeCycleCost_ParametersFields::BaseDateMonth, baseDateMonth.valueDescription());
467 }
468
469 ✗ void LifeCycleCostParameters_Impl::resetBaseDateMonth() {
470 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::BaseDateMonth, "");
471 ✗ OS_ASSERT(test);
472 ✗ }
473
474 ✗ bool LifeCycleCostParameters_Impl::setBaseDateYear(int baseDateYear) {
475 ✗ return setInt(OS_LifeCycleCost_ParametersFields::BaseDateYear, baseDateYear);
476 }
477
478 ✗ void LifeCycleCostParameters_Impl::resetBaseDateYear() {
479 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::BaseDateYear, "");
480 ✗ OS_ASSERT(test);
481 ✗ }
482
483 ✗ bool LifeCycleCostParameters_Impl::setServiceDateMonth(const MonthOfYear& serviceDateMonth) {
484 ✗ return setString(OS_LifeCycleCost_ParametersFields::ServiceDateMonth, serviceDateMonth.valueDescription());
485 }
486
487 ✗ void LifeCycleCostParameters_Impl::resetServiceDateMonth() {
488 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::ServiceDateMonth, "");
489 ✗ OS_ASSERT(test);
490 ✗ }
491
492 ✗ bool LifeCycleCostParameters_Impl::setServiceDateYear(int serviceDateYear) {
493 ✗ return setInt(OS_LifeCycleCost_ParametersFields::ServiceDateYear, serviceDateYear);
494 }
495
496 ✗ void LifeCycleCostParameters_Impl::resetServiceDateYear() {
497 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::ServiceDateYear, "");
498 ✗ OS_ASSERT(test);
499 ✗ }
500
501 10 bool LifeCycleCostParameters_Impl::setLengthOfStudyPeriodInYears(int lengthOfStudyPeriodInYears) {
502 10 bool result = false;
503
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 6 times.
10 if (isFEMPAnalysis()) {
504
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 1 time.
4 if (lengthOfStudyPeriodInYears <= 25) {
505 3 result = setInt(OS_LifeCycleCost_ParametersFields::LengthofStudyPeriodinYears, lengthOfStudyPeriodInYears);
506 }
507
2/2
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 3 times.
6 } else if (useNISTFuelEscalationRates()) {
508
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
3 if (lengthOfStudyPeriodInYears <= 30) {
509 2 result = setInt(OS_LifeCycleCost_ParametersFields::LengthofStudyPeriodinYears, lengthOfStudyPeriodInYears);
510 }
511 } else {
512 3 result = setInt(OS_LifeCycleCost_ParametersFields::LengthofStudyPeriodinYears, lengthOfStudyPeriodInYears);
513 }
514 10 return result;
515 }
516
517 ✗ void LifeCycleCostParameters_Impl::resetLengthOfStudyPeriodInYears() {
518 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::LengthofStudyPeriodinYears, "");
519 ✗ OS_ASSERT(test);
520 ✗ }
521
522 ✗ bool LifeCycleCostParameters_Impl::setTaxRate(double TaxRate) {
523 ✗ return setDouble(OS_LifeCycleCost_ParametersFields::TaxRate, TaxRate);
524 }
525
526 ✗ void LifeCycleCostParameters_Impl::resetTaxRate() {
527 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::TaxRate, "");
528 ✗ OS_ASSERT(test);
529 ✗ }
530
531 ✗ bool LifeCycleCostParameters_Impl::setDepreciationMethod(const std::string& depreciationMethod) {
532 ✗ return setString(OS_LifeCycleCost_ParametersFields::DepreciationMethod, depreciationMethod);
533 }
534
535 ✗ void LifeCycleCostParameters_Impl::resetDepreciationMethod() {
536 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::DepreciationMethod, "");
537 ✗ OS_ASSERT(test);
538 ✗ }
539
540 4 bool LifeCycleCostParameters_Impl::setUseNISTFuelEscalationRates(bool useNISTFuelEscalationRates) {
541 4 bool changed = (useNISTFuelEscalationRates != this->useNISTFuelEscalationRates());
542
543 4 bool result = false;
544
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
4 if (useNISTFuelEscalationRates) {
545
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
4 result = setString(OS_LifeCycleCost_ParametersFields::UseNISTFuelEscalationRates, "Yes");
546
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
2 OS_ASSERT(result);
547
548
2/2
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 1 time.
2 if (lengthOfStudyPeriodInYears() > 30) {
549 1 setLengthOfStudyPeriodInYears(30);
550 }
551 } else {
552
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
4 result = setString(OS_LifeCycleCost_ParametersFields::UseNISTFuelEscalationRates, "No");
553
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
2 OS_ASSERT(result);
554 }
555
556 // DLM: provide "equivalent" FEMP fuel escalation rates based on nist data and analysis length?
557
558
2/2
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 1 time.
4 if (changed) {
559
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::NISTRegion, "");
560
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
561
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::NISTSector, "");
562
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
563
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::ElectricityInflation, "");
564
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
565
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::NaturalGasInflation, "");
566
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
567
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::SteamInflation, "");
568
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
569
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::GasolineInflation, "");
570
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
571
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::DieselInflation, "");
572
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
573
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::CoalInflation, "");
574
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
575
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::FuelOil1Inflation, "");
576
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
577
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::FuelOil2Inflation, "");
578
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
579
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::PropaneInflation, "");
580
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
581
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::WaterInflation, "");
582
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
583
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::OtherFuel1Inflation, "");
584
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
585
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 result = setString(OS_LifeCycleCost_ParametersFields::OtherFuel2Inflation, "");
586
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
3 OS_ASSERT(result);
587 }
588
589 4 return result;
590 }
591
592 ✗ void LifeCycleCostParameters_Impl::resetUseNISTFuelEscalationRates() {
593 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::UseNISTFuelEscalationRates, "");
594 ✗ OS_ASSERT(test);
595 ✗ }
596
597 15 bool LifeCycleCostParameters_Impl::setNISTRegion(const std::string& nistRegion) {
598 15 bool result = false;
599
1/2
✓ Branch 1 taken 15 times.
✗ Branch 2 not taken.
15 if (useNISTFuelEscalationRates()) {
600 15 result = setString(OS_LifeCycleCost_ParametersFields::NISTRegion, nistRegion);
601 }
602 15 return result;
603 }
604
605 ✗ void LifeCycleCostParameters_Impl::resetNISTRegion() {
606 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::NISTRegion, "");
607 ✗ OS_ASSERT(test);
608 ✗ }
609
610 15 bool LifeCycleCostParameters_Impl::setNISTSector(const std::string& nistSector) {
611 15 bool result = false;
612
1/2
✓ Branch 1 taken 15 times.
✗ Branch 2 not taken.
15 if (useNISTFuelEscalationRates()) {
613 15 result = setString(OS_LifeCycleCost_ParametersFields::NISTSector, nistSector);
614 }
615 15 return result;
616 }
617
618 ✗ void LifeCycleCostParameters_Impl::resetNISTSector() {
619 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::NISTSector, "");
620 ✗ OS_ASSERT(test);
621 ✗ }
622
623 3 bool LifeCycleCostParameters_Impl::setElectricityInflation(double electricityInflation) {
624 3 bool result = false;
625
2/2
✓ Branch 1 taken 2 times.
✓ Branch 2 taken 1 time.
3 if (!useNISTFuelEscalationRates()) {
626 2 result = setDouble(OS_LifeCycleCost_ParametersFields::ElectricityInflation, electricityInflation);
627 }
628 3 return result;
629 }
630
631 ✗ void LifeCycleCostParameters_Impl::resetElectricityInflation() {
632 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::ElectricityInflation, "");
633 ✗ OS_ASSERT(test);
634 ✗ }
635
636 ✗ bool LifeCycleCostParameters_Impl::setNaturalGasInflation(double naturalGasInflation) {
637 ✗ bool result = false;
638 ✗ if (!useNISTFuelEscalationRates()) {
639 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::NaturalGasInflation, naturalGasInflation);
640 }
641 ✗ return result;
642 }
643
644 ✗ void LifeCycleCostParameters_Impl::resetNaturalGasInflation() {
645 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::NaturalGasInflation, "");
646 ✗ OS_ASSERT(test);
647 ✗ }
648
649 ✗ bool LifeCycleCostParameters_Impl::setSteamInflation(double steamInflation) {
650 ✗ bool result = false;
651 ✗ if (!useNISTFuelEscalationRates()) {
652 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::SteamInflation, steamInflation);
653 }
654 ✗ return result;
655 }
656
657 ✗ void LifeCycleCostParameters_Impl::resetSteamInflation() {
658 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::SteamInflation, "");
659 ✗ OS_ASSERT(test);
660 ✗ }
661
662 ✗ bool LifeCycleCostParameters_Impl::setGasolineInflation(double gasolineInflation) {
663 ✗ bool result = false;
664 ✗ if (!useNISTFuelEscalationRates()) {
665 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::GasolineInflation, gasolineInflation);
666 }
667 ✗ return result;
668 }
669
670 ✗ void LifeCycleCostParameters_Impl::resetGasolineInflation() {
671 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::GasolineInflation, "");
672 ✗ OS_ASSERT(test);
673 ✗ }
674
675 ✗ bool LifeCycleCostParameters_Impl::setDieselInflation(double dieselInflation) {
676 ✗ bool result = false;
677 ✗ if (!useNISTFuelEscalationRates()) {
678 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::DieselInflation, dieselInflation);
679 }
680 ✗ return result;
681 }
682
683 ✗ void LifeCycleCostParameters_Impl::resetDieselInflation() {
684 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::DieselInflation, "");
685 ✗ OS_ASSERT(test);
686 ✗ }
687
688 ✗ bool LifeCycleCostParameters_Impl::setCoalInflation(double coalInflation) {
689 ✗ bool result = false;
690 ✗ if (!useNISTFuelEscalationRates()) {
691 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::CoalInflation, coalInflation);
692 }
693 ✗ return result;
694 }
695
696 ✗ void LifeCycleCostParameters_Impl::resetCoalInflation() {
697 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::CoalInflation, "");
698 ✗ OS_ASSERT(test);
699 ✗ }
700
701 ✗ bool LifeCycleCostParameters_Impl::setFuelOil1Inflation(double fuelOil1Inflation) {
702 ✗ bool result = false;
703 ✗ if (!useNISTFuelEscalationRates()) {
704 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::FuelOil1Inflation, fuelOil1Inflation);
705 }
706 ✗ return result;
707 }
708
709 ✗ void LifeCycleCostParameters_Impl::resetFuelOil1Inflation() {
710 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::FuelOil1Inflation, "");
711 ✗ OS_ASSERT(test);
712 ✗ }
713
714 ✗ bool LifeCycleCostParameters_Impl::setFuelOil2Inflation(double fuelOil2Inflation) {
715 ✗ bool result = false;
716 ✗ if (!useNISTFuelEscalationRates()) {
717 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::FuelOil2Inflation, fuelOil2Inflation);
718 }
719 ✗ return result;
720 }
721
722 ✗ void LifeCycleCostParameters_Impl::resetFuelOil2Inflation() {
723 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::FuelOil2Inflation, "");
724 ✗ OS_ASSERT(test);
725 ✗ }
726
727 ✗ bool LifeCycleCostParameters_Impl::setPropaneInflation(double propaneInflation) {
728 ✗ bool result = false;
729 ✗ if (!useNISTFuelEscalationRates()) {
730 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::PropaneInflation, propaneInflation);
731 }
732 ✗ return result;
733 }
734
735 ✗ void LifeCycleCostParameters_Impl::resetPropaneInflation() {
736 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::PropaneInflation, "");
737 ✗ OS_ASSERT(test);
738 ✗ }
739
740 ✗ bool LifeCycleCostParameters_Impl::setWaterInflation(double waterInflation) {
741 ✗ bool result = false;
742 ✗ if (!useNISTFuelEscalationRates()) {
743 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::WaterInflation, waterInflation);
744 }
745 ✗ return result;
746 }
747
748 ✗ void LifeCycleCostParameters_Impl::resetWaterInflation() {
749 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::WaterInflation, "");
750 ✗ OS_ASSERT(test);
751 ✗ }
752
753 2 boost::optional<double> LifeCycleCostParameters_Impl::otherFuel1Inflation() const {
754 2 boost::optional<double> result;
755
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
2 if (!this->useNISTFuelEscalationRates()) {
756
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::OtherFuel1Inflation, true);
757 }
758 2 return result;
759 }
760
761 ✗ bool LifeCycleCostParameters_Impl::setOtherFuel1Inflation(double otherFuel1Inflation) {
762 ✗ bool result = false;
763 ✗ if (!useNISTFuelEscalationRates()) {
764 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::OtherFuel1Inflation, otherFuel1Inflation);
765 }
766 ✗ return result;
767 }
768
769 ✗ void LifeCycleCostParameters_Impl::resetOtherFuel1Inflation() {
770 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::OtherFuel1Inflation, "");
771 ✗ OS_ASSERT(test);
772 ✗ }
773
774 2 boost::optional<double> LifeCycleCostParameters_Impl::otherFuel2Inflation() const {
775 2 boost::optional<double> result;
776
2/3
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
2 if (!this->useNISTFuelEscalationRates()) {
777
1/1
✓ Branch 1 taken 2 times.
2 result = getDouble(OS_LifeCycleCost_ParametersFields::OtherFuel2Inflation, true);
778 }
779 2 return result;
780 }
781
782 ✗ bool LifeCycleCostParameters_Impl::setOtherFuel2Inflation(double otherFuel2Inflation) {
783 ✗ bool result = false;
784 ✗ if (!useNISTFuelEscalationRates()) {
785 ✗ result = setDouble(OS_LifeCycleCost_ParametersFields::OtherFuel2Inflation, otherFuel2Inflation);
786 }
787 ✗ return result;
788 }
789
790 ✗ void LifeCycleCostParameters_Impl::resetOtherFuel2Inflation() {
791 ✗ bool test = setString(OS_LifeCycleCost_ParametersFields::OtherFuel2Inflation, "");
792 ✗ OS_ASSERT(test);
793 ✗ }
794
795 } // namespace detail
796
797 /// constructor
798 908 LifeCycleCostParameters::LifeCycleCostParameters(const Model& model) : ParentObject(LifeCycleCostParameters::iddObjectType(), model) {
799
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 908 times.
✗ Branch 5 not taken.
908 OS_ASSERT(getImpl<detail::LifeCycleCostParameters_Impl>());
800 908 }
801
802 // constructor
803
1/1
✓ Branch 3 taken 880 times.
880 LifeCycleCostParameters::LifeCycleCostParameters(std::shared_ptr<detail::LifeCycleCostParameters_Impl> impl) : ParentObject(std::move(impl)) {}
804
805 1714 int LifeCycleCostParameters::nistYear() {
806 1714 return 2011;
807 }
808
809 862 double LifeCycleCostParameters::fempRealDiscountRate() {
810 862 return 0.03;
811 }
812
813 8 double LifeCycleCostParameters::fempNominalDiscountRate() {
814 8 return 0.035;
815 }
816
817 8 double LifeCycleCostParameters::fempInflation() {
818 8 return 0.005;
819 }
820
821 ✗ std::string LifeCycleCostParameters::analysisType() const {
822 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->analysisType();
823 }
824
825 ✗ bool LifeCycleCostParameters::isAnalysisTypeDefaulted() const {
826 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->isAnalysisTypeDefaulted();
827 }
828
829 1 bool LifeCycleCostParameters::isFEMPAnalysis() const {
830
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->isFEMPAnalysis();
831 }
832
833 856 std::string LifeCycleCostParameters::discountingConvention() const {
834
1/1
✓ Branch 3 taken 856 times.
856 return getImpl<detail::LifeCycleCostParameters_Impl>()->discountingConvention();
835 }
836
837 1 bool LifeCycleCostParameters::isDiscountingConventionDefaulted() const {
838
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->isDiscountingConventionDefaulted();
839 }
840
841 856 std::string LifeCycleCostParameters::inflationApproach() const {
842
1/1
✓ Branch 3 taken 856 times.
856 return getImpl<detail::LifeCycleCostParameters_Impl>()->inflationApproach();
843 }
844
845 3 bool LifeCycleCostParameters::isInflationApproachDefaulted() const {
846
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->isInflationApproachDefaulted();
847 }
848
849 3 bool LifeCycleCostParameters::isConstantDollarAnalysis() const {
850
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->isConstantDollarAnalysis();
851 }
852
853 866 boost::optional<double> LifeCycleCostParameters::realDiscountRate() const {
854
1/1
✓ Branch 3 taken 866 times.
866 return getImpl<detail::LifeCycleCostParameters_Impl>()->realDiscountRate();
855 }
856
857 865 boost::optional<double> LifeCycleCostParameters::nominalDiscountRate() const {
858
1/1
✓ Branch 3 taken 865 times.
865 return getImpl<detail::LifeCycleCostParameters_Impl>()->nominalDiscountRate();
859 }
860
861 865 boost::optional<double> LifeCycleCostParameters::inflation() const {
862
1/1
✓ Branch 3 taken 865 times.
865 return getImpl<detail::LifeCycleCostParameters_Impl>()->inflation();
863 }
864
865 1 MonthOfYear LifeCycleCostParameters::baseDateMonth() const {
866
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->baseDateMonth();
867 }
868
869 858 bool LifeCycleCostParameters::isBaseDateMonthDefaulted() const {
870
1/1
✓ Branch 3 taken 858 times.
858 return getImpl<detail::LifeCycleCostParameters_Impl>()->isBaseDateMonthDefaulted();
871 }
872
873 858 int LifeCycleCostParameters::baseDateYear() const {
874
1/1
✓ Branch 3 taken 858 times.
858 return getImpl<detail::LifeCycleCostParameters_Impl>()->baseDateYear();
875 }
876
877 1 bool LifeCycleCostParameters::isBaseDateYearDefaulted() const {
878
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->isBaseDateYearDefaulted();
879 }
880
881 1 MonthOfYear LifeCycleCostParameters::serviceDateMonth() const {
882
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->serviceDateMonth();
883 }
884
885 856 bool LifeCycleCostParameters::isServiceDateMonthDefaulted() const {
886
1/1
✓ Branch 3 taken 856 times.
856 return getImpl<detail::LifeCycleCostParameters_Impl>()->isServiceDateMonthDefaulted();
887 }
888
889 856 int LifeCycleCostParameters::serviceDateYear() const {
890
1/1
✓ Branch 3 taken 856 times.
856 return getImpl<detail::LifeCycleCostParameters_Impl>()->serviceDateYear();
891 }
892
893 1 bool LifeCycleCostParameters::isServiceDateYearDefaulted() const {
894
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->isServiceDateYearDefaulted();
895 }
896
897 884 int LifeCycleCostParameters::lengthOfStudyPeriodInYears() const {
898
1/1
✓ Branch 3 taken 884 times.
884 return getImpl<detail::LifeCycleCostParameters_Impl>()->lengthOfStudyPeriodInYears();
899 }
900
901 11 bool LifeCycleCostParameters::isLengthOfStudyPeriodInYearsDefaulted() const {
902
1/1
✓ Branch 3 taken 11 times.
11 return getImpl<detail::LifeCycleCostParameters_Impl>()->isLengthOfStudyPeriodInYearsDefaulted();
903 }
904
905 856 boost::optional<double> LifeCycleCostParameters::taxRate() const {
906
1/1
✓ Branch 3 taken 856 times.
856 return getImpl<detail::LifeCycleCostParameters_Impl>()->taxRate();
907 }
908
909 1 std::string LifeCycleCostParameters::depreciationMethod() const {
910
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->depreciationMethod();
911 }
912
913 856 bool LifeCycleCostParameters::isDepreciationMethodDefaulted() const {
914
1/1
✓ Branch 3 taken 856 times.
856 return getImpl<detail::LifeCycleCostParameters_Impl>()->isDepreciationMethodDefaulted();
915 }
916
917 856 bool LifeCycleCostParameters::useNISTFuelEscalationRates() const {
918
1/1
✓ Branch 3 taken 856 times.
856 return getImpl<detail::LifeCycleCostParameters_Impl>()->useNISTFuelEscalationRates();
919 }
920
921 1 bool LifeCycleCostParameters::isUseNISTFuelEscalationRatesDefaulted() const {
922
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->isUseNISTFuelEscalationRatesDefaulted();
923 }
924
925 855 boost::optional<std::string> LifeCycleCostParameters::nistRegion() const {
926
1/1
✓ Branch 3 taken 855 times.
855 return getImpl<detail::LifeCycleCostParameters_Impl>()->nistRegion();
927 }
928
929 ✗ std::vector<std::string> LifeCycleCostParameters::validNistRegionValues() const {
930 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->validNistRegionValues();
931 }
932
933 1 bool LifeCycleCostParameters::isNISTRegionDefaulted() const {
934
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->isNISTRegionDefaulted();
935 }
936
937 855 boost::optional<std::string> LifeCycleCostParameters::nistSector() const {
938
1/1
✓ Branch 3 taken 855 times.
855 return getImpl<detail::LifeCycleCostParameters_Impl>()->nistSector();
939 }
940
941 ✗ std::vector<std::string> LifeCycleCostParameters::validNistSectorValues() const {
942 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->validNistSectorValues();
943 }
944
945 1 bool LifeCycleCostParameters::isNISTSectorDefaulted() const {
946
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::LifeCycleCostParameters_Impl>()->isNISTSectorDefaulted();
947 }
948
949 7 boost::optional<double> LifeCycleCostParameters::electricityInflation() const {
950
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::LifeCycleCostParameters_Impl>()->electricityInflation();
951 }
952
953 3 boost::optional<double> LifeCycleCostParameters::naturalGasInflation() const {
954
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->naturalGasInflation();
955 }
956
957 3 boost::optional<double> LifeCycleCostParameters::steamInflation() const {
958
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->steamInflation();
959 }
960
961 3 boost::optional<double> LifeCycleCostParameters::gasolineInflation() const {
962
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->gasolineInflation();
963 }
964
965 3 boost::optional<double> LifeCycleCostParameters::dieselInflation() const {
966
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->dieselInflation();
967 }
968
969 3 boost::optional<double> LifeCycleCostParameters::coalInflation() const {
970
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->coalInflation();
971 }
972
973 3 boost::optional<double> LifeCycleCostParameters::fuelOil1Inflation() const {
974
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->fuelOil1Inflation();
975 }
976
977 3 boost::optional<double> LifeCycleCostParameters::fuelOil2Inflation() const {
978
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->fuelOil2Inflation();
979 }
980
981 3 boost::optional<double> LifeCycleCostParameters::propaneInflation() const {
982
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->propaneInflation();
983 }
984
985 3 boost::optional<double> LifeCycleCostParameters::waterInflation() const {
986
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->waterInflation();
987 }
988
989 5 bool LifeCycleCostParameters::setAnalysisType(const std::string& analysisType) {
990
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::LifeCycleCostParameters_Impl>()->setAnalysisType(analysisType);
991 }
992
993 ✗ void LifeCycleCostParameters::resetAnalysisType() {
994 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetAnalysisType();
995 ✗ }
996
997 ✗ bool LifeCycleCostParameters::setDiscountingConvention(const std::string& discountingConvention) {
998 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setDiscountingConvention(discountingConvention);
999 }
1000
1001 ✗ void LifeCycleCostParameters::resetDiscountingConvention() {
1002 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetDiscountingConvention();
1003 ✗ }
1004
1005 4 bool LifeCycleCostParameters::setInflationApproach(const std::string& inflationApproach) {
1006
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::LifeCycleCostParameters_Impl>()->setInflationApproach(inflationApproach);
1007 }
1008
1009 ✗ void LifeCycleCostParameters::resetInflationApproach() {
1010 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetInflationApproach();
1011 ✗ }
1012
1013 4 bool LifeCycleCostParameters::setRealDiscountRate(double realDiscountRate) {
1014
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::LifeCycleCostParameters_Impl>()->setRealDiscountRate(realDiscountRate);
1015 }
1016
1017 4 bool LifeCycleCostParameters::setNominalDiscountRate(double nominalDiscountRate) {
1018
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::LifeCycleCostParameters_Impl>()->setNominalDiscountRate(nominalDiscountRate);
1019 }
1020
1021 4 bool LifeCycleCostParameters::setInflation(double inflation) {
1022
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::LifeCycleCostParameters_Impl>()->setInflation(inflation);
1023 }
1024
1025 ✗ bool LifeCycleCostParameters::setBaseDateMonth(const MonthOfYear& baseDateMonth) {
1026 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setBaseDateMonth(baseDateMonth);
1027 }
1028
1029 ✗ void LifeCycleCostParameters::resetBaseDateMonth() {
1030 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetBaseDateMonth();
1031 ✗ }
1032
1033 ✗ bool LifeCycleCostParameters::setBaseDateYear(int baseDateYear) {
1034 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setBaseDateYear(baseDateYear);
1035 }
1036
1037 ✗ void LifeCycleCostParameters::resetBaseDateYear() {
1038 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetBaseDateYear();
1039 ✗ }
1040
1041 ✗ bool LifeCycleCostParameters::setServiceDateMonth(const MonthOfYear& serviceDateMonth) {
1042 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setServiceDateMonth(serviceDateMonth);
1043 }
1044
1045 ✗ void LifeCycleCostParameters::resetServiceDateMonth() {
1046 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetServiceDateMonth();
1047 ✗ }
1048
1049 ✗ bool LifeCycleCostParameters::setServiceDateYear(int serviceDateYear) {
1050 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setServiceDateYear(serviceDateYear);
1051 }
1052
1053 ✗ void LifeCycleCostParameters::resetServiceDateYear() {
1054 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetServiceDateYear();
1055 ✗ }
1056
1057 8 bool LifeCycleCostParameters::setLengthOfStudyPeriodInYears(int lengthOfStudyPeriodInYears) {
1058
1/1
✓ Branch 3 taken 8 times.
8 return getImpl<detail::LifeCycleCostParameters_Impl>()->setLengthOfStudyPeriodInYears(lengthOfStudyPeriodInYears);
1059 }
1060
1061 ✗ void LifeCycleCostParameters::resetLengthOfStudyPeriodInYears() {
1062 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetLengthOfStudyPeriodInYears();
1063 ✗ }
1064
1065 ✗ bool LifeCycleCostParameters::setTaxRate(double taxRate) {
1066 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setTaxRate(taxRate);
1067 }
1068
1069 ✗ void LifeCycleCostParameters::resetTaxRate() {
1070 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetTaxRate();
1071 ✗ }
1072
1073 ✗ bool LifeCycleCostParameters::setDepreciationMethod(const std::string& depreciationMethod) {
1074 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setDepreciationMethod(depreciationMethod);
1075 }
1076
1077 ✗ void LifeCycleCostParameters::resetDepreciationMethod() {
1078 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetDepreciationMethod();
1079 ✗ }
1080
1081 4 bool LifeCycleCostParameters::setUseNISTFuelEscalationRates(bool useNISTFuelEscalationRates) {
1082
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::LifeCycleCostParameters_Impl>()->setUseNISTFuelEscalationRates(useNISTFuelEscalationRates);
1083 }
1084
1085 ✗ void LifeCycleCostParameters::resetUseNISTFuelEscalationRates() {
1086 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetUseNISTFuelEscalationRates();
1087 ✗ }
1088
1089 15 bool LifeCycleCostParameters::setNISTRegion(const std::string& nistRegion) {
1090
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::LifeCycleCostParameters_Impl>()->setNISTRegion(nistRegion);
1091 }
1092
1093 ✗ void LifeCycleCostParameters::resetNISTRegion() {
1094 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetNISTRegion();
1095 ✗ }
1096
1097 15 bool LifeCycleCostParameters::setNISTSector(const std::string& nistSector) {
1098
1/1
✓ Branch 3 taken 15 times.
15 return getImpl<detail::LifeCycleCostParameters_Impl>()->setNISTSector(nistSector);
1099 }
1100
1101 ✗ void LifeCycleCostParameters::resetNISTSector() {
1102 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetNISTSector();
1103 ✗ }
1104
1105 3 bool LifeCycleCostParameters::setElectricityInflation(double electricityInflation) {
1106
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::LifeCycleCostParameters_Impl>()->setElectricityInflation(electricityInflation);
1107 }
1108
1109 ✗ void LifeCycleCostParameters::resetElectricityInflation() {
1110 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetElectricityInflation();
1111 ✗ }
1112
1113 ✗ bool LifeCycleCostParameters::setNaturalGasInflation(double naturalGasInflation) {
1114 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setNaturalGasInflation(naturalGasInflation);
1115 }
1116
1117 ✗ void LifeCycleCostParameters::resetNaturalGasInflation() {
1118 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetNaturalGasInflation();
1119 ✗ }
1120
1121 ✗ bool LifeCycleCostParameters::setSteamInflation(double steamInflation) {
1122 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setSteamInflation(steamInflation);
1123 }
1124
1125 ✗ void LifeCycleCostParameters::resetSteamInflation() {
1126 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetSteamInflation();
1127 ✗ }
1128
1129 ✗ bool LifeCycleCostParameters::setGasolineInflation(double gasolineInflation) {
1130 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setGasolineInflation(gasolineInflation);
1131 }
1132
1133 ✗ void LifeCycleCostParameters::resetGasolineInflation() {
1134 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetGasolineInflation();
1135 ✗ }
1136
1137 ✗ bool LifeCycleCostParameters::setDieselInflation(double dieselInflation) {
1138 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setDieselInflation(dieselInflation);
1139 }
1140
1141 ✗ void LifeCycleCostParameters::resetDieselInflation() {
1142 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetDieselInflation();
1143 ✗ }
1144
1145 ✗ bool LifeCycleCostParameters::setCoalInflation(double coalInflation) {
1146 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setCoalInflation(coalInflation);
1147 }
1148
1149 ✗ void LifeCycleCostParameters::resetCoalInflation() {
1150 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetCoalInflation();
1151 ✗ }
1152
1153 ✗ bool LifeCycleCostParameters::setFuelOil1Inflation(double fuelOil1Inflation) {
1154 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setFuelOil1Inflation(fuelOil1Inflation);
1155 }
1156
1157 ✗ void LifeCycleCostParameters::resetFuelOil1Inflation() {
1158 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetFuelOil1Inflation();
1159 ✗ }
1160
1161 ✗ bool LifeCycleCostParameters::setFuelOil2Inflation(double fuelOil2Inflation) {
1162 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setFuelOil2Inflation(fuelOil2Inflation);
1163 }
1164
1165 ✗ void LifeCycleCostParameters::resetFuelOil2Inflation() {
1166 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetFuelOil2Inflation();
1167 ✗ }
1168
1169 ✗ bool LifeCycleCostParameters::setPropaneInflation(double propaneInflation) {
1170 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setPropaneInflation(propaneInflation);
1171 }
1172
1173 ✗ void LifeCycleCostParameters::resetPropaneInflation() {
1174 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetPropaneInflation();
1175 ✗ }
1176
1177 ✗ bool LifeCycleCostParameters::setWaterInflation(double waterInflation) {
1178 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setWaterInflation(waterInflation);
1179 }
1180
1181 ✗ void LifeCycleCostParameters::resetWaterInflation() {
1182 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetWaterInflation();
1183 ✗ }
1184
1185 2 boost::optional<double> LifeCycleCostParameters::otherFuel1Inflation() const {
1186
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::LifeCycleCostParameters_Impl>()->otherFuel1Inflation();
1187 }
1188
1189 ✗ bool LifeCycleCostParameters::setOtherFuel1Inflation(double otherFuel1Inflation) {
1190 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setOtherFuel1Inflation(otherFuel1Inflation);
1191 }
1192
1193 ✗ void LifeCycleCostParameters::resetOtherFuel1Inflation() {
1194 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetOtherFuel1Inflation();
1195 ✗ }
1196
1197 2 boost::optional<double> LifeCycleCostParameters::otherFuel2Inflation() const {
1198
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::LifeCycleCostParameters_Impl>()->otherFuel2Inflation();
1199 }
1200
1201 ✗ bool LifeCycleCostParameters::setOtherFuel2Inflation(double otherFuel2Inflation) {
1202 ✗ return getImpl<detail::LifeCycleCostParameters_Impl>()->setOtherFuel2Inflation(otherFuel2Inflation);
1203 }
1204
1205 ✗ void LifeCycleCostParameters::resetOtherFuel2Inflation() {
1206 ✗ getImpl<detail::LifeCycleCostParameters_Impl>()->resetOtherFuel2Inflation();
1207 ✗ }
1208
1209 ✗ std::vector<std::string> LifeCycleCostParameters::validAnalysisTypeValues() {
1210 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_LifeCycleCost_ParametersFields::AnalysisType);
1211 }
1212
1213 ✗ std::vector<std::string> LifeCycleCostParameters::validDiscountingConventionValues() {
1214 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_LifeCycleCost_ParametersFields::DiscountingConvention);
1215 }
1216
1217 ✗ std::vector<std::string> LifeCycleCostParameters::validInflationApproachValues() {
1218 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_LifeCycleCost_ParametersFields::InflationApproach);
1219 }
1220
1221 ✗ std::vector<std::string> LifeCycleCostParameters::validDepreciationMethodValues() {
1222 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_LifeCycleCost_ParametersFields::DepreciationMethod);
1223 }
1224
1225 11246 IddObjectType LifeCycleCostParameters::iddObjectType() {
1226
1/1
✓ Branch 1 taken 11246 times.
11246 IddObjectType result(IddObjectType::OS_LifeCycleCost_Parameters);
1227 11246 return result;
1228 }
1229
1230 } // namespace model
1231 } // namespace openstudio
1232