src/energyplus/ForwardTranslator/ForwardTranslateSetpointManagerWarmestTemperatureFlow.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/SetpointManagerWarmestTemperatureFlow.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_WarmestTemperatureFlow_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> ForwardTranslator::translateSetpointManagerWarmestTemperatureFlow(SetpointManagerWarmestTemperatureFlow& modelObject) { | |
| 23 | ✗ | std::string s; | |
| 24 | double n; | ||
| 25 | ✗ | boost::optional<Node> node; | |
| 26 | |||
| 27 | ✗ | IdfObject idfObject(IddObjectType::SetpointManager_WarmestTemperatureFlow); | |
| 28 | |||
| 29 | ✗ | m_idfObjects.push_back(idfObject); | |
| 30 | |||
| 31 | // Name | ||
| 32 | ✗ | s = modelObject.name().get(); | |
| 33 | ✗ | idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::Name, s); | |
| 34 | |||
| 35 | // ControlVariable | ||
| 36 | ✗ | idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::ControlVariable, "Temperature"); | |
| 37 | |||
| 38 | // HVACAirLoopName | ||
| 39 | ✗ | if (auto node = modelObject.setpointNode()) { | |
| 40 | ✗ | if (auto airLoop = node->airLoopHVAC()) { | |
| 41 | ✗ | idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::HVACAirLoopName, airLoop->name().get()); | |
| 42 | ✗ | } | |
| 43 | ✗ | } | |
| 44 | |||
| 45 | // Strategy | ||
| 46 | ✗ | s = modelObject.strategy(); | |
| 47 | ✗ | idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::Strategy, s); | |
| 48 | |||
| 49 | // MinimumSupplyAirTemperature | ||
| 50 | ✗ | n = modelObject.minimumSetpointTemperature(); | |
| 51 | ✗ | idfObject.setDouble(SetpointManager_WarmestTemperatureFlowFields::MinimumSetpointTemperature, n); | |
| 52 | |||
| 53 | // MaximumSupplyAirTemperature | ||
| 54 | ✗ | n = modelObject.maximumSetpointTemperature(); | |
| 55 | ✗ | idfObject.setDouble(SetpointManager_WarmestTemperatureFlowFields::MaximumSetpointTemperature, n); | |
| 56 | |||
| 57 | // SetpointNodeorNodeListName | ||
| 58 | ✗ | node = modelObject.setpointNode(); | |
| 59 | ✗ | if (node) { | |
| 60 | ✗ | idfObject.setString(SetpointManager_WarmestTemperatureFlowFields::SetpointNodeorNodeListName, node->name().get()); | |
| 61 | } | ||
| 62 | |||
| 63 | // MinimumTurndownRatio | ||
| 64 | ✗ | n = modelObject.minimumTurndownRatio(); | |
| 65 | ✗ | idfObject.setDouble(SetpointManager_WarmestTemperatureFlowFields::MinimumTurndownRatio, n); | |
| 66 | |||
| 67 | ✗ | return idfObject; | |
| 68 | ✗ | } | |
| 69 | |||
| 70 | } // namespace energyplus | ||
| 71 | |||
| 72 | } // namespace openstudio | ||
| 73 |