src/model/DefaultScheduleSet_Impl.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_DEFAULTSCHEDULESET_IMPL_HPP | ||
| 7 | #define MODEL_DEFAULTSCHEDULESET_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ResourceObject_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class Schedule; | ||
| 16 | class DefaultScheduleType; | ||
| 17 | class DefaultScheduleSet; | ||
| 18 | |||
| 19 | namespace detail { | ||
| 20 | |||
| 21 | /** DefaultScheduleSet_Impl is a ResourceObject_Impl that is the implementation class for DefaultScheduleSet.*/ | ||
| 22 | class MODEL_API DefaultScheduleSet_Impl : public ResourceObject_Impl | ||
| 23 | { | ||
| 24 | |||
| 25 | public: | ||
| 26 | /** @name Constructors and Destructors */ | ||
| 27 | //@{ | ||
| 28 | |||
| 29 | DefaultScheduleSet_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 30 | |||
| 31 | DefaultScheduleSet_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 32 | |||
| 33 | DefaultScheduleSet_Impl(const DefaultScheduleSet_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 34 | |||
| 35 | 704 | virtual ~DefaultScheduleSet_Impl() override = default; | |
| 36 | |||
| 37 | //@} | ||
| 38 | |||
| 39 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 40 | |||
| 41 | virtual IddObjectType iddObjectType() const override; | ||
| 42 | |||
| 43 | virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override; | ||
| 44 | |||
| 45 | /** @name Getters */ | ||
| 46 | //@{ | ||
| 47 | |||
| 48 | boost::optional<Schedule> hoursofOperationSchedule() const; | ||
| 49 | |||
| 50 | boost::optional<Schedule> numberofPeopleSchedule() const; | ||
| 51 | |||
| 52 | boost::optional<Schedule> peopleActivityLevelSchedule() const; | ||
| 53 | |||
| 54 | boost::optional<Schedule> lightingSchedule() const; | ||
| 55 | |||
| 56 | boost::optional<Schedule> electricEquipmentSchedule() const; | ||
| 57 | |||
| 58 | boost::optional<Schedule> gasEquipmentSchedule() const; | ||
| 59 | |||
| 60 | boost::optional<Schedule> hotWaterEquipmentSchedule() const; | ||
| 61 | |||
| 62 | boost::optional<Schedule> steamEquipmentSchedule() const; | ||
| 63 | |||
| 64 | boost::optional<Schedule> otherEquipmentSchedule() const; | ||
| 65 | |||
| 66 | boost::optional<Schedule> ventilationperPersonSchedule() const; | ||
| 67 | |||
| 68 | boost::optional<Schedule> ventilationperFloorAreaSchedule() const; | ||
| 69 | |||
| 70 | boost::optional<Schedule> infiltrationSchedule() const; | ||
| 71 | |||
| 72 | //@} | ||
| 73 | /** @name Setters */ | ||
| 74 | //@{ | ||
| 75 | |||
| 76 | bool setHoursofOperationSchedule(Schedule& schedule); | ||
| 77 | |||
| 78 | void resetHoursofOperationSchedule(); | ||
| 79 | |||
| 80 | bool setNumberofPeopleSchedule(Schedule& schedule); | ||
| 81 | |||
| 82 | void resetNumberofPeopleSchedule(); | ||
| 83 | |||
| 84 | bool setPeopleActivityLevelSchedule(Schedule& schedule); | ||
| 85 | |||
| 86 | void resetPeopleActivityLevelSchedule(); | ||
| 87 | |||
| 88 | bool setLightingSchedule(Schedule& schedule); | ||
| 89 | |||
| 90 | void resetLightingSchedule(); | ||
| 91 | |||
| 92 | bool setElectricEquipmentSchedule(Schedule& schedule); | ||
| 93 | |||
| 94 | void resetElectricEquipmentSchedule(); | ||
| 95 | |||
| 96 | bool setGasEquipmentSchedule(Schedule& schedule); | ||
| 97 | |||
| 98 | void resetGasEquipmentSchedule(); | ||
| 99 | |||
| 100 | bool setHotWaterEquipmentSchedule(Schedule& schedule); | ||
| 101 | |||
| 102 | void resetHotWaterEquipmentSchedule(); | ||
| 103 | |||
| 104 | bool setSteamEquipmentSchedule(Schedule& schedule); | ||
| 105 | |||
| 106 | void resetSteamEquipmentSchedule(); | ||
| 107 | |||
| 108 | bool setOtherEquipmentSchedule(Schedule& schedule); | ||
| 109 | |||
| 110 | void resetOtherEquipmentSchedule(); | ||
| 111 | |||
| 112 | bool setVentilationperPersonSchedule(Schedule& schedule); | ||
| 113 | |||
| 114 | void resetVentilationperPersonSchedule(); | ||
| 115 | |||
| 116 | bool setVentilationperFloorAreaSchedule(Schedule& schedule); | ||
| 117 | |||
| 118 | void resetVentilationperFloorAreaSchedule(); | ||
| 119 | |||
| 120 | bool setInfiltrationSchedule(Schedule& schedule); | ||
| 121 | |||
| 122 | void resetInfiltrationSchedule(); | ||
| 123 | |||
| 124 | //@} | ||
| 125 | /** @name Other */ | ||
| 126 | //@{ | ||
| 127 | |||
| 128 | /// Returns the default schedule of a particular type. | ||
| 129 | boost::optional<Schedule> getDefaultSchedule(const DefaultScheduleType& defaultScheduleType) const; | ||
| 130 | |||
| 131 | /// Merge this object with other one, keep fields from this object if set otherwise set to value from other. | ||
| 132 | void merge(const DefaultScheduleSet& other); | ||
| 133 | |||
| 134 | //@} | ||
| 135 | protected: | ||
| 136 | private: | ||
| 137 | REGISTER_LOGGER("openstudio.model.DefaultScheduleSet"); | ||
| 138 | |||
| 139 | boost::optional<ModelObject> hoursofOperationScheduleAsModelObject() const; | ||
| 140 | boost::optional<ModelObject> numberofPeopleScheduleAsModelObject() const; | ||
| 141 | boost::optional<ModelObject> peopleActivityLevelScheduleAsModelObject() const; | ||
| 142 | boost::optional<ModelObject> lightingScheduleAsModelObject() const; | ||
| 143 | boost::optional<ModelObject> electricEquipmentScheduleAsModelObject() const; | ||
| 144 | boost::optional<ModelObject> gasEquipmentScheduleAsModelObject() const; | ||
| 145 | boost::optional<ModelObject> hotWaterEquipmentScheduleAsModelObject() const; | ||
| 146 | boost::optional<ModelObject> steamEquipmentScheduleAsModelObject() const; | ||
| 147 | boost::optional<ModelObject> otherEquipmentScheduleAsModelObject() const; | ||
| 148 | boost::optional<ModelObject> ventilationperPersonScheduleAsModelObject() const; | ||
| 149 | boost::optional<ModelObject> ventilationperFloorAreaScheduleAsModelObject() const; | ||
| 150 | boost::optional<ModelObject> infiltrationScheduleAsModelObject() const; | ||
| 151 | |||
| 152 | bool setHoursofOperationScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 153 | bool setNumberofPeopleScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 154 | bool setPeopleActivityLevelScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 155 | bool setLightingScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 156 | bool setElectricEquipmentScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 157 | bool setGasEquipmentScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 158 | bool setHotWaterEquipmentScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 159 | bool setInfiltrationScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 160 | bool setSteamEquipmentScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 161 | bool setOtherEquipmentScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 162 | }; | ||
| 163 | |||
| 164 | } // namespace detail | ||
| 165 | |||
| 166 | } // namespace model | ||
| 167 | } // namespace openstudio | ||
| 168 | |||
| 169 | #endif // MODEL_DEFAULTSCHEDULESET_IMPL_HPP | ||
| 170 |