src/energyplus/ForwardTranslator/ForwardTranslateScheduleConstant.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/Model.hpp" | ||
| 9 | #include "../../model/ScheduleConstant.hpp" | ||
| 10 | #include "../../model/ScheduleConstant_Impl.hpp" | ||
| 11 | |||
| 12 | #include <utilities/idd/Schedule_Constant_FieldEnums.hxx> | ||
| 13 | #include <utilities/idd/OS_Schedule_Constant_FieldEnums.hxx> | ||
| 14 | |||
| 15 | #include "../../utilities/idd/IddEnums.hpp" | ||
| 16 | #include <utilities/idd/IddEnums.hxx> | ||
| 17 | #include <utilities/idd/IddFactory.hxx> | ||
| 18 | |||
| 19 | using namespace openstudio::model; | ||
| 20 | |||
| 21 | using namespace std; | ||
| 22 | |||
| 23 | namespace openstudio { | ||
| 24 | |||
| 25 | namespace energyplus { | ||
| 26 | |||
| 27 | 3071 | boost::optional<IdfObject> ForwardTranslator::translateScheduleConstant(ScheduleConstant& modelObject) { | |
| 28 |
2/2✓ Branch 1 taken 3071 times.
✓ Branch 4 taken 3071 times.
|
3071 | IdfObject scheduleConstant = createAndRegisterIdfObject(openstudio::IddObjectType::Schedule_Constant, modelObject); |
| 29 | |||
| 30 |
3/3✓ Branch 1 taken 3071 times.
✓ Branch 4 taken 3071 times.
✓ Branch 7 taken 3071 times.
|
3071 | scheduleConstant.setName(modelObject.name().get()); |
| 31 | 3071 | scheduleConstant.setString(Schedule_ConstantFields::ScheduleTypeLimitsName, | |
| 32 |
3/3✓ Branch 1 taken 3071 times.
✓ Branch 4 taken 3071 times.
✓ Branch 7 taken 3071 times.
|
3071 | modelObject.getString(OS_Schedule_ConstantFields::ScheduleTypeLimitsName, true).get()); |
| 33 |
2/2✓ Branch 1 taken 3071 times.
✓ Branch 4 taken 3071 times.
|
3071 | scheduleConstant.setDouble(Schedule_ConstantFields::HourlyValue, modelObject.value()); |
| 34 | |||
| 35 |
1/1✓ Branch 1 taken 3071 times.
|
6142 | return boost::optional<IdfObject>(scheduleConstant); |
| 36 | 3071 | } | |
| 37 | |||
| 38 | } // namespace energyplus | ||
| 39 | |||
| 40 | } // namespace openstudio | ||
| 41 |