src/energyplus/ForwardTranslator/ForwardTranslateZoneAirHeatBalanceAlgorithm.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 | #include "../../model/ZoneAirHeatBalanceAlgorithm.hpp" | ||
| 8 | |||
| 9 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 10 | #include <utilities/idd/ZoneAirHeatBalanceAlgorithm_FieldEnums.hxx> | ||
| 11 | #include <utilities/idd/IddEnums.hxx> | ||
| 12 | |||
| 13 | using namespace openstudio::model; | ||
| 14 | |||
| 15 | namespace openstudio { | ||
| 16 | |||
| 17 | namespace energyplus { | ||
| 18 | |||
| 19 | 45 | boost::optional<IdfObject> ForwardTranslator::translateZoneAirHeatBalanceAlgorithm(ZoneAirHeatBalanceAlgorithm& modelObject) { | |
| 20 | |||
| 21 |
2/2✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
|
45 | IdfObject idfObject = createAndRegisterIdfObject(openstudio::IddObjectType::ZoneAirHeatBalanceAlgorithm, modelObject); |
| 22 |
2/2✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
|
45 | idfObject.setString(ZoneAirHeatBalanceAlgorithmFields::Algorithm, modelObject.algorithm()); |
| 23 | |||
| 24 |
2/3✓ Branch 1 taken 45 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 45 times.
|
45 | if (modelObject.doSpaceHeatBalanceforSizing()) { |
| 25 | ✗ | idfObject.setString(ZoneAirHeatBalanceAlgorithmFields::DoSpaceHeatBalanceforSizing, "Yes"); | |
| 26 | } else { | ||
| 27 |
2/2✓ Branch 1 taken 45 times.
✓ Branch 4 taken 45 times.
|
90 | idfObject.setString(ZoneAirHeatBalanceAlgorithmFields::DoSpaceHeatBalanceforSizing, "No"); |
| 28 | } | ||
| 29 | |||
| 30 |
3/3✓ Branch 1 taken 45 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 44 times.
|
45 | if (modelObject.doSpaceHeatBalanceforSimulation()) { |
| 31 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(ZoneAirHeatBalanceAlgorithmFields::DoSpaceHeatBalanceforSimulation, "Yes"); |
| 32 | } else { | ||
| 33 |
2/2✓ Branch 1 taken 44 times.
✓ Branch 4 taken 44 times.
|
88 | idfObject.setString(ZoneAirHeatBalanceAlgorithmFields::DoSpaceHeatBalanceforSimulation, "No"); |
| 34 | } | ||
| 35 | |||
| 36 |
1/1✓ Branch 1 taken 45 times.
|
90 | return idfObject; |
| 37 | 45 | } | |
| 38 | |||
| 39 | } // namespace energyplus | ||
| 40 | |||
| 41 | } // namespace openstudio | ||
| 42 |