src/energyplus/ForwardTranslator/ForwardTranslateCurveDoubleExponentialDecay.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 "../ForwardTranslator.hpp" | ||
| 7 | |||
| 8 | #include "../../model/CurveDoubleExponentialDecay.hpp" | ||
| 9 | #include "../../model/CurveDoubleExponentialDecay_Impl.hpp" | ||
| 10 | |||
| 11 | #include "../../utilities/core/Assert.hpp" | ||
| 12 | |||
| 13 | #include <utilities/idd/Curve_DoubleExponentialDecay_FieldEnums.hxx> | ||
| 14 | #include <utilities/idd/IddEnums.hxx> | ||
| 15 | |||
| 16 | using namespace openstudio::model; | ||
| 17 | using namespace std; | ||
| 18 | |||
| 19 | namespace openstudio { | ||
| 20 | namespace energyplus { | ||
| 21 | |||
| 22 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateCurveDoubleExponentialDecay(CurveDoubleExponentialDecay& modelObject) { | |
| 23 | ✗ | IdfObject idfObject(IddObjectType::Curve_DoubleExponentialDecay); | |
| 24 | |||
| 25 | ✗ | m_idfObjects.push_back(idfObject); | |
| 26 | |||
| 27 | ✗ | OptionalString s; | |
| 28 | ✗ | OptionalDouble d; | |
| 29 | |||
| 30 | ✗ | if ((s = modelObject.name())) { | |
| 31 | ✗ | idfObject.setName(*s); | |
| 32 | } | ||
| 33 | |||
| 34 | ✗ | idfObject.setDouble(Curve_DoubleExponentialDecayFields::Coefficient1C1, modelObject.coefficient1C1()); | |
| 35 | ✗ | idfObject.setDouble(Curve_DoubleExponentialDecayFields::Coefficient2C2, modelObject.coefficient2C2()); | |
| 36 | ✗ | idfObject.setDouble(Curve_DoubleExponentialDecayFields::Coefficient3C3, modelObject.coefficient3C3()); | |
| 37 | ✗ | idfObject.setDouble(Curve_DoubleExponentialDecayFields::Coefficient4C4, modelObject.coefficient4C4()); | |
| 38 | ✗ | idfObject.setDouble(Curve_DoubleExponentialDecayFields::Coefficient5C5, modelObject.coefficient5C5()); | |
| 39 | ✗ | idfObject.setDouble(Curve_DoubleExponentialDecayFields::MinimumValueofx, modelObject.minimumValueofx()); | |
| 40 | ✗ | idfObject.setDouble(Curve_DoubleExponentialDecayFields::MaximumValueofx, modelObject.maximumValueofx()); | |
| 41 | ✗ | if ((d = modelObject.minimumCurveOutput())) { | |
| 42 | ✗ | idfObject.setDouble(Curve_DoubleExponentialDecayFields::MinimumCurveOutput, *d); | |
| 43 | } | ||
| 44 | ✗ | if ((d = modelObject.maximumCurveOutput())) { | |
| 45 | ✗ | idfObject.setDouble(Curve_DoubleExponentialDecayFields::MaximumCurveOutput, *d); | |
| 46 | } | ||
| 47 | ✗ | if (!modelObject.isInputUnitTypeforxDefaulted()) { | |
| 48 | ✗ | idfObject.setString(Curve_DoubleExponentialDecayFields::InputUnitTypeforx, modelObject.inputUnitTypeforx()); | |
| 49 | } | ||
| 50 | ✗ | if (!modelObject.isOutputUnitTypeDefaulted()) { | |
| 51 | ✗ | idfObject.setString(Curve_DoubleExponentialDecayFields::OutputUnitType, modelObject.outputUnitType()); | |
| 52 | } | ||
| 53 | |||
| 54 | ✗ | return idfObject; | |
| 55 | ✗ | } | |
| 56 | |||
| 57 | } // namespace energyplus | ||
| 58 | } // namespace openstudio | ||
| 59 |