src/energyplus/ForwardTranslator/ForwardTranslateSetpointManagerSingleZoneHumidityMinimum.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/SetpointManagerSingleZoneHumidityMinimum.hpp" | ||
| 8 | #include "../../model/ThermalZone.hpp" | ||
| 9 | #include "../../model/Node.hpp" | ||
| 10 | #include "../../model/Node_Impl.hpp" | ||
| 11 | #include "../../model/PortList.hpp" | ||
| 12 | #include <utilities/idd/SetpointManager_SingleZone_Humidity_Minimum_FieldEnums.hxx> | ||
| 13 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 14 | #include <utilities/idd/IddEnums.hxx> | ||
| 15 | |||
| 16 | using namespace openstudio::model; | ||
| 17 | |||
| 18 | namespace openstudio { | ||
| 19 | |||
| 20 | namespace energyplus { | ||
| 21 | |||
| 22 | boost::optional<IdfObject> | ||
| 23 | 1 | ForwardTranslator::translateSetpointManagerSingleZoneHumidityMinimum(SetpointManagerSingleZoneHumidityMinimum& modelObject) { | |
| 24 | 1 | boost::optional<double> d; | |
| 25 | |||
| 26 | // Name | ||
| 27 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | IdfObject idfObject = createRegisterAndNameIdfObject(openstudio::IddObjectType::SetpointManager_SingleZone_Humidity_Minimum, modelObject); |
| 28 | |||
| 29 | // ControlVariable \deprecated | ||
| 30 | // ScheduleName \deprecated | ||
| 31 | |||
| 32 | // ControlZoneAirNodeName | ||
| 33 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<ThermalZone> thermalZone = modelObject.controlZone()) { |
| 34 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | auto node = thermalZone->zoneAirNode(); |
| 35 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | idfObject.setString(SetpointManager_SingleZone_Humidity_MinimumFields::ControlZoneAirNodeName, node.name().get()); |
| 36 | 2 | } | |
| 37 | |||
| 38 | // Setpoint Node or NodeList Name | ||
| 39 |
2/3✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
|
2 | if (boost::optional<Node> node = modelObject.setpointNode()) { |
| 40 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
1 | idfObject.setString(SetpointManager_SingleZone_Humidity_MinimumFields::SetpointNodeorNodeListName, node->name().get()); |
| 41 | 1 | } | |
| 42 | |||
| 43 |
1/1✓ Branch 1 taken 1 time.
|
2 | return idfObject; |
| 44 | 1 | } | |
| 45 | |||
| 46 | } // namespace energyplus | ||
| 47 | |||
| 48 | } // namespace openstudio | ||
| 49 |