GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 70.2% 214 / 0 / 305
Functions: 67.4% 60 / 0 / 89
Branches: 53.2% 141 / 0 / 265

src/model/CurveQuadraticLinear.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 "CurveQuadraticLinear.hpp"
7 #include "CurveQuadraticLinear_Impl.hpp"
8
9 #include <utilities/idd/IddFactory.hxx>
10
11 #include <utilities/idd/OS_Curve_QuadraticLinear_FieldEnums.hxx>
12 #include <utilities/idd/IddEnums.hxx>
13
14 #include "../utilities/core/Assert.hpp"
15
16 #include <cmath>
17
18 using namespace std;
19
20 namespace openstudio {
21 namespace model {
22
23 namespace detail {
24
25 8 CurveQuadraticLinear_Impl::CurveQuadraticLinear_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
26 8 : Curve_Impl(idfObject, model, keepHandle) {
27
4/6
✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
✓ Branch 7 taken 8 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 8 times.
✗ Branch 13 not taken.
8 OS_ASSERT(idfObject.iddObject().type() == CurveQuadraticLinear::iddObjectType());
28 8 }
29
30 ✗ CurveQuadraticLinear_Impl::CurveQuadraticLinear_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
31 ✗ : Curve_Impl(other, model, keepHandle) {
32 ✗ OS_ASSERT(other.iddObject().type() == CurveQuadraticLinear::iddObjectType());
33 ✗ }
34
35 2 CurveQuadraticLinear_Impl::CurveQuadraticLinear_Impl(const CurveQuadraticLinear_Impl& other, Model_Impl* model, bool keepHandle)
36 2 : Curve_Impl(other, model, keepHandle) {}
37
38 ✗ const std::vector<std::string>& CurveQuadraticLinear_Impl::outputVariableNames() const {
39 static const std::vector<std::string> result{"Performance Curve Output Value", "Performance Curve Input Variable 1 Value",
40 ✗ "Performance Curve Input Variable 2 Value"};
41 ✗ return result;
42 ✗ }
43
44 ✗ IddObjectType CurveQuadraticLinear_Impl::iddObjectType() const {
45 ✗ return CurveQuadraticLinear::iddObjectType();
46 }
47
48 ✗ int CurveQuadraticLinear_Impl::numVariables() const {
49 ✗ return 2;
50 }
51
52 16 double CurveQuadraticLinear_Impl::evaluate(const std::vector<double>& independentVariables) const {
53
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 16 times.
16 OS_ASSERT(independentVariables.size() == 2u);
54
55 16 double x = independentVariables[0];
56
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 12 times.
16 if (x < minimumValueofx()) {
57
5/5
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 13 taken 4 times.
4 LOG(Warn, "Supplied x is below the minimumValueofx, resetting it.");
58 4 x = minimumValueofx();
59 }
60
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 12 times.
16 if (x > maximumValueofx()) {
61
5/5
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 13 taken 4 times.
4 LOG(Warn, "Supplied x is above the maximumValueofx, resetting it.");
62 4 x = maximumValueofx();
63 }
64
65 16 double y = independentVariables[1];
66
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 12 times.
16 if (y < minimumValueofy()) {
67
5/5
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 13 taken 4 times.
4 LOG(Warn, "Supplied y is below the minimumValueofy, resetting it.");
68 4 y = minimumValueofy();
69 }
70
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 12 times.
16 if (y > maximumValueofy()) {
71
5/5
✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
✓ Branch 10 taken 4 times.
✓ Branch 13 taken 4 times.
4 LOG(Warn, "Supplied y is above the maximumValueofy, resetting it.");
72 4 y = maximumValueofy();
73 }
74
75 16 double x2 = std::pow(x, 2);
76 16 double result = coefficient1Constant();
77 16 result += coefficient2x() * x;
78 16 result += coefficient3xPOW2() * x2;
79 16 double temp = coefficient4y();
80 16 temp += coefficient5xTIMESY() * x;
81 16 temp += coefficient6xPOW2TIMESY() * x2;
82 16 result += temp * y;
83
84
3/3
✓ Branch 1 taken 16 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 14 times.
32 if (boost::optional<double> _minVal = minimumCurveOutput()) {
85
1/1
✓ Branch 1 taken 2 times.
2 double minVal = _minVal.get();
86
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
2 if (result < minVal) {
87
5/5
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
1 LOG(Warn, "Calculated curve output is below minimumCurveOutput, resetting it.");
88 1 result = minVal;
89 }
90 }
91
92
3/3
✓ Branch 1 taken 16 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 14 times.
32 if (boost::optional<double> _maxVal = maximumCurveOutput()) {
93
1/1
✓ Branch 1 taken 2 times.
2 double maxVal = _maxVal.get();
94
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
2 if (result > maxVal) {
95
5/5
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
1 LOG(Warn, "Calculated curve output is above maximumCurveOutput, resetting it.");
96 1 result = maxVal;
97 }
98 }
99
100 16 return result;
101 }
102
103 20 double CurveQuadraticLinear_Impl::coefficient1Constant() const {
104
1/1
✓ Branch 1 taken 20 times.
20 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::Coefficient1Constant, true);
105
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 20 times.
✗ Branch 4 not taken.
20 OS_ASSERT(value);
106
1/1
✓ Branch 1 taken 20 times.
40 return value.get();
107 }
108
109 20 double CurveQuadraticLinear_Impl::coefficient2x() const {
110
1/1
✓ Branch 1 taken 20 times.
20 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::Coefficient2x, true);
111
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 20 times.
✗ Branch 4 not taken.
20 OS_ASSERT(value);
112
1/1
✓ Branch 1 taken 20 times.
40 return value.get();
113 }
114
115 20 double CurveQuadraticLinear_Impl::coefficient3xPOW2() const {
116
1/1
✓ Branch 1 taken 20 times.
20 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::Coefficient3x_POW_2, true);
117
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 20 times.
✗ Branch 4 not taken.
20 OS_ASSERT(value);
118
1/1
✓ Branch 1 taken 20 times.
40 return value.get();
119 }
120
121 20 double CurveQuadraticLinear_Impl::coefficient4y() const {
122
1/1
✓ Branch 1 taken 20 times.
20 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::Coefficient4y, true);
123
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 20 times.
✗ Branch 4 not taken.
20 OS_ASSERT(value);
124
1/1
✓ Branch 1 taken 20 times.
40 return value.get();
125 }
126
127 20 double CurveQuadraticLinear_Impl::coefficient5xTIMESY() const {
128
1/1
✓ Branch 1 taken 20 times.
20 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::Coefficient5x_TIMES_y, true);
129
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 20 times.
✗ Branch 4 not taken.
20 OS_ASSERT(value);
130
1/1
✓ Branch 1 taken 20 times.
40 return value.get();
131 }
132
133 20 double CurveQuadraticLinear_Impl::coefficient6xPOW2TIMESY() const {
134
1/1
✓ Branch 1 taken 20 times.
20 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::Coefficient6x_POW_2_TIMES_y, true);
135
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 20 times.
✗ Branch 4 not taken.
20 OS_ASSERT(value);
136
1/1
✓ Branch 1 taken 20 times.
40 return value.get();
137 }
138
139 24 double CurveQuadraticLinear_Impl::minimumValueofx() const {
140
1/1
✓ Branch 1 taken 24 times.
24 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::MinimumValueofx, true);
141
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 24 times.
✗ Branch 4 not taken.
24 OS_ASSERT(value);
142
1/1
✓ Branch 1 taken 24 times.
48 return value.get();
143 }
144
145 24 double CurveQuadraticLinear_Impl::maximumValueofx() const {
146
1/1
✓ Branch 1 taken 24 times.
24 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::MaximumValueofx, true);
147
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 24 times.
✗ Branch 4 not taken.
24 OS_ASSERT(value);
148
1/1
✓ Branch 1 taken 24 times.
48 return value.get();
149 }
150
151 24 double CurveQuadraticLinear_Impl::minimumValueofy() const {
152
1/1
✓ Branch 1 taken 24 times.
24 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::MinimumValueofy, true);
153
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 24 times.
✗ Branch 4 not taken.
24 OS_ASSERT(value);
154
1/1
✓ Branch 1 taken 24 times.
48 return value.get();
155 }
156
157 24 double CurveQuadraticLinear_Impl::maximumValueofy() const {
158
1/1
✓ Branch 1 taken 24 times.
24 boost::optional<double> value = getDouble(OS_Curve_QuadraticLinearFields::MaximumValueofy, true);
159
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 24 times.
✗ Branch 4 not taken.
24 OS_ASSERT(value);
160
1/1
✓ Branch 1 taken 24 times.
48 return value.get();
161 }
162
163 21 boost::optional<double> CurveQuadraticLinear_Impl::minimumCurveOutput() const {
164 21 return getDouble(OS_Curve_QuadraticLinearFields::MinimumCurveOutput, true);
165 }
166
167 21 boost::optional<double> CurveQuadraticLinear_Impl::maximumCurveOutput() const {
168 21 return getDouble(OS_Curve_QuadraticLinearFields::MaximumCurveOutput, true);
169 }
170
171 ✗ std::string CurveQuadraticLinear_Impl::inputUnitTypeforX() const {
172 ✗ boost::optional<std::string> value = getString(OS_Curve_QuadraticLinearFields::InputUnitTypeforX, true);
173 ✗ OS_ASSERT(value);
174 ✗ return value.get();
175 ✗ }
176
177 2 bool CurveQuadraticLinear_Impl::isInputUnitTypeforXDefaulted() const {
178 2 return isEmpty(OS_Curve_QuadraticLinearFields::InputUnitTypeforX);
179 }
180
181 ✗ std::string CurveQuadraticLinear_Impl::inputUnitTypeforY() const {
182 ✗ boost::optional<std::string> value = getString(OS_Curve_QuadraticLinearFields::InputUnitTypeforY, true);
183 ✗ OS_ASSERT(value);
184 ✗ return value.get();
185 ✗ }
186
187 2 bool CurveQuadraticLinear_Impl::isInputUnitTypeforYDefaulted() const {
188 2 return isEmpty(OS_Curve_QuadraticLinearFields::InputUnitTypeforY);
189 }
190
191 ✗ std::string CurveQuadraticLinear_Impl::outputUnitType() const {
192 ✗ boost::optional<std::string> value = getString(OS_Curve_QuadraticLinearFields::OutputUnitType, true);
193 ✗ OS_ASSERT(value);
194 ✗ return value.get();
195 ✗ }
196
197 2 bool CurveQuadraticLinear_Impl::isOutputUnitTypeDefaulted() const {
198 2 return isEmpty(OS_Curve_QuadraticLinearFields::OutputUnitType);
199 }
200
201 7 bool CurveQuadraticLinear_Impl::setCoefficient1Constant(double coefficient1Constant) {
202 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::Coefficient1Constant, coefficient1Constant);
203
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
204 7 return result;
205 }
206
207 7 bool CurveQuadraticLinear_Impl::setCoefficient2x(double coefficient2x) {
208 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::Coefficient2x, coefficient2x);
209
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
210 7 return result;
211 }
212
213 7 bool CurveQuadraticLinear_Impl::setCoefficient3xPOW2(double coefficient3xPOW2) {
214 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::Coefficient3x_POW_2, coefficient3xPOW2);
215
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
216 7 return result;
217 }
218
219 7 bool CurveQuadraticLinear_Impl::setCoefficient4y(double coefficient4y) {
220 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::Coefficient4y, coefficient4y);
221
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
222 7 return result;
223 }
224
225 7 bool CurveQuadraticLinear_Impl::setCoefficient5xTIMESY(double coefficient5xTIMESY) {
226 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::Coefficient5x_TIMES_y, coefficient5xTIMESY);
227
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
228 7 return result;
229 }
230
231 7 bool CurveQuadraticLinear_Impl::setCoefficient6xPOW2TIMESY(double coefficient6xPOW2TIMESY) {
232 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::Coefficient6x_POW_2_TIMES_y, coefficient6xPOW2TIMESY);
233
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
234 7 return result;
235 }
236
237 7 bool CurveQuadraticLinear_Impl::setMinimumValueofx(double minimumValueofx) {
238 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::MinimumValueofx, minimumValueofx);
239
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
240 7 return result;
241 }
242
243 7 bool CurveQuadraticLinear_Impl::setMaximumValueofx(double maximumValueofx) {
244 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::MaximumValueofx, maximumValueofx);
245
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
246 7 return result;
247 }
248
249 7 bool CurveQuadraticLinear_Impl::setMinimumValueofy(double minimumValueofy) {
250 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::MinimumValueofy, minimumValueofy);
251
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
252 7 return result;
253 }
254
255 7 bool CurveQuadraticLinear_Impl::setMaximumValueofy(double maximumValueofy) {
256 7 bool result = setDouble(OS_Curve_QuadraticLinearFields::MaximumValueofy, maximumValueofy);
257
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 7 times.
7 OS_ASSERT(result);
258 7 return result;
259 }
260
261 1 bool CurveQuadraticLinear_Impl::setMinimumCurveOutput(boost::optional<double> minimumCurveOutput) {
262 1 bool result = false;
263
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (minimumCurveOutput) {
264 1 result = setDouble(OS_Curve_QuadraticLinearFields::MinimumCurveOutput, minimumCurveOutput.get());
265 } else {
266 ✗ result = setString(OS_Curve_QuadraticLinearFields::MinimumCurveOutput, "");
267 }
268
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
269 1 return result;
270 }
271
272 ✗ void CurveQuadraticLinear_Impl::resetMinimumCurveOutput() {
273 ✗ bool result = setString(OS_Curve_QuadraticLinearFields::MinimumCurveOutput, "");
274 ✗ OS_ASSERT(result);
275 ✗ }
276
277 1 bool CurveQuadraticLinear_Impl::setMaximumCurveOutput(boost::optional<double> maximumCurveOutput) {
278 1 bool result = false;
279
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 if (maximumCurveOutput) {
280 1 result = setDouble(OS_Curve_QuadraticLinearFields::MaximumCurveOutput, maximumCurveOutput.get());
281 } else {
282 ✗ result = setString(OS_Curve_QuadraticLinearFields::MaximumCurveOutput, "");
283 }
284
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
285 1 return result;
286 }
287
288 ✗ void CurveQuadraticLinear_Impl::resetMaximumCurveOutput() {
289 ✗ bool result = setString(OS_Curve_QuadraticLinearFields::MaximumCurveOutput, "");
290 ✗ OS_ASSERT(result);
291 ✗ }
292
293 ✗ bool CurveQuadraticLinear_Impl::setInputUnitTypeforX(const std::string& inputUnitTypeforX) {
294 ✗ bool result = setString(OS_Curve_QuadraticLinearFields::InputUnitTypeforX, inputUnitTypeforX);
295 ✗ return result;
296 }
297
298 ✗ void CurveQuadraticLinear_Impl::resetInputUnitTypeforX() {
299 ✗ bool result = setString(OS_Curve_QuadraticLinearFields::InputUnitTypeforX, "");
300 ✗ OS_ASSERT(result);
301 ✗ }
302
303 ✗ bool CurveQuadraticLinear_Impl::setInputUnitTypeforY(const std::string& inputUnitTypeforY) {
304 ✗ bool result = setString(OS_Curve_QuadraticLinearFields::InputUnitTypeforY, inputUnitTypeforY);
305 ✗ return result;
306 }
307
308 ✗ void CurveQuadraticLinear_Impl::resetInputUnitTypeforY() {
309 ✗ bool result = setString(OS_Curve_QuadraticLinearFields::InputUnitTypeforY, "");
310 ✗ OS_ASSERT(result);
311 ✗ }
312
313 ✗ bool CurveQuadraticLinear_Impl::setOutputUnitType(const std::string& outputUnitType) {
314 ✗ bool result = setString(OS_Curve_QuadraticLinearFields::OutputUnitType, outputUnitType);
315 ✗ return result;
316 }
317
318 ✗ void CurveQuadraticLinear_Impl::resetOutputUnitType() {
319 ✗ bool result = setString(OS_Curve_QuadraticLinearFields::OutputUnitType, "");
320 ✗ OS_ASSERT(result);
321 ✗ }
322
323 } // namespace detail
324
325 8 CurveQuadraticLinear::CurveQuadraticLinear(const Model& model) : Curve(CurveQuadraticLinear::iddObjectType(), model) {
326
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 8 times.
✗ Branch 5 not taken.
8 OS_ASSERT(getImpl<detail::CurveQuadraticLinear_Impl>());
327
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::Coefficient1Constant, 0.0);
328
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::Coefficient2x, 0.0);
329
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::Coefficient3x_POW_2, 0.0);
330
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::Coefficient4y, 0.0);
331
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::Coefficient5x_TIMES_y, 0.0);
332
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::Coefficient6x_POW_2_TIMES_y, 1.0);
333
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::MinimumValueofx, 0.0);
334
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::MaximumValueofx, 1.0);
335
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::MinimumValueofy, 0.0);
336
1/1
✓ Branch 1 taken 8 times.
8 setDouble(OS_Curve_QuadraticLinearFields::MaximumValueofy, 1.0);
337 8 }
338
339 7745 IddObjectType CurveQuadraticLinear::iddObjectType() {
340
1/1
✓ Branch 1 taken 7745 times.
7745 IddObjectType result(IddObjectType::OS_Curve_QuadraticLinear);
341 7745 return result;
342 }
343
344 ✗ std::vector<std::string> CurveQuadraticLinear::validInputUnitTypeforXValues() {
345 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuadraticLinearFields::InputUnitTypeforX);
346 }
347
348 ✗ std::vector<std::string> CurveQuadraticLinear::validInputUnitTypeforYValues() {
349 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuadraticLinearFields::InputUnitTypeforY);
350 }
351
352 ✗ std::vector<std::string> CurveQuadraticLinear::validOutputUnitTypeValues() {
353 ✗ return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuadraticLinearFields::OutputUnitType);
354 }
355
356 4 double CurveQuadraticLinear::coefficient1Constant() const {
357
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->coefficient1Constant();
358 }
359
360 4 double CurveQuadraticLinear::coefficient2x() const {
361
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->coefficient2x();
362 }
363
364 4 double CurveQuadraticLinear::coefficient3xPOW2() const {
365
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->coefficient3xPOW2();
366 }
367
368 4 double CurveQuadraticLinear::coefficient4y() const {
369
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->coefficient4y();
370 }
371
372 4 double CurveQuadraticLinear::coefficient5xTIMESY() const {
373
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->coefficient5xTIMESY();
374 }
375
376 4 double CurveQuadraticLinear::coefficient6xPOW2TIMESY() const {
377
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->coefficient6xPOW2TIMESY();
378 }
379
380 4 double CurveQuadraticLinear::minimumValueofx() const {
381
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->minimumValueofx();
382 }
383
384 4 double CurveQuadraticLinear::maximumValueofx() const {
385
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->maximumValueofx();
386 }
387
388 4 double CurveQuadraticLinear::minimumValueofy() const {
389
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->minimumValueofy();
390 }
391
392 4 double CurveQuadraticLinear::maximumValueofy() const {
393
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::CurveQuadraticLinear_Impl>()->maximumValueofy();
394 }
395
396 5 boost::optional<double> CurveQuadraticLinear::minimumCurveOutput() const {
397
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CurveQuadraticLinear_Impl>()->minimumCurveOutput();
398 }
399
400 5 boost::optional<double> CurveQuadraticLinear::maximumCurveOutput() const {
401
1/1
✓ Branch 3 taken 5 times.
5 return getImpl<detail::CurveQuadraticLinear_Impl>()->maximumCurveOutput();
402 }
403
404 ✗ std::string CurveQuadraticLinear::inputUnitTypeforX() const {
405 ✗ return getImpl<detail::CurveQuadraticLinear_Impl>()->inputUnitTypeforX();
406 }
407
408 2 bool CurveQuadraticLinear::isInputUnitTypeforXDefaulted() const {
409
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CurveQuadraticLinear_Impl>()->isInputUnitTypeforXDefaulted();
410 }
411
412 ✗ std::string CurveQuadraticLinear::inputUnitTypeforY() const {
413 ✗ return getImpl<detail::CurveQuadraticLinear_Impl>()->inputUnitTypeforY();
414 }
415
416 2 bool CurveQuadraticLinear::isInputUnitTypeforYDefaulted() const {
417
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CurveQuadraticLinear_Impl>()->isInputUnitTypeforYDefaulted();
418 }
419
420 ✗ std::string CurveQuadraticLinear::outputUnitType() const {
421 ✗ return getImpl<detail::CurveQuadraticLinear_Impl>()->outputUnitType();
422 }
423
424 2 bool CurveQuadraticLinear::isOutputUnitTypeDefaulted() const {
425
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::CurveQuadraticLinear_Impl>()->isOutputUnitTypeDefaulted();
426 }
427
428 7 bool CurveQuadraticLinear::setCoefficient1Constant(double coefficient1Constant) {
429
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setCoefficient1Constant(coefficient1Constant);
430 }
431
432 7 bool CurveQuadraticLinear::setCoefficient2x(double coefficient2x) {
433
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setCoefficient2x(coefficient2x);
434 }
435
436 7 bool CurveQuadraticLinear::setCoefficient3xPOW2(double coefficient3xPOW2) {
437
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setCoefficient3xPOW2(coefficient3xPOW2);
438 }
439
440 7 bool CurveQuadraticLinear::setCoefficient4y(double coefficient4y) {
441
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setCoefficient4y(coefficient4y);
442 }
443
444 7 bool CurveQuadraticLinear::setCoefficient5xTIMESY(double coefficient5xTIMESY) {
445
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setCoefficient5xTIMESY(coefficient5xTIMESY);
446 }
447
448 7 bool CurveQuadraticLinear::setCoefficient6xPOW2TIMESY(double coefficient6xPOW2TIMESY) {
449
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setCoefficient6xPOW2TIMESY(coefficient6xPOW2TIMESY);
450 }
451
452 7 bool CurveQuadraticLinear::setMinimumValueofx(double minimumValueofx) {
453
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setMinimumValueofx(minimumValueofx);
454 }
455
456 7 bool CurveQuadraticLinear::setMaximumValueofx(double maximumValueofx) {
457
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setMaximumValueofx(maximumValueofx);
458 }
459
460 7 bool CurveQuadraticLinear::setMinimumValueofy(double minimumValueofy) {
461
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setMinimumValueofy(minimumValueofy);
462 }
463
464 7 bool CurveQuadraticLinear::setMaximumValueofy(double maximumValueofy) {
465
1/1
✓ Branch 3 taken 7 times.
7 return getImpl<detail::CurveQuadraticLinear_Impl>()->setMaximumValueofy(maximumValueofy);
466 }
467
468 1 bool CurveQuadraticLinear::setMinimumCurveOutput(double minimumCurveOutput) {
469
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
1 return getImpl<detail::CurveQuadraticLinear_Impl>()->setMinimumCurveOutput(minimumCurveOutput);
470 }
471
472 ✗ void CurveQuadraticLinear::resetMinimumCurveOutput() {
473 ✗ getImpl<detail::CurveQuadraticLinear_Impl>()->resetMinimumCurveOutput();
474 ✗ }
475
476 1 bool CurveQuadraticLinear::setMaximumCurveOutput(double maximumCurveOutput) {
477
2/2
✓ Branch 3 taken 1 time.
✓ Branch 6 taken 1 time.
1 return getImpl<detail::CurveQuadraticLinear_Impl>()->setMaximumCurveOutput(maximumCurveOutput);
478 }
479
480 ✗ void CurveQuadraticLinear::resetMaximumCurveOutput() {
481 ✗ getImpl<detail::CurveQuadraticLinear_Impl>()->resetMaximumCurveOutput();
482 ✗ }
483
484 ✗ bool CurveQuadraticLinear::setInputUnitTypeforX(const std::string& inputUnitTypeforX) {
485 ✗ return getImpl<detail::CurveQuadraticLinear_Impl>()->setInputUnitTypeforX(inputUnitTypeforX);
486 }
487
488 ✗ void CurveQuadraticLinear::resetInputUnitTypeforX() {
489 ✗ getImpl<detail::CurveQuadraticLinear_Impl>()->resetInputUnitTypeforX();
490 ✗ }
491
492 ✗ bool CurveQuadraticLinear::setInputUnitTypeforY(const std::string& inputUnitTypeforY) {
493 ✗ return getImpl<detail::CurveQuadraticLinear_Impl>()->setInputUnitTypeforY(inputUnitTypeforY);
494 }
495
496 ✗ void CurveQuadraticLinear::resetInputUnitTypeforY() {
497 ✗ getImpl<detail::CurveQuadraticLinear_Impl>()->resetInputUnitTypeforY();
498 ✗ }
499
500 ✗ bool CurveQuadraticLinear::setOutputUnitType(const std::string& outputUnitType) {
501 ✗ return getImpl<detail::CurveQuadraticLinear_Impl>()->setOutputUnitType(outputUnitType);
502 }
503
504 ✗ void CurveQuadraticLinear::resetOutputUnitType() {
505 ✗ getImpl<detail::CurveQuadraticLinear_Impl>()->resetOutputUnitType();
506 ✗ }
507
508 /// @cond
509
1/1
✓ Branch 3 taken 2 times.
2 CurveQuadraticLinear::CurveQuadraticLinear(std::shared_ptr<detail::CurveQuadraticLinear_Impl> impl) : Curve(std::move(impl)) {}
510 /// @endcond
511
512 } // namespace model
513 } // namespace openstudio
514