GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 33.3% 1 / 0 / 3
Functions: 50.0% 1 / 0 / 2
Branches: -% 0 / 0 / 0

src/model/LifeCycleCostParameters_Impl.hpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #ifndef MODEL_LIFECYCLECOSTPARAMETERS_IMPL_HPP
7 #define MODEL_LIFECYCLECOSTPARAMETERS_IMPL_HPP
8
9 #include "ParentObject_Impl.hpp"
10 #include "LifeCycleCostParameters.hpp"
11 #include "../utilities/core/Optional.hpp"
12
13 namespace openstudio {
14
15 class MonthOfYear;
16
17 namespace model {
18
19 namespace detail {
20
21 class MODEL_API LifeCycleCostParameters_Impl : public ParentObject_Impl
22 {
23 public:
24 /** @name Constructors and Destructors */
25 //@{
26
27 // constructor
28 LifeCycleCostParameters_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle);
29
30 // construct from workspace
31 LifeCycleCostParameters_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle);
32
33 // clone copy constructor
34 LifeCycleCostParameters_Impl(const LifeCycleCostParameters_Impl& other, Model_Impl* model, bool keepHandle);
35
36 // virtual destructor
37 1070 virtual ~LifeCycleCostParameters_Impl() override = default;
38
39 //@}
40 /** @name Getters */
41 //@{
42
43 // return the parent object in the hierarchy
44 virtual boost::optional<ParentObject> parent() const override;
45
46 // return any children objects in the hierarchy
47 virtual std::vector<ModelObject> children() const override;
48
49 /// get a vector of allowable children types
50 virtual std::vector<IddObjectType> allowableChildTypes() const override;
51
52 // Get all output variable names that could be associated with this object.
53 virtual const std::vector<std::string>& outputVariableNames() const override;
54
55 ✗ virtual IddObjectType iddObjectType() const override {
56 ✗ return LifeCycleCostParameters::iddObjectType();
57 }
58
59 std::string analysisType() const;
60
61 bool isAnalysisTypeDefaulted() const;
62
63 /// returns true if analysis type is FEMP
64 bool isFEMPAnalysis() const;
65
66 std::string discountingConvention() const;
67
68 bool isDiscountingConventionDefaulted() const;
69
70 std::string inflationApproach() const;
71
72 bool isInflationApproachDefaulted() const;
73
74 bool isConstantDollarAnalysis() const;
75
76 boost::optional<double> realDiscountRate() const;
77
78 boost::optional<double> nominalDiscountRate() const;
79
80 boost::optional<double> inflation() const;
81
82 MonthOfYear baseDateMonth() const;
83
84 bool isBaseDateMonthDefaulted() const;
85
86 int baseDateYear() const;
87
88 bool isBaseDateYearDefaulted() const;
89
90 MonthOfYear serviceDateMonth() const;
91
92 bool isServiceDateMonthDefaulted() const;
93
94 int serviceDateYear() const;
95
96 bool isServiceDateYearDefaulted() const;
97
98 int lengthOfStudyPeriodInYears() const;
99
100 bool isLengthOfStudyPeriodInYearsDefaulted() const;
101
102 boost::optional<double> taxRate() const;
103
104 std::string depreciationMethod() const;
105
106 bool isDepreciationMethodDefaulted() const;
107
108 bool useNISTFuelEscalationRates() const;
109
110 bool isUseNISTFuelEscalationRatesDefaulted() const;
111
112 boost::optional<std::string> nistRegion() const;
113
114 std::vector<std::string> validNistRegionValues() const;
115
116 bool isNISTRegionDefaulted() const;
117
118 boost::optional<std::string> nistSector() const;
119
120 std::vector<std::string> validNistSectorValues() const;
121
122 bool isNISTSectorDefaulted() const;
123
124 boost::optional<double> electricityInflation() const;
125
126 boost::optional<double> naturalGasInflation() const;
127
128 boost::optional<double> steamInflation() const;
129
130 boost::optional<double> gasolineInflation() const;
131
132 boost::optional<double> dieselInflation() const;
133
134 boost::optional<double> coalInflation() const;
135
136 boost::optional<double> fuelOil1Inflation() const;
137
138 boost::optional<double> fuelOil2Inflation() const;
139
140 boost::optional<double> propaneInflation() const;
141
142 boost::optional<double> waterInflation() const;
143
144 boost::optional<double> otherFuel1Inflation() const;
145
146 boost::optional<double> otherFuel2Inflation() const;
147
148 //@}
149 /** @name Setters */
150 //@{
151
152 // set the parent, child may have to call methods on the parent
153 virtual bool setParent(ParentObject& newParent) override;
154
155 bool setAnalysisType(const std::string& analysisType);
156
157 void resetAnalysisType();
158
159 bool setDiscountingConvention(const std::string& discountingConvention);
160
161 void resetDiscountingConvention();
162
163 bool setInflationApproach(const std::string& inflationApproach);
164
165 void resetInflationApproach();
166
167 /// This cannot be set when analysis type is FEMP or when inflation approach is "CurrentDollar"
168 bool setRealDiscountRate(double realDiscountRate);
169
170 /// This cannot be set when analysis type is FEMP or when inflation approach is "ConstantDollar"
171 bool setNominalDiscountRate(double nominalDiscountRate);
172
173 /// This cannot be set when analysis type is FEMP or when inflation approach is "ConstantDollar"
174 bool setInflation(double inflation);
175
176 bool setBaseDateMonth(const MonthOfYear& baseDateMonth);
177
178 void resetBaseDateMonth();
179
180 bool setBaseDateYear(int baseDateYear);
181
182 void resetBaseDateYear();
183
184 bool setServiceDateMonth(const MonthOfYear& serviceDateMonth);
185
186 void resetServiceDateMonth();
187
188 bool setServiceDateYear(int serviceDateYear);
189
190 void resetServiceDateYear();
191
192 /// This cannot be set greater than 25 years when analysis type is FEMP
193 bool setLengthOfStudyPeriodInYears(int lengthOfStudyPeriodInYears);
194
195 void resetLengthOfStudyPeriodInYears();
196
197 bool setTaxRate(double taxRate);
198
199 void resetTaxRate();
200
201 bool setDepreciationMethod(const std::string& depreciationMethod);
202
203 void resetDepreciationMethod();
204
205 /// This cannot be set when analysis type is FEMP
206 bool setUseNISTFuelEscalationRates(bool useNISTFuelEscalationRates);
207
208 void resetUseNISTFuelEscalationRates();
209
210 /// This cannot be set when use NIST fuel escalation rates is false
211 bool setNISTRegion(const std::string& nistRegion);
212
213 void resetNISTRegion();
214
215 /// This cannot be set when use NIST fuel escalation rates is false
216 bool setNISTSector(const std::string& nistSector);
217
218 void resetNISTSector();
219
220 /// This cannot be set when use NIST fuel escalation rates is true
221 bool setElectricityInflation(double electricityInflation);
222
223 void resetElectricityInflation();
224
225 /// This cannot be set when use NIST fuel escalation rates is true
226 bool setNaturalGasInflation(double naturalGasInflation);
227
228 void resetNaturalGasInflation();
229
230 /// This cannot be set when use NIST fuel escalation rates is true
231 bool setSteamInflation(double steamInflation);
232
233 void resetSteamInflation();
234
235 /// This cannot be set when use NIST fuel escalation rates is true
236 bool setGasolineInflation(double gasolineInflation);
237
238 void resetGasolineInflation();
239
240 /// This cannot be set when use NIST fuel escalation rates is true
241 bool setDieselInflation(double dieselInflation);
242
243 void resetDieselInflation();
244
245 /// This cannot be set when use NIST fuel escalation rates is true
246 bool setCoalInflation(double coalInflation);
247
248 void resetCoalInflation();
249
250 /// This cannot be set when use NIST fuel escalation rates is true
251 bool setFuelOil1Inflation(double fuelOil1Inflation);
252
253 void resetFuelOil1Inflation();
254
255 /// This cannot be set when use NIST fuel escalation rates is true
256 bool setFuelOil2Inflation(double fuelOil2Inflation);
257
258 void resetFuelOil2Inflation();
259
260 /// This cannot be set when use NIST fuel escalation rates is true
261 bool setPropaneInflation(double propaneInflation);
262
263 void resetPropaneInflation();
264
265 /// This cannot be set when use NIST fuel escalation rates is true
266 bool setWaterInflation(double waterInflation);
267
268 void resetWaterInflation();
269
270 /// This cannot be set when use NIST fuel escalation rates is true
271 bool setOtherFuel1Inflation(double otherFuel1Inflation);
272
273 void resetOtherFuel1Inflation();
274
275 /// This cannot be set when use NIST fuel escalation rates is true
276 bool setOtherFuel2Inflation(double otherFuel2Inflation);
277
278 void resetOtherFuel2Inflation();
279
280 //@}
281 private:
282 REGISTER_LOGGER("openstudio.model.LifeCycleCostParameters");
283 };
284
285 } // namespace detail
286
287 } // namespace model
288 } // namespace openstudio
289
290 #endif // MODEL_LIFECYCLECOSTPARAMETERS_IMPL_HPP
291