src/model/CurveQuartic.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 "CurveQuartic.hpp" | ||
| 7 | #include "CurveQuartic_Impl.hpp" | ||
| 8 | |||
| 9 | #include <utilities/idd/IddFactory.hxx> | ||
| 10 | |||
| 11 | #include <utilities/idd/OS_Curve_Quartic_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 | 18 | CurveQuartic_Impl::CurveQuartic_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) : Curve_Impl(idfObject, model, keepHandle) { | |
| 26 |
4/6✓ Branch 1 taken 18 times.
✓ Branch 4 taken 18 times.
✓ Branch 7 taken 18 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 18 times.
✗ Branch 13 not taken.
|
18 | OS_ASSERT(idfObject.iddObject().type() == CurveQuartic::iddObjectType()); |
| 27 | 18 | } | |
| 28 | |||
| 29 | 1 | CurveQuartic_Impl::CurveQuartic_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle) | |
| 30 | 1 | : Curve_Impl(other, model, keepHandle) { | |
| 31 |
4/6✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 10 not taken.
✓ Branch 11 taken 1 time.
✗ Branch 13 not taken.
|
1 | OS_ASSERT(other.iddObject().type() == CurveQuartic::iddObjectType()); |
| 32 | 1 | } | |
| 33 | |||
| 34 | 2 | CurveQuartic_Impl::CurveQuartic_Impl(const CurveQuartic_Impl& other, Model_Impl* model, bool keepHandle) : Curve_Impl(other, model, keepHandle) {} | |
| 35 | |||
| 36 | ✗ | const std::vector<std::string>& CurveQuartic_Impl::outputVariableNames() const { | |
| 37 | ✗ | static const std::vector<std::string> result{"Performance Curve Output Value", "Performance Curve Input Variable 1 Value"}; | |
| 38 | ✗ | return result; | |
| 39 | ✗ | } | |
| 40 | |||
| 41 | ✗ | IddObjectType CurveQuartic_Impl::iddObjectType() const { | |
| 42 | ✗ | return CurveQuartic::iddObjectType(); | |
| 43 | } | ||
| 44 | |||
| 45 | ✗ | int CurveQuartic_Impl::numVariables() const { | |
| 46 | ✗ | return 1; | |
| 47 | } | ||
| 48 | |||
| 49 | 8 | double CurveQuartic_Impl::evaluate(const std::vector<double>& independentVariables) const { | |
| 50 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
|
8 | OS_ASSERT(independentVariables.size() == 1u); |
| 51 | |||
| 52 | 8 | double x = independentVariables[0]; | |
| 53 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 2 taken 6 times.
|
8 | if (x < minimumValueofx()) { |
| 54 |
5/5✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 13 taken 2 times.
|
2 | LOG(Warn, "Supplied x is below the minimumValueofx, resetting it."); |
| 55 | 2 | x = minimumValueofx(); | |
| 56 | } | ||
| 57 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 2 taken 6 times.
|
8 | if (x > maximumValueofx()) { |
| 58 |
5/5✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
✓ Branch 13 taken 2 times.
|
2 | LOG(Warn, "Supplied x is above the maximumValueofx, resetting it."); |
| 59 | 2 | x = maximumValueofx(); | |
| 60 | } | ||
| 61 | |||
| 62 | 8 | double result = coefficient1Constant(); | |
| 63 | 8 | result += coefficient2x() * x; | |
| 64 | 8 | result += coefficient3xPOW2() * std::pow(x, 2); | |
| 65 | 8 | result += coefficient4xPOW3() * std::pow(x, 3); | |
| 66 | 8 | result += coefficient5xPOW4() * std::pow(x, 4); | |
| 67 | |||
| 68 |
3/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 6 times.
|
16 | if (boost::optional<double> _minVal = minimumCurveOutput()) { |
| 69 |
1/1✓ Branch 1 taken 2 times.
|
2 | double minVal = _minVal.get(); |
| 70 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
|
2 | if (result < minVal) { |
| 71 |
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."); |
| 72 | 1 | result = minVal; | |
| 73 | } | ||
| 74 | } | ||
| 75 | |||
| 76 |
3/3✓ Branch 1 taken 8 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 6 times.
|
16 | if (boost::optional<double> _maxVal = maximumCurveOutput()) { |
| 77 |
1/1✓ Branch 1 taken 2 times.
|
2 | double maxVal = _maxVal.get(); |
| 78 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
|
2 | if (result > maxVal) { |
| 79 |
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."); |
| 80 | 1 | result = maxVal; | |
| 81 | } | ||
| 82 | } | ||
| 83 | |||
| 84 | 8 | return result; | |
| 85 | } | ||
| 86 | |||
| 87 | 13 | double CurveQuartic_Impl::coefficient1Constant() const { | |
| 88 |
1/1✓ Branch 1 taken 13 times.
|
13 | boost::optional<double> value = getDouble(OS_Curve_QuarticFields::Coefficient1Constant, true); |
| 89 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
|
13 | OS_ASSERT(value); |
| 90 |
1/1✓ Branch 1 taken 13 times.
|
26 | return value.get(); |
| 91 | } | ||
| 92 | |||
| 93 | 13 | double CurveQuartic_Impl::coefficient2x() const { | |
| 94 |
1/1✓ Branch 1 taken 13 times.
|
13 | boost::optional<double> value = getDouble(OS_Curve_QuarticFields::Coefficient2x, true); |
| 95 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
|
13 | OS_ASSERT(value); |
| 96 |
1/1✓ Branch 1 taken 13 times.
|
26 | return value.get(); |
| 97 | } | ||
| 98 | |||
| 99 | 13 | double CurveQuartic_Impl::coefficient3xPOW2() const { | |
| 100 |
1/1✓ Branch 1 taken 13 times.
|
13 | boost::optional<double> value = getDouble(OS_Curve_QuarticFields::Coefficient3x_POW_2, true); |
| 101 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
|
13 | OS_ASSERT(value); |
| 102 |
1/1✓ Branch 1 taken 13 times.
|
26 | return value.get(); |
| 103 | } | ||
| 104 | |||
| 105 | 13 | double CurveQuartic_Impl::coefficient4xPOW3() const { | |
| 106 |
1/1✓ Branch 1 taken 13 times.
|
13 | boost::optional<double> value = getDouble(OS_Curve_QuarticFields::Coefficient4x_POW_3, true); |
| 107 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
|
13 | OS_ASSERT(value); |
| 108 |
1/1✓ Branch 1 taken 13 times.
|
26 | return value.get(); |
| 109 | } | ||
| 110 | |||
| 111 | 13 | double CurveQuartic_Impl::coefficient5xPOW4() const { | |
| 112 |
1/1✓ Branch 1 taken 13 times.
|
13 | boost::optional<double> value = getDouble(OS_Curve_QuarticFields::Coefficient5x_POW_4, true); |
| 113 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 13 times.
✗ Branch 4 not taken.
|
13 | OS_ASSERT(value); |
| 114 |
1/1✓ Branch 1 taken 13 times.
|
26 | return value.get(); |
| 115 | } | ||
| 116 | |||
| 117 | 15 | double CurveQuartic_Impl::minimumValueofx() const { | |
| 118 |
1/1✓ Branch 1 taken 15 times.
|
15 | boost::optional<double> value = getDouble(OS_Curve_QuarticFields::MinimumValueofx, true); |
| 119 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 15 times.
✗ Branch 4 not taken.
|
15 | OS_ASSERT(value); |
| 120 |
1/1✓ Branch 1 taken 15 times.
|
30 | return value.get(); |
| 121 | } | ||
| 122 | |||
| 123 | 15 | double CurveQuartic_Impl::maximumValueofx() const { | |
| 124 |
1/1✓ Branch 1 taken 15 times.
|
15 | boost::optional<double> value = getDouble(OS_Curve_QuarticFields::MaximumValueofx, true); |
| 125 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 15 times.
✗ Branch 4 not taken.
|
15 | OS_ASSERT(value); |
| 126 |
1/1✓ Branch 1 taken 15 times.
|
30 | return value.get(); |
| 127 | } | ||
| 128 | |||
| 129 | 15 | boost::optional<double> CurveQuartic_Impl::minimumCurveOutput() const { | |
| 130 | 15 | return getDouble(OS_Curve_QuarticFields::MinimumCurveOutput, true); | |
| 131 | } | ||
| 132 | |||
| 133 | 15 | boost::optional<double> CurveQuartic_Impl::maximumCurveOutput() const { | |
| 134 | 15 | return getDouble(OS_Curve_QuarticFields::MaximumCurveOutput, true); | |
| 135 | } | ||
| 136 | |||
| 137 | 1 | std::string CurveQuartic_Impl::inputUnitTypeforX() const { | |
| 138 |
1/1✓ Branch 1 taken 1 time.
|
1 | boost::optional<std::string> value = getString(OS_Curve_QuarticFields::InputUnitTypeforX, true); |
| 139 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(value); |
| 140 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | return value.get(); |
| 141 | 1 | } | |
| 142 | |||
| 143 | 2 | bool CurveQuartic_Impl::isInputUnitTypeforXDefaulted() const { | |
| 144 | 2 | return isEmpty(OS_Curve_QuarticFields::InputUnitTypeforX); | |
| 145 | } | ||
| 146 | |||
| 147 | 1 | std::string CurveQuartic_Impl::outputUnitType() const { | |
| 148 |
1/1✓ Branch 1 taken 1 time.
|
1 | boost::optional<std::string> value = getString(OS_Curve_QuarticFields::OutputUnitType, true); |
| 149 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
|
1 | OS_ASSERT(value); |
| 150 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | return value.get(); |
| 151 | 1 | } | |
| 152 | |||
| 153 | 2 | bool CurveQuartic_Impl::isOutputUnitTypeDefaulted() const { | |
| 154 | 2 | return isEmpty(OS_Curve_QuarticFields::OutputUnitType); | |
| 155 | } | ||
| 156 | |||
| 157 | 14 | bool CurveQuartic_Impl::setCoefficient1Constant(double coefficient1Constant) { | |
| 158 | 14 | bool result = setDouble(OS_Curve_QuarticFields::Coefficient1Constant, coefficient1Constant); | |
| 159 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | OS_ASSERT(result); |
| 160 | 14 | return result; | |
| 161 | } | ||
| 162 | |||
| 163 | 14 | bool CurveQuartic_Impl::setCoefficient2x(double coefficient2x) { | |
| 164 | 14 | bool result = setDouble(OS_Curve_QuarticFields::Coefficient2x, coefficient2x); | |
| 165 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | OS_ASSERT(result); |
| 166 | 14 | return result; | |
| 167 | } | ||
| 168 | |||
| 169 | 14 | bool CurveQuartic_Impl::setCoefficient3xPOW2(double coefficient3xPOW2) { | |
| 170 | 14 | bool result = setDouble(OS_Curve_QuarticFields::Coefficient3x_POW_2, coefficient3xPOW2); | |
| 171 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | OS_ASSERT(result); |
| 172 | 14 | return result; | |
| 173 | } | ||
| 174 | |||
| 175 | 14 | bool CurveQuartic_Impl::setCoefficient4xPOW3(double coefficient4xPOW3) { | |
| 176 | 14 | bool result = setDouble(OS_Curve_QuarticFields::Coefficient4x_POW_3, coefficient4xPOW3); | |
| 177 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | OS_ASSERT(result); |
| 178 | 14 | return result; | |
| 179 | } | ||
| 180 | |||
| 181 | 14 | bool CurveQuartic_Impl::setCoefficient5xPOW4(double coefficient5xPOW4) { | |
| 182 | 14 | bool result = setDouble(OS_Curve_QuarticFields::Coefficient5x_POW_4, coefficient5xPOW4); | |
| 183 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | OS_ASSERT(result); |
| 184 | 14 | return result; | |
| 185 | } | ||
| 186 | |||
| 187 | 14 | bool CurveQuartic_Impl::setMinimumValueofx(double minimumValueofx) { | |
| 188 | 14 | bool result = setDouble(OS_Curve_QuarticFields::MinimumValueofx, minimumValueofx); | |
| 189 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | OS_ASSERT(result); |
| 190 | 14 | return result; | |
| 191 | } | ||
| 192 | |||
| 193 | 14 | bool CurveQuartic_Impl::setMaximumValueofx(double maximumValueofx) { | |
| 194 | 14 | bool result = setDouble(OS_Curve_QuarticFields::MaximumValueofx, maximumValueofx); | |
| 195 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | OS_ASSERT(result); |
| 196 | 14 | return result; | |
| 197 | } | ||
| 198 | |||
| 199 | 14 | bool CurveQuartic_Impl::setMinimumCurveOutput(boost::optional<double> minimumCurveOutput) { | |
| 200 | 14 | bool result = false; | |
| 201 |
1/2✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
|
14 | if (minimumCurveOutput) { |
| 202 | 14 | result = setDouble(OS_Curve_QuarticFields::MinimumCurveOutput, minimumCurveOutput.get()); | |
| 203 | } else { | ||
| 204 | ✗ | result = setString(OS_Curve_QuarticFields::MinimumCurveOutput, ""); | |
| 205 | } | ||
| 206 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | OS_ASSERT(result); |
| 207 | 14 | return result; | |
| 208 | } | ||
| 209 | |||
| 210 | ✗ | void CurveQuartic_Impl::resetMinimumCurveOutput() { | |
| 211 | ✗ | bool result = setString(OS_Curve_QuarticFields::MinimumCurveOutput, ""); | |
| 212 | ✗ | OS_ASSERT(result); | |
| 213 | ✗ | } | |
| 214 | |||
| 215 | 14 | bool CurveQuartic_Impl::setMaximumCurveOutput(boost::optional<double> maximumCurveOutput) { | |
| 216 | 14 | bool result = false; | |
| 217 |
1/2✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
|
14 | if (maximumCurveOutput) { |
| 218 | 14 | result = setDouble(OS_Curve_QuarticFields::MaximumCurveOutput, maximumCurveOutput.get()); | |
| 219 | } else { | ||
| 220 | ✗ | result = setString(OS_Curve_QuarticFields::MaximumCurveOutput, ""); | |
| 221 | } | ||
| 222 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
|
14 | OS_ASSERT(result); |
| 223 | 14 | return result; | |
| 224 | } | ||
| 225 | |||
| 226 | ✗ | void CurveQuartic_Impl::resetMaximumCurveOutput() { | |
| 227 | ✗ | bool result = setString(OS_Curve_QuarticFields::MaximumCurveOutput, ""); | |
| 228 | ✗ | OS_ASSERT(result); | |
| 229 | ✗ | } | |
| 230 | |||
| 231 | 8 | bool CurveQuartic_Impl::setInputUnitTypeforX(const std::string& inputUnitTypeforX) { | |
| 232 | 8 | bool result = setString(OS_Curve_QuarticFields::InputUnitTypeforX, inputUnitTypeforX); | |
| 233 | 8 | return result; | |
| 234 | } | ||
| 235 | |||
| 236 | ✗ | void CurveQuartic_Impl::resetInputUnitTypeforX() { | |
| 237 | ✗ | bool result = setString(OS_Curve_QuarticFields::InputUnitTypeforX, ""); | |
| 238 | ✗ | OS_ASSERT(result); | |
| 239 | ✗ | } | |
| 240 | |||
| 241 | 8 | bool CurveQuartic_Impl::setOutputUnitType(const std::string& outputUnitType) { | |
| 242 | 8 | bool result = setString(OS_Curve_QuarticFields::OutputUnitType, outputUnitType); | |
| 243 | 8 | return result; | |
| 244 | } | ||
| 245 | |||
| 246 | ✗ | void CurveQuartic_Impl::resetOutputUnitType() { | |
| 247 | ✗ | bool result = setString(OS_Curve_QuarticFields::OutputUnitType, ""); | |
| 248 | ✗ | OS_ASSERT(result); | |
| 249 | ✗ | } | |
| 250 | |||
| 251 | } // namespace detail | ||
| 252 | |||
| 253 | 17 | CurveQuartic::CurveQuartic(const Model& model) : Curve(CurveQuartic::iddObjectType(), model) { | |
| 254 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 17 times.
✗ Branch 5 not taken.
|
17 | OS_ASSERT(getImpl<detail::CurveQuartic_Impl>()); |
| 255 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDouble(OS_Curve_QuarticFields::Coefficient1Constant, 0.0); |
| 256 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDouble(OS_Curve_QuarticFields::Coefficient2x, 0.0); |
| 257 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDouble(OS_Curve_QuarticFields::Coefficient3x_POW_2, 0.0); |
| 258 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDouble(OS_Curve_QuarticFields::Coefficient4x_POW_3, 0.0); |
| 259 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDouble(OS_Curve_QuarticFields::Coefficient5x_POW_4, 1.0); |
| 260 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDouble(OS_Curve_QuarticFields::MinimumValueofx, 0.0); |
| 261 |
1/1✓ Branch 1 taken 17 times.
|
17 | setDouble(OS_Curve_QuarticFields::MaximumValueofx, 1.0); |
| 262 | 17 | } | |
| 263 | |||
| 264 | 7635 | IddObjectType CurveQuartic::iddObjectType() { | |
| 265 |
1/1✓ Branch 1 taken 7635 times.
|
7635 | IddObjectType result(IddObjectType::OS_Curve_Quartic); |
| 266 | 7635 | return result; | |
| 267 | } | ||
| 268 | |||
| 269 | ✗ | std::vector<std::string> CurveQuartic::validInputUnitTypeforXValues() { | |
| 270 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuarticFields::InputUnitTypeforX); | |
| 271 | } | ||
| 272 | |||
| 273 | ✗ | std::vector<std::string> CurveQuartic::validOutputUnitTypeValues() { | |
| 274 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Curve_QuarticFields::OutputUnitType); | |
| 275 | } | ||
| 276 | |||
| 277 | 5 | double CurveQuartic::coefficient1Constant() const { | |
| 278 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CurveQuartic_Impl>()->coefficient1Constant(); |
| 279 | } | ||
| 280 | |||
| 281 | 5 | double CurveQuartic::coefficient2x() const { | |
| 282 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CurveQuartic_Impl>()->coefficient2x(); |
| 283 | } | ||
| 284 | |||
| 285 | 5 | double CurveQuartic::coefficient3xPOW2() const { | |
| 286 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CurveQuartic_Impl>()->coefficient3xPOW2(); |
| 287 | } | ||
| 288 | |||
| 289 | 5 | double CurveQuartic::coefficient4xPOW3() const { | |
| 290 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CurveQuartic_Impl>()->coefficient4xPOW3(); |
| 291 | } | ||
| 292 | |||
| 293 | 5 | double CurveQuartic::coefficient5xPOW4() const { | |
| 294 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CurveQuartic_Impl>()->coefficient5xPOW4(); |
| 295 | } | ||
| 296 | |||
| 297 | 5 | double CurveQuartic::minimumValueofx() const { | |
| 298 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CurveQuartic_Impl>()->minimumValueofx(); |
| 299 | } | ||
| 300 | |||
| 301 | 5 | double CurveQuartic::maximumValueofx() const { | |
| 302 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::CurveQuartic_Impl>()->maximumValueofx(); |
| 303 | } | ||
| 304 | |||
| 305 | 7 | boost::optional<double> CurveQuartic::minimumCurveOutput() const { | |
| 306 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::CurveQuartic_Impl>()->minimumCurveOutput(); |
| 307 | } | ||
| 308 | |||
| 309 | 7 | boost::optional<double> CurveQuartic::maximumCurveOutput() const { | |
| 310 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::CurveQuartic_Impl>()->maximumCurveOutput(); |
| 311 | } | ||
| 312 | |||
| 313 | 1 | std::string CurveQuartic::inputUnitTypeforX() const { | |
| 314 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CurveQuartic_Impl>()->inputUnitTypeforX(); |
| 315 | } | ||
| 316 | |||
| 317 | 2 | bool CurveQuartic::isInputUnitTypeforXDefaulted() const { | |
| 318 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CurveQuartic_Impl>()->isInputUnitTypeforXDefaulted(); |
| 319 | } | ||
| 320 | |||
| 321 | 1 | std::string CurveQuartic::outputUnitType() const { | |
| 322 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::CurveQuartic_Impl>()->outputUnitType(); |
| 323 | } | ||
| 324 | |||
| 325 | 2 | bool CurveQuartic::isOutputUnitTypeDefaulted() const { | |
| 326 |
1/1✓ Branch 3 taken 2 times.
|
2 | return getImpl<detail::CurveQuartic_Impl>()->isOutputUnitTypeDefaulted(); |
| 327 | } | ||
| 328 | |||
| 329 | 14 | bool CurveQuartic::setCoefficient1Constant(double coefficient1Constant) { | |
| 330 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::CurveQuartic_Impl>()->setCoefficient1Constant(coefficient1Constant); |
| 331 | } | ||
| 332 | |||
| 333 | 14 | bool CurveQuartic::setCoefficient2x(double coefficient2x) { | |
| 334 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::CurveQuartic_Impl>()->setCoefficient2x(coefficient2x); |
| 335 | } | ||
| 336 | |||
| 337 | 14 | bool CurveQuartic::setCoefficient3xPOW2(double coefficient3xPOW2) { | |
| 338 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::CurveQuartic_Impl>()->setCoefficient3xPOW2(coefficient3xPOW2); |
| 339 | } | ||
| 340 | |||
| 341 | 14 | bool CurveQuartic::setCoefficient4xPOW3(double coefficient4xPOW3) { | |
| 342 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::CurveQuartic_Impl>()->setCoefficient4xPOW3(coefficient4xPOW3); |
| 343 | } | ||
| 344 | |||
| 345 | 14 | bool CurveQuartic::setCoefficient5xPOW4(double coefficient5xPOW4) { | |
| 346 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::CurveQuartic_Impl>()->setCoefficient5xPOW4(coefficient5xPOW4); |
| 347 | } | ||
| 348 | |||
| 349 | 14 | bool CurveQuartic::setMinimumValueofx(double minimumValueofx) { | |
| 350 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::CurveQuartic_Impl>()->setMinimumValueofx(minimumValueofx); |
| 351 | } | ||
| 352 | |||
| 353 | 14 | bool CurveQuartic::setMaximumValueofx(double maximumValueofx) { | |
| 354 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<detail::CurveQuartic_Impl>()->setMaximumValueofx(maximumValueofx); |
| 355 | } | ||
| 356 | |||
| 357 | 14 | bool CurveQuartic::setMinimumCurveOutput(double minimumCurveOutput) { | |
| 358 |
2/2✓ Branch 3 taken 14 times.
✓ Branch 6 taken 14 times.
|
14 | return getImpl<detail::CurveQuartic_Impl>()->setMinimumCurveOutput(minimumCurveOutput); |
| 359 | } | ||
| 360 | |||
| 361 | ✗ | void CurveQuartic::resetMinimumCurveOutput() { | |
| 362 | ✗ | getImpl<detail::CurveQuartic_Impl>()->resetMinimumCurveOutput(); | |
| 363 | ✗ | } | |
| 364 | |||
| 365 | 14 | bool CurveQuartic::setMaximumCurveOutput(double maximumCurveOutput) { | |
| 366 |
2/2✓ Branch 3 taken 14 times.
✓ Branch 6 taken 14 times.
|
14 | return getImpl<detail::CurveQuartic_Impl>()->setMaximumCurveOutput(maximumCurveOutput); |
| 367 | } | ||
| 368 | |||
| 369 | ✗ | void CurveQuartic::resetMaximumCurveOutput() { | |
| 370 | ✗ | getImpl<detail::CurveQuartic_Impl>()->resetMaximumCurveOutput(); | |
| 371 | ✗ | } | |
| 372 | |||
| 373 | 8 | bool CurveQuartic::setInputUnitTypeforX(const std::string& inputUnitTypeforX) { | |
| 374 |
1/1✓ Branch 3 taken 8 times.
|
8 | return getImpl<detail::CurveQuartic_Impl>()->setInputUnitTypeforX(inputUnitTypeforX); |
| 375 | } | ||
| 376 | |||
| 377 | ✗ | void CurveQuartic::resetInputUnitTypeforX() { | |
| 378 | ✗ | getImpl<detail::CurveQuartic_Impl>()->resetInputUnitTypeforX(); | |
| 379 | ✗ | } | |
| 380 | |||
| 381 | 8 | bool CurveQuartic::setOutputUnitType(const std::string& outputUnitType) { | |
| 382 |
1/1✓ Branch 3 taken 8 times.
|
8 | return getImpl<detail::CurveQuartic_Impl>()->setOutputUnitType(outputUnitType); |
| 383 | } | ||
| 384 | |||
| 385 | ✗ | void CurveQuartic::resetOutputUnitType() { | |
| 386 | ✗ | getImpl<detail::CurveQuartic_Impl>()->resetOutputUnitType(); | |
| 387 | ✗ | } | |
| 388 | |||
| 389 | /// @cond | ||
| 390 |
1/1✓ Branch 3 taken 3 times.
|
3 | CurveQuartic::CurveQuartic(std::shared_ptr<detail::CurveQuartic_Impl> impl) : Curve(std::move(impl)) {} |
| 391 | /// @endcond | ||
| 392 | |||
| 393 | } // namespace model | ||
| 394 | } // namespace openstudio | ||
| 395 |