src/energyplus/ReverseTranslator/ReverseTranslateOutputControlReportingTolerances.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 "../ReverseTranslator.hpp" | ||
| 7 | |||
| 8 | #include "../../model/OutputControlReportingTolerances.hpp" | ||
| 9 | #include "../../model/OutputControlReportingTolerances_Impl.hpp" | ||
| 10 | |||
| 11 | #include <utilities/idd/OutputControl_ReportingTolerances_FieldEnums.hxx> | ||
| 12 | #include <utilities/idd/IddEnums.hxx> | ||
| 13 | |||
| 14 | using namespace openstudio::model; | ||
| 15 | |||
| 16 | namespace openstudio { | ||
| 17 | |||
| 18 | namespace energyplus { | ||
| 19 | |||
| 20 | 2 | boost::optional<ModelObject> ReverseTranslator::translateOutputControlReportingTolerances(const WorkspaceObject& workspaceObject) { | |
| 21 | 2 | boost::optional<ModelObject> result; | |
| 22 | |||
| 23 | // This is a Unique ModelObject | ||
| 24 |
1/1✓ Branch 1 taken 2 times.
|
2 | openstudio::model::OutputControlReportingTolerances modelObject = m_model.getUniqueModelObject<OutputControlReportingTolerances>(); |
| 25 | |||
| 26 | 2 | if (boost::optional<double> _toleranceforTimeHeatingSetpointNotMet = | |
| 27 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | workspaceObject.getDouble(OutputControl_ReportingTolerancesFields::ToleranceforTimeHeatingSetpointNotMet, true)) { |
| 28 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | modelObject.setToleranceforTimeHeatingSetpointNotMet(_toleranceforTimeHeatingSetpointNotMet.get()); |
| 29 | } | ||
| 30 | |||
| 31 | 2 | if (boost::optional<double> _toleranceforTimeCoolingSetpointNotMet = | |
| 32 |
2/3✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✗ Branch 4 not taken.
|
4 | workspaceObject.getDouble(OutputControl_ReportingTolerancesFields::ToleranceforTimeCoolingSetpointNotMet, true)) { |
| 33 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | modelObject.setToleranceforTimeCoolingSetpointNotMet(_toleranceforTimeCoolingSetpointNotMet.get()); |
| 34 | } | ||
| 35 | |||
| 36 |
1/1✓ Branch 1 taken 2 times.
|
2 | result = modelObject; |
| 37 | 4 | return result; | |
| 38 | |||
| 39 | 2 | } // End of translate function | |
| 40 | |||
| 41 | } // end namespace energyplus | ||
| 42 | } // end namespace openstudio | ||
| 43 |