src/energyplus/ForwardTranslator/ForwardTranslateSimpleGlazing.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/SimpleGlazing.hpp" | ||
| 9 | #include "../../model/SimpleGlazing_Impl.hpp" | ||
| 10 | |||
| 11 | #include <utilities/idd/WindowMaterial_SimpleGlazingSystem_FieldEnums.hxx> | ||
| 12 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 13 | #include <utilities/idd/IddEnums.hxx> | ||
| 14 | |||
| 15 | using namespace openstudio::model; | ||
| 16 | |||
| 17 | using namespace std; | ||
| 18 | |||
| 19 | namespace openstudio { | ||
| 20 | |||
| 21 | namespace energyplus { | ||
| 22 | |||
| 23 | 49 | boost::optional<IdfObject> ForwardTranslator::translateSimpleGlazing(SimpleGlazing& modelObject) { | |
| 24 |
2/2✓ Branch 1 taken 49 times.
✓ Branch 4 taken 49 times.
|
49 | IdfObject idfObject(openstudio::IddObjectType::WindowMaterial_SimpleGlazingSystem); |
| 25 | |||
| 26 |
1/1✓ Branch 1 taken 49 times.
|
49 | m_idfObjects.push_back(idfObject); |
| 27 | |||
| 28 |
3/3✓ Branch 1 taken 49 times.
✓ Branch 4 taken 49 times.
✓ Branch 7 taken 49 times.
|
49 | idfObject.setString(WindowMaterial_SimpleGlazingSystemFields::Name, modelObject.name().get()); |
| 29 | |||
| 30 |
2/2✓ Branch 1 taken 49 times.
✓ Branch 4 taken 49 times.
|
49 | idfObject.setDouble(WindowMaterial_SimpleGlazingSystemFields::UFactor, modelObject.uFactor()); |
| 31 | |||
| 32 |
2/2✓ Branch 1 taken 49 times.
✓ Branch 4 taken 49 times.
|
49 | idfObject.setDouble(WindowMaterial_SimpleGlazingSystemFields::SolarHeatGainCoefficient, modelObject.solarHeatGainCoefficient()); |
| 33 | |||
| 34 |
1/1✓ Branch 1 taken 49 times.
|
49 | OptionalDouble d = modelObject.visibleTransmittance(); |
| 35 |
2/2✓ Branch 0 taken 35 times.
✓ Branch 1 taken 14 times.
|
49 | if (d) { |
| 36 |
2/2✓ Branch 1 taken 35 times.
✓ Branch 4 taken 35 times.
|
35 | idfObject.setDouble(WindowMaterial_SimpleGlazingSystemFields::VisibleTransmittance, *d); |
| 37 | } | ||
| 38 | |||
| 39 |
1/1✓ Branch 1 taken 49 times.
|
98 | return boost::optional<IdfObject>(idfObject); |
| 40 | 49 | } | |
| 41 | |||
| 42 | } // namespace energyplus | ||
| 43 | |||
| 44 | } // namespace openstudio | ||
| 45 |