src/model/EnergyManagementSystemActuator.hpp
| 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 | #ifndef MODEL_ENERGYMANAGEMENTSYSTEMACTUATOR_HPP | ||
| 7 | #define MODEL_ENERGYMANAGEMENTSYSTEMACTUATOR_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject.hpp" | ||
| 11 | |||
| 12 | #include "../utilities/core/Deprecated.hpp" | ||
| 13 | |||
| 14 | namespace openstudio { | ||
| 15 | |||
| 16 | namespace energyplus { | ||
| 17 | class ReverseTranslator; | ||
| 18 | } | ||
| 19 | |||
| 20 | namespace model { | ||
| 21 | |||
| 22 | class ThermalZone; | ||
| 23 | class Space; | ||
| 24 | |||
| 25 | namespace detail { | ||
| 26 | |||
| 27 | class EnergyManagementSystemActuator_Impl; | ||
| 28 | |||
| 29 | } // namespace detail | ||
| 30 | |||
| 31 | /** EnergyManagementSystemActuator is a ModelObject that wraps the OpenStudio IDD object 'OS:EnergyManagementSystem:Actuator'. */ | ||
| 32 | class MODEL_API EnergyManagementSystemActuator : public ModelObject | ||
| 33 | { | ||
| 34 | public: | ||
| 35 | /** @name Constructors and Destructors */ | ||
| 36 | //@{ | ||
| 37 | |||
| 38 | /** Constructor to use for any actuated component that is not a SpaceLoadInstance */ | ||
| 39 | explicit EnergyManagementSystemActuator(const ModelObject& actuatedComponent, const std::string& actuatedComponentType, | ||
| 40 | const std::string& actuatedComponentControlType); | ||
| 41 | /**These constructors below are for SpaceloadInstances that are defined in SpaceTypes that are used in Spaces. | ||
| 42 | * Upon translation, the SpaceLoadInstances use ZoneLists which are not avail in OS | ||
| 43 | * The ZoneListName is the SpaceType name | ||
| 44 | * The Zone's are the Space->ThermalZone names | ||
| 45 | * So to attach to a future zone, use the TZ or the Space that the SpaceLoadInstance will operate on **/ | ||
| 46 | |||
| 47 | // TODO: the first parameter should be a SpaceLoadInstance, not a ModelObject | ||
| 48 | /** Constructor that will only accept a SpaceLoadInstance as the actuated component. Use this version if do not plan on disabling the Space | ||
| 49 | * Translation in the Forward Translator */ | ||
| 50 | explicit EnergyManagementSystemActuator(const ModelObject& actuatedComponent, const std::string& actuatedComponentType, | ||
| 51 | const std::string& actuatedComponentControlType, const Space& space); | ||
| 52 | |||
| 53 | // TODO: the first parameter should be a SpaceLoadInstance, not a ModelObject | ||
| 54 | /** Constructor that will only accept a SpaceLoadInstance as the actuated component. Use this version if you plan on disabling the Space | ||
| 55 | * Translation in the Forward Translator */ | ||
| 56 | explicit EnergyManagementSystemActuator(const ModelObject& actuatedComponent, const std::string& actuatedComponentType, | ||
| 57 | const std::string& actuatedComponentControlType, const ThermalZone& thermalZone); | ||
| 58 | |||
| 59 | 1223 | virtual ~EnergyManagementSystemActuator() override = default; | |
| 60 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 61 | 126 | EnergyManagementSystemActuator(const EnergyManagementSystemActuator& other) = default; | |
| 62 | 494 | EnergyManagementSystemActuator(EnergyManagementSystemActuator&& other) = default; | |
| 63 | ✗ | EnergyManagementSystemActuator& operator=(const EnergyManagementSystemActuator&) = default; | |
| 64 | 1 | EnergyManagementSystemActuator& operator=(EnergyManagementSystemActuator&&) = default; | |
| 65 | |||
| 66 | //@} | ||
| 67 | |||
| 68 | static IddObjectType iddObjectType(); | ||
| 69 | |||
| 70 | /** @name Getters */ | ||
| 71 | //@{ | ||
| 72 | |||
| 73 | boost::optional<ModelObject> actuatedComponent() const; // TODO: this should NOT be an optional | ||
| 74 | |||
| 75 | std::string actuatedComponentControlType() const; | ||
| 76 | |||
| 77 | std::string actuatedComponentType() const; | ||
| 78 | |||
| 79 | OS_DEPRECATED(3, 6, 0) boost::optional<ModelObject> zoneName() const; | ||
| 80 | |||
| 81 | boost::optional<ModelObject> zoneOrSpace() const; | ||
| 82 | boost::optional<ThermalZone> thermalZone() const; | ||
| 83 | boost::optional<Space> space() const; | ||
| 84 | |||
| 85 | //@} | ||
| 86 | /** @name Setters */ | ||
| 87 | //@{ | ||
| 88 | |||
| 89 | bool setActuatedComponent(const ModelObject& modelObject); | ||
| 90 | |||
| 91 | bool setActuatedComponentControlType(const std::string& actuatedComponentControlType); | ||
| 92 | |||
| 93 | bool setActuatedComponentType(const std::string& actuatedComponentType); | ||
| 94 | //set the ZoneName field to the ThermalZone's names | ||
| 95 | bool setThermalZone(const ThermalZone& thermalZone); | ||
| 96 | //set the ZoneName field to the Space's ThermalZone's name | ||
| 97 | bool setSpace(const Space& space); | ||
| 98 | |||
| 99 | OS_DEPRECATED(3, 6, 0) void resetZoneName(); | ||
| 100 | void resetZoneOrSpace(); | ||
| 101 | |||
| 102 | //@} | ||
| 103 | /** @name Other */ | ||
| 104 | //@{ | ||
| 105 | |||
| 106 | //@} | ||
| 107 | protected: | ||
| 108 | /// @cond | ||
| 109 | using ImplType = detail::EnergyManagementSystemActuator_Impl; | ||
| 110 | |||
| 111 | explicit EnergyManagementSystemActuator(std::shared_ptr<detail::EnergyManagementSystemActuator_Impl> impl); | ||
| 112 | |||
| 113 | friend class detail::EnergyManagementSystemActuator_Impl; | ||
| 114 | friend class Model; | ||
| 115 | friend class IdfObject; | ||
| 116 | friend class openstudio::detail::IdfObject_Impl; | ||
| 117 | |||
| 118 | // These are for the ReverseTranslator | ||
| 119 | explicit EnergyManagementSystemActuator(const ModelObject& actuatedComponent); | ||
| 120 | |||
| 121 | explicit EnergyManagementSystemActuator(const Model& model); | ||
| 122 | |||
| 123 | friend class energyplus::ReverseTranslator; | ||
| 124 | /// @endcond | ||
| 125 | private: | ||
| 126 | − | REGISTER_LOGGER("openstudio.model.EnergyManagementSystemActuator"); | |
| 127 | }; | ||
| 128 | |||
| 129 | /** \relates EnergyManagementSystemActuator*/ | ||
| 130 | using OptionalEnergyManagementSystemActuator = boost::optional<EnergyManagementSystemActuator>; | ||
| 131 | |||
| 132 | /** \relates EnergyManagementSystemActuator*/ | ||
| 133 | using EnergyManagementSystemActuatorVector = std::vector<EnergyManagementSystemActuator>; | ||
| 134 | |||
| 135 | } // namespace model | ||
| 136 | } // namespace openstudio | ||
| 137 | |||
| 138 | #endif // MODEL_ENERGYMANAGEMENTSYSTEMACTUATOR_HPP | ||
| 139 |