src/model/SetpointManagerScheduled.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_SETPOINTMANAGERSCHEDULED_HPP | ||
| 7 | #define MODEL_SETPOINTMANAGERSCHEDULED_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "SetpointManager.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | class Schedule; | ||
| 17 | |||
| 18 | namespace detail { | ||
| 19 | |||
| 20 | class SetpointManagerScheduled_Impl; | ||
| 21 | |||
| 22 | } | ||
| 23 | |||
| 24 | /** SetpointManagerScheduled is an interface to theIDD object | ||
| 25 | * named "OS:SetpointManager:Scheduled" | ||
| 26 | * | ||
| 27 | * The purpose of this class is to simplify the construction and manipulation | ||
| 28 | * of the EnergyPlus SetpointManager:Scheduled object. | ||
| 29 | */ | ||
| 30 | class MODEL_API SetpointManagerScheduled : public SetpointManager | ||
| 31 | { | ||
| 32 | public: | ||
| 33 | /** @name Constructors and Destructors */ | ||
| 34 | //@{ | ||
| 35 | |||
| 36 | /** Constructs a new SetpointManagerScheduled object and places it inside | ||
| 37 | * model. Sets controlVariable to 'Temperature'. Sets setpointSchedule's | ||
| 38 | * ScheduleTypeLimits if necessary and possible. */ | ||
| 39 | SetpointManagerScheduled(const Model& model, Schedule& setpointSchedule); | ||
| 40 | |||
| 41 | /** Constructs a new SetpointManagerScheduled object and places it inside | ||
| 42 | * model. */ | ||
| 43 | SetpointManagerScheduled(const Model& model, const std::string& controlVariable, Schedule& setpointSchedule); | ||
| 44 | |||
| 45 | 83 | virtual ~SetpointManagerScheduled() override = default; | |
| 46 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 47 | ✗ | SetpointManagerScheduled(const SetpointManagerScheduled& other) = default; | |
| 48 | 12 | SetpointManagerScheduled(SetpointManagerScheduled&& other) = default; | |
| 49 | ✗ | SetpointManagerScheduled& operator=(const SetpointManagerScheduled&) = default; | |
| 50 | ✗ | SetpointManagerScheduled& operator=(SetpointManagerScheduled&&) = default; | |
| 51 | |||
| 52 | //@} | ||
| 53 | |||
| 54 | static IddObjectType iddObjectType(); | ||
| 55 | |||
| 56 | static std::vector<std::string> controlVariableValues(); | ||
| 57 | |||
| 58 | /** @name Getters */ | ||
| 59 | //@{ | ||
| 60 | |||
| 61 | /** Returns the Node referred to by the SetpointNodeName field. **/ | ||
| 62 | boost::optional<Node> setpointNode() const; | ||
| 63 | |||
| 64 | /** Returns the Control Variable **/ | ||
| 65 | std::string controlVariable() const; | ||
| 66 | |||
| 67 | /** Returns the Schedule **/ | ||
| 68 | Schedule schedule() const; | ||
| 69 | |||
| 70 | /** Returns true if this object has a schedule, it is an error if this object does not have a schedule **/ | ||
| 71 | bool hasSchedule() const; | ||
| 72 | |||
| 73 | //@} | ||
| 74 | /** @name Setters */ | ||
| 75 | //@{ | ||
| 76 | |||
| 77 | /** Sets the Control Variable **/ | ||
| 78 | bool setControlVariable(const std::string& controlVariable); | ||
| 79 | |||
| 80 | /** Sets the Schedule **/ | ||
| 81 | bool setSchedule(Schedule& schedule); | ||
| 82 | |||
| 83 | //@} | ||
| 84 | /** @name Other */ | ||
| 85 | //@{ | ||
| 86 | |||
| 87 | /** Sets control variable and schedule simultaneously. Use in the case that the | ||
| 88 | * control variable change implies a change in schedule units. */ | ||
| 89 | bool setControlVariableAndSchedule(const std::string& controlVariable, Schedule& schedule); | ||
| 90 | |||
| 91 | //@} | ||
| 92 | protected: | ||
| 93 | friend class Model; | ||
| 94 | friend class openstudio::IdfObject; | ||
| 95 | friend class openstudio::detail::IdfObject_Impl; | ||
| 96 | friend class detail::SetpointManagerScheduled_Impl; | ||
| 97 | |||
| 98 | /// @cond | ||
| 99 | using ImplType = detail::SetpointManagerScheduled_Impl; | ||
| 100 | |||
| 101 | explicit SetpointManagerScheduled(std::shared_ptr<detail::SetpointManagerScheduled_Impl> impl); | ||
| 102 | |||
| 103 | private: | ||
| 104 | − | REGISTER_LOGGER("openstudio.model.SetpointManagerScheduled"); | |
| 105 | /// @endcond | ||
| 106 | }; | ||
| 107 | |||
| 108 | } // namespace model | ||
| 109 | |||
| 110 | } // namespace openstudio | ||
| 111 | |||
| 112 | #endif // MODEL_SETPOINTMANAGERSCHEDULED_HPP | ||
| 113 |