src/energyplus/ForwardTranslator/ForwardTranslateZoneControlContaminantController.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/Schedule.hpp" | ||
| 8 | #include "../../model/Schedule_Impl.hpp" | ||
| 9 | #include "../../model/ThermalZone.hpp" | ||
| 10 | #include "../../model/ThermalZone_Impl.hpp" | ||
| 11 | #include "../../model/ZoneControlContaminantController.hpp" | ||
| 12 | #include "../../model/ZoneControlContaminantController_Impl.hpp" | ||
| 13 | #include <utilities/idd/ZoneControl_ContaminantController_FieldEnums.hxx> | ||
| 14 | #include <utilities/idd/IddEnums.hxx> | ||
| 15 | |||
| 16 | using namespace openstudio::model; | ||
| 17 | |||
| 18 | using namespace std; | ||
| 19 | |||
| 20 | namespace openstudio { | ||
| 21 | |||
| 22 | namespace energyplus { | ||
| 23 | |||
| 24 | ✗ | boost::optional<IdfObject> ForwardTranslator::translateZoneControlContaminantController(ZoneControlContaminantController& modelObject) { | |
| 25 | ✗ | IdfObject idfObject(openstudio::IddObjectType::ZoneControl_ContaminantController); | |
| 26 | |||
| 27 | ✗ | m_idfObjects.push_back(idfObject); | |
| 28 | |||
| 29 | { | ||
| 30 | ✗ | auto s = modelObject.name(); | |
| 31 | ✗ | idfObject.setName(s.get()); | |
| 32 | ✗ | } | |
| 33 | |||
| 34 | ✗ | if (auto tz = modelObject.getImpl<model::detail::ZoneControlContaminantController_Impl>()->controlledZone()) { | |
| 35 | ✗ | idfObject.setString(ZoneControl_ContaminantControllerFields::ZoneName, tz->name().get()); | |
| 36 | ✗ | } | |
| 37 | |||
| 38 | ✗ | if (auto s = modelObject.carbonDioxideControlAvailabilitySchedule()) { | |
| 39 | ✗ | idfObject.setString(ZoneControl_ContaminantControllerFields::CarbonDioxideControlAvailabilityScheduleName, s->name().get()); | |
| 40 | ✗ | } | |
| 41 | |||
| 42 | ✗ | if (auto s = modelObject.carbonDioxideSetpointSchedule()) { | |
| 43 | ✗ | idfObject.setString(ZoneControl_ContaminantControllerFields::CarbonDioxideSetpointScheduleName, s->name().get()); | |
| 44 | ✗ | } | |
| 45 | |||
| 46 | ✗ | if (auto s = modelObject.minimumCarbonDioxideConcentrationSchedule()) { | |
| 47 | ✗ | idfObject.setString(ZoneControl_ContaminantControllerFields::MinimumCarbonDioxideConcentrationScheduleName, s->name().get()); | |
| 48 | ✗ | } | |
| 49 | |||
| 50 | ✗ | if (auto s = modelObject.genericContaminantControlAvailabilitySchedule()) { | |
| 51 | ✗ | idfObject.setString(ZoneControl_ContaminantControllerFields::GenericContaminantControlAvailabilityScheduleName, s->name().get()); | |
| 52 | ✗ | } | |
| 53 | |||
| 54 | ✗ | if (auto s = modelObject.genericContaminantSetpointSchedule()) { | |
| 55 | ✗ | idfObject.setString(ZoneControl_ContaminantControllerFields::GenericContaminantSetpointScheduleName, s->name().get()); | |
| 56 | ✗ | } | |
| 57 | |||
| 58 | ✗ | return boost::optional<IdfObject>(idfObject); | |
| 59 | ✗ | } | |
| 60 | |||
| 61 | } // namespace energyplus | ||
| 62 | |||
| 63 | } // namespace openstudio | ||
| 64 |