src/energyplus/ForwardTranslator/ForwardTranslatePerformancePrecisionTradeoffs.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/Model.hpp" | ||
| 9 | #include "../../model/PerformancePrecisionTradeoffs.hpp" | ||
| 10 | #include "../../model/PerformancePrecisionTradeoffs_Impl.hpp" | ||
| 11 | |||
| 12 | #include <utilities/idd/PerformancePrecisionTradeoffs_FieldEnums.hxx> | ||
| 13 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 14 | #include <utilities/idd/IddEnums.hxx> | ||
| 15 | |||
| 16 | using namespace openstudio::model; | ||
| 17 | |||
| 18 | using namespace std; | ||
| 19 | |||
| 20 | namespace openstudio { | ||
| 21 | |||
| 22 | namespace energyplus { | ||
| 23 | |||
| 24 | 1 | boost::optional<IdfObject> ForwardTranslator::translatePerformancePrecisionTradeoffs(PerformancePrecisionTradeoffs& modelObject) { | |
| 25 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject(openstudio::IddObjectType::PerformancePrecisionTradeoffs); |
| 26 | |||
| 27 |
1/1✓ Branch 1 taken 1 time.
|
1 | m_idfObjects.push_back(idfObject); |
| 28 | |||
| 29 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
1 | if (modelObject.useCoilDirectSolutions()) { |
| 30 | ✗ | idfObject.setString(PerformancePrecisionTradeoffsFields::UseCoilDirectSolutions, "Yes"); | |
| 31 | } else { | ||
| 32 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(PerformancePrecisionTradeoffsFields::UseCoilDirectSolutions, "No"); |
| 33 | } | ||
| 34 | |||
| 35 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
1 | if (!modelObject.isZoneRadiantExchangeAlgorithmDefaulted()) { |
| 36 | ✗ | idfObject.setString(PerformancePrecisionTradeoffsFields::ZoneRadiantExchangeAlgorithm, modelObject.zoneRadiantExchangeAlgorithm()); | |
| 37 | } | ||
| 38 | |||
| 39 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
1 | if (!modelObject.isOverrideModeDefaulted()) { |
| 40 | ✗ | idfObject.setString(PerformancePrecisionTradeoffsFields::OverrideMode, modelObject.overrideMode()); | |
| 41 | } | ||
| 42 | |||
| 43 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
1 | if (!modelObject.isMaxZoneTempDiffDefaulted()) { |
| 44 | ✗ | idfObject.setDouble(PerformancePrecisionTradeoffsFields::MaxZoneTempDiff, modelObject.maxZoneTempDiff()); | |
| 45 | } | ||
| 46 | |||
| 47 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
1 | if (!modelObject.isMaxAllowedDelTempDefaulted()) { |
| 48 | ✗ | idfObject.setDouble(PerformancePrecisionTradeoffsFields::MaxAllowedDelTemp, modelObject.maxAllowedDelTemp()); | |
| 49 | } | ||
| 50 | |||
| 51 |
2/3✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
|
1 | if (modelObject.useRepresentativeSurfacesforCalculations()) { |
| 52 | ✗ | idfObject.setString(PerformancePrecisionTradeoffsFields::UseRepresentativeSurfacesforCalculations, "Yes"); | |
| 53 | } else { | ||
| 54 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(PerformancePrecisionTradeoffsFields::UseRepresentativeSurfacesforCalculations, "No"); |
| 55 | } | ||
| 56 | |||
| 57 |
1/1✓ Branch 1 taken 1 time.
|
2 | return boost::optional<IdfObject>(idfObject); |
| 58 | 1 | } | |
| 59 | |||
| 60 | } // namespace energyplus | ||
| 61 | |||
| 62 | } // namespace openstudio | ||
| 63 |