src/model/DesignDay_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_DESIGNDAY_IMPL_HPP | ||
| 7 | #define MODEL_DESIGNDAY_IMPL_HPP | ||
| 8 | |||
| 9 | #include "SizingPeriod_Impl.hpp" | ||
| 10 | |||
| 11 | namespace openstudio { | ||
| 12 | namespace model { | ||
| 13 | |||
| 14 | class ScheduleDay; | ||
| 15 | |||
| 16 | namespace detail { | ||
| 17 | |||
| 18 | class MODEL_API DesignDay_Impl : public SizingPeriod_Impl | ||
| 19 | { | ||
| 20 | |||
| 21 | public: | ||
| 22 | // constructor | ||
| 23 | DesignDay_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 24 | |||
| 25 | // construct from workspace | ||
| 26 | DesignDay_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 27 | |||
| 28 | // clone copy constructor | ||
| 29 | DesignDay_Impl(const DesignDay_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 30 | |||
| 31 | // virtual destructor | ||
| 32 | 1171 | virtual ~DesignDay_Impl() override = default; | |
| 33 | |||
| 34 | // Get all output variable names that could be associated with this object. | ||
| 35 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 36 | |||
| 37 | virtual IddObjectType iddObjectType() const override; | ||
| 38 | |||
| 39 | /** @name Getters */ | ||
| 40 | //@{ | ||
| 41 | |||
| 42 | double maximumDryBulbTemperature() const; | ||
| 43 | |||
| 44 | bool isMaximumDryBulbTemperatureDefaulted() const; | ||
| 45 | |||
| 46 | double dailyDryBulbTemperatureRange() const; | ||
| 47 | |||
| 48 | bool isDailyDryBulbTemperatureRangeDefaulted() const; | ||
| 49 | |||
| 50 | double barometricPressure() const; | ||
| 51 | |||
| 52 | bool isBarometricPressureDefaulted() const; | ||
| 53 | |||
| 54 | double windSpeed() const; | ||
| 55 | |||
| 56 | bool isWindSpeedDefaulted() const; | ||
| 57 | |||
| 58 | double windDirection() const; | ||
| 59 | |||
| 60 | bool isWindDirectionDefaulted() const; | ||
| 61 | |||
| 62 | double skyClearness() const; | ||
| 63 | |||
| 64 | bool isSkyClearnessDefaulted() const; | ||
| 65 | |||
| 66 | bool rainIndicator() const; | ||
| 67 | |||
| 68 | bool isRainIndicatorDefaulted() const; | ||
| 69 | |||
| 70 | bool snowIndicator() const; | ||
| 71 | |||
| 72 | bool isSnowIndicatorDefaulted() const; | ||
| 73 | |||
| 74 | int dayOfMonth() const; | ||
| 75 | |||
| 76 | bool isDayOfMonthDefaulted() const; | ||
| 77 | |||
| 78 | int month() const; | ||
| 79 | |||
| 80 | bool isMonthDefaulted() const; | ||
| 81 | |||
| 82 | std::string dayType() const; | ||
| 83 | |||
| 84 | bool isDayTypeDefaulted() const; | ||
| 85 | |||
| 86 | bool daylightSavingTimeIndicator() const; | ||
| 87 | |||
| 88 | bool isDaylightSavingTimeIndicatorDefaulted() const; | ||
| 89 | |||
| 90 | std::string humidityConditionType() const; | ||
| 91 | |||
| 92 | bool isHumidityConditionTypeDefaulted() const; | ||
| 93 | |||
| 94 | boost::optional<ScheduleDay> humidityConditionDaySchedule() const; | ||
| 95 | |||
| 96 | boost::optional<double> wetBulbOrDewPointAtMaximumDryBulb() const; | ||
| 97 | |||
| 98 | boost::optional<double> humidityRatioAtMaximumDryBulb() const; | ||
| 99 | |||
| 100 | boost::optional<double> enthalpyAtMaximumDryBulb() const; | ||
| 101 | |||
| 102 | std::string dryBulbTemperatureRangeModifierType() const; | ||
| 103 | |||
| 104 | bool isDryBulbTemperatureRangeModifierTypeDefaulted() const; | ||
| 105 | |||
| 106 | boost::optional<ScheduleDay> dryBulbTemperatureRangeModifierDaySchedule() const; | ||
| 107 | |||
| 108 | std::string solarModelIndicator() const; | ||
| 109 | |||
| 110 | bool isSolarModelIndicatorDefaulted() const; | ||
| 111 | |||
| 112 | boost::optional<ScheduleDay> beamSolarDaySchedule() const; | ||
| 113 | |||
| 114 | boost::optional<ScheduleDay> diffuseSolarDaySchedule() const; | ||
| 115 | |||
| 116 | double ashraeClearSkyOpticalDepthForBeamIrradiance() const; | ||
| 117 | |||
| 118 | bool isAshraeClearSkyOpticalDepthForBeamIrradianceDefaulted() const; | ||
| 119 | |||
| 120 | double ashraeClearSkyOpticalDepthForDiffuseIrradiance() const; | ||
| 121 | |||
| 122 | bool isAshraeClearSkyOpticalDepthForDiffuseIrradianceDefaulted() const; | ||
| 123 | |||
| 124 | boost::optional<double> dailyWetBulbTemperatureRange() const; | ||
| 125 | |||
| 126 | boost::optional<int> maximumNumberWarmupDays() const; | ||
| 127 | |||
| 128 | std::string beginEnvironmentResetMode() const; | ||
| 129 | |||
| 130 | bool isBeginEnvironmentResetModeDefaulted() const; | ||
| 131 | |||
| 132 | //@} | ||
| 133 | /** @name Setters */ | ||
| 134 | //@{ | ||
| 135 | |||
| 136 | bool setMaximumDryBulbTemperature(double maximumDryBulbTemperature); | ||
| 137 | |||
| 138 | void resetMaximumDryBulbTemperature(); | ||
| 139 | |||
| 140 | bool setDailyDryBulbTemperatureRange(double dailyDryBulbTemperatureRange); | ||
| 141 | |||
| 142 | void resetDailyDryBulbTemperatureRange(); | ||
| 143 | |||
| 144 | bool setBarometricPressure(double barometricPressure); | ||
| 145 | |||
| 146 | void resetBarometricPressure(); | ||
| 147 | |||
| 148 | bool setWindSpeed(double windSpeed); | ||
| 149 | |||
| 150 | void resetWindSpeed(); | ||
| 151 | |||
| 152 | bool setWindDirection(double windDirection); | ||
| 153 | |||
| 154 | void resetWindDirection(); | ||
| 155 | |||
| 156 | bool setSkyClearness(double skyClearness); | ||
| 157 | |||
| 158 | void resetSkyClearness(); | ||
| 159 | |||
| 160 | bool setRainIndicator(bool rainIndicator); | ||
| 161 | |||
| 162 | void resetRainIndicator(); | ||
| 163 | |||
| 164 | bool setSnowIndicator(bool snowIndicator); | ||
| 165 | |||
| 166 | void resetSnowIndicator(); | ||
| 167 | |||
| 168 | bool setDayOfMonth(int dayOfMonth); | ||
| 169 | |||
| 170 | void resetDayOfMonth(); | ||
| 171 | |||
| 172 | bool setMonth(int month); | ||
| 173 | |||
| 174 | void resetMonth(); | ||
| 175 | |||
| 176 | bool setDayType(const std::string& dayType); | ||
| 177 | |||
| 178 | void resetDayType(); | ||
| 179 | |||
| 180 | bool setDaylightSavingTimeIndicator(bool daylightSavingTimeIndicator); | ||
| 181 | |||
| 182 | void resetDaylightSavingTimeIndicator(); | ||
| 183 | |||
| 184 | bool setHumidityConditionType(const std::string& humidityConditionType); | ||
| 185 | |||
| 186 | void resetHumidityConditionType(); | ||
| 187 | |||
| 188 | bool setHumidityConditionDaySchedule(const ScheduleDay& schedule); | ||
| 189 | |||
| 190 | void resetHumidityConditionDaySchedule(); | ||
| 191 | |||
| 192 | bool setWetBulbOrDewPointAtMaximumDryBulb(boost::optional<double> wetBulbOrDewPointAtMaximumDryBulb); | ||
| 193 | |||
| 194 | void resetWetBulbOrDewPointAtMaximumDryBulb(); | ||
| 195 | |||
| 196 | bool setHumidityRatioAtMaximumDryBulb(boost::optional<double> humidityRatioAtMaximumDryBulb); | ||
| 197 | |||
| 198 | void resetHumidityRatioAtMaximumDryBulb(); | ||
| 199 | |||
| 200 | bool setEnthalpyAtMaximumDryBulb(boost::optional<double> enthalpyAtMaximumDryBulb); | ||
| 201 | |||
| 202 | void resetEnthalpyAtMaximumDryBulb(); | ||
| 203 | |||
| 204 | bool setDryBulbTemperatureRangeModifierType(const std::string& dryBulbTemperatureRangeModifierType); | ||
| 205 | |||
| 206 | void resetDryBulbTemperatureRangeModifierType(); | ||
| 207 | |||
| 208 | bool setDryBulbTemperatureRangeModifierDaySchedule(const ScheduleDay& schedule); | ||
| 209 | |||
| 210 | void resetDryBulbTemperatureRangeModifierDaySchedule(); | ||
| 211 | |||
| 212 | bool setSolarModelIndicator(const std::string& solarModelIndicator); | ||
| 213 | |||
| 214 | void resetSolarModelIndicator(); | ||
| 215 | |||
| 216 | bool setBeamSolarDaySchedule(const ScheduleDay& schedule); | ||
| 217 | |||
| 218 | void resetBeamSolarDaySchedule(); | ||
| 219 | |||
| 220 | bool setDiffuseSolarDaySchedule(const ScheduleDay& schedule); | ||
| 221 | |||
| 222 | void resetDiffuseSolarDaySchedule(); | ||
| 223 | |||
| 224 | bool setAshraeClearSkyOpticalDepthForBeamIrradiance(double ashraeClearSkyOpticalDepthForBeamIrradiance); | ||
| 225 | |||
| 226 | void resetAshraeClearSkyOpticalDepthForBeamIrradiance(); | ||
| 227 | |||
| 228 | bool setAshraeClearSkyOpticalDepthForDiffuseIrradiance(double ashraeClearSkyOpticalDepthForDiffuseIrradiance); | ||
| 229 | |||
| 230 | void resetAshraeClearSkyOpticalDepthForDiffuseIrradiance(); | ||
| 231 | |||
| 232 | bool setDailyWetBulbTemperatureRange(boost::optional<double> dailyWetBulbTemperatureRange); | ||
| 233 | |||
| 234 | void resetDailyWetBulbTemperatureRange(); | ||
| 235 | |||
| 236 | bool setMaximumNumberWarmupDays(boost::optional<int> maximumNumberWarmupDays); | ||
| 237 | |||
| 238 | void resetMaximumNumberWarmupDays(); | ||
| 239 | |||
| 240 | bool setBeginEnvironmentResetMode(const std::string& beginEnvironmentResetMode); | ||
| 241 | |||
| 242 | void resetBeginEnvironmentResetMode(); | ||
| 243 | |||
| 244 | // ensure that this object does not contain the date 2/29 | ||
| 245 | virtual void ensureNoLeapDays() override; | ||
| 246 | |||
| 247 | //@} | ||
| 248 | |||
| 249 | private: | ||
| 250 | REGISTER_LOGGER("openstudio.model.DesignDay"); | ||
| 251 | |||
| 252 | boost::optional<ModelObject> humidityConditionDayScheduleAsModelObject() const; | ||
| 253 | boost::optional<ModelObject> dryBulbTemperatureRangeModifierDayScheduleAsModelObject() const; | ||
| 254 | boost::optional<ModelObject> beamSolarDayScheduleAsModelObject() const; | ||
| 255 | boost::optional<ModelObject> diffuseSolarDayScheduleAsModelObject() const; | ||
| 256 | |||
| 257 | bool setHumidityConditionDayScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 258 | bool setDryBulbTemperatureRangeModifierDayScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 259 | bool setBeamSolarDayScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 260 | bool setDiffuseSolarDayScheduleAsModelObject(const boost::optional<ModelObject>& modelObject); | ||
| 261 | }; | ||
| 262 | |||
| 263 | } // namespace detail | ||
| 264 | |||
| 265 | } // namespace model | ||
| 266 | } // namespace openstudio | ||
| 267 | |||
| 268 | #endif // MODEL_DESIGNDAY_IMPL_HPP | ||
| 269 |