src/model/CoilCoolingDXMultiSpeed.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_COILCOOLINGDXMULTISPEED_HPP | ||
| 7 | #define MODEL_COILCOOLINGDXMULTISPEED_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "StraightComponent.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | class AirflowNetworkEquivalentDuct; | ||
| 17 | class CoilCoolingDXMultiSpeedStageData; | ||
| 18 | class Curve; | ||
| 19 | class Schedule; | ||
| 20 | |||
| 21 | namespace detail { | ||
| 22 | |||
| 23 | class CoilCoolingDXMultiSpeed_Impl; | ||
| 24 | |||
| 25 | } // namespace detail | ||
| 26 | |||
| 27 | /** CoilCoolingDXMultiSpeed is a StraightComponent that wraps the OpenStudio IDD object 'OS:Coil:Cooling:DX:MultiSpeed'. | ||
| 28 | * Performance data for each stage is contained in a separate ModelObject called CoilCoolingDXMultiSpeedStageData **/ | ||
| 29 | class MODEL_API CoilCoolingDXMultiSpeed : public StraightComponent | ||
| 30 | { | ||
| 31 | public: | ||
| 32 | /** @name Constructors and Destructors */ | ||
| 33 | //@{ | ||
| 34 | |||
| 35 | explicit CoilCoolingDXMultiSpeed(const Model& model); | ||
| 36 | |||
| 37 | 75 | virtual ~CoilCoolingDXMultiSpeed() override = default; | |
| 38 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 39 | ✗ | CoilCoolingDXMultiSpeed(const CoilCoolingDXMultiSpeed& other) = default; | |
| 40 | 14 | CoilCoolingDXMultiSpeed(CoilCoolingDXMultiSpeed&& other) = default; | |
| 41 | ✗ | CoilCoolingDXMultiSpeed& operator=(const CoilCoolingDXMultiSpeed&) = default; | |
| 42 | ✗ | CoilCoolingDXMultiSpeed& operator=(CoilCoolingDXMultiSpeed&&) = default; | |
| 43 | |||
| 44 | //@} | ||
| 45 | |||
| 46 | static IddObjectType iddObjectType(); | ||
| 47 | |||
| 48 | static std::vector<std::string> condenserTypeValues(); | ||
| 49 | |||
| 50 | static std::vector<std::string> fuelTypeValues(); | ||
| 51 | |||
| 52 | /** @name Getters */ | ||
| 53 | //@{ | ||
| 54 | |||
| 55 | boost::optional<Schedule> availabilitySchedule() const; | ||
| 56 | |||
| 57 | std::string condenserType() const; | ||
| 58 | |||
| 59 | bool applyPartLoadFractiontoSpeedsGreaterthan1() const; | ||
| 60 | |||
| 61 | bool applyLatentDegradationtoSpeedsGreaterthan1() const; | ||
| 62 | |||
| 63 | bool isApplyLatentDegradationtoSpeedsGreaterthan1Defaulted() const; | ||
| 64 | |||
| 65 | double crankcaseHeaterCapacity() const; | ||
| 66 | |||
| 67 | boost::optional<Curve> crankcaseHeaterCapacityFunctionofTemperatureCurve() const; | ||
| 68 | |||
| 69 | double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation() const; | ||
| 70 | |||
| 71 | double basinHeaterCapacity() const; | ||
| 72 | |||
| 73 | double basinHeaterSetpointTemperature() const; | ||
| 74 | |||
| 75 | boost::optional<Schedule> basinHeaterOperatingSchedule() const; | ||
| 76 | |||
| 77 | std::string fuelType() const; | ||
| 78 | |||
| 79 | double minimumOutdoorDryBulbTemperatureforCompressorOperation() const; | ||
| 80 | |||
| 81 | //@} | ||
| 82 | /** @name Setters */ | ||
| 83 | //@{ | ||
| 84 | |||
| 85 | bool setAvailabilitySchedule(Schedule& schedule); | ||
| 86 | |||
| 87 | void resetAvailabilitySchedule(); | ||
| 88 | |||
| 89 | bool setCondenserType(const std::string& condenserType); | ||
| 90 | |||
| 91 | bool setApplyPartLoadFractiontoSpeedsGreaterthan1(bool applyPartLoadFractiontoSpeedsGreaterthan1); | ||
| 92 | |||
| 93 | bool setApplyLatentDegradationtoSpeedsGreaterthan1(bool applyLatentDegradationtoSpeedsGreaterthan1); | ||
| 94 | |||
| 95 | void resetApplyLatentDegradationtoSpeedsGreaterthan1(); | ||
| 96 | |||
| 97 | bool setCrankcaseHeaterCapacity(double crankcaseHeaterCapacity); | ||
| 98 | |||
| 99 | bool setCrankcaseHeaterCapacityFunctionofTemperatureCurve(const Curve& curve); | ||
| 100 | void resetCrankcaseHeaterCapacityFunctionofTemperatureCurve(); | ||
| 101 | |||
| 102 | bool setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(double maximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation); | ||
| 103 | |||
| 104 | bool setBasinHeaterCapacity(double basinHeaterCapacity); | ||
| 105 | |||
| 106 | bool setBasinHeaterSetpointTemperature(double basinHeaterSetpointTemperature); | ||
| 107 | |||
| 108 | bool setBasinHeaterOperatingSchedule(Schedule& schedule); | ||
| 109 | |||
| 110 | void resetBasinHeaterOperatingSchedule(); | ||
| 111 | |||
| 112 | bool setFuelType(const std::string& fuelType); | ||
| 113 | |||
| 114 | bool setMinimumOutdoorDryBulbTemperatureforCompressorOperation(double minimumOutdoorDryBulbTemperatureforCompressorOperation); | ||
| 115 | |||
| 116 | //@} | ||
| 117 | /** @name Other */ | ||
| 118 | //@{ | ||
| 119 | |||
| 120 | /** Return the performance data for each stage. **/ | ||
| 121 | std::vector<CoilCoolingDXMultiSpeedStageData> stages() const; | ||
| 122 | |||
| 123 | unsigned numberOfStages() const; | ||
| 124 | |||
| 125 | /* | ||
| 126 | * Get the index of a given CoilCoolingDXMultiSpeedStageData (1-indexed) | ||
| 127 | */ | ||
| 128 | boost::optional<unsigned> stageIndex(const CoilCoolingDXMultiSpeedStageData& stage) const; | ||
| 129 | |||
| 130 | /* | ||
| 131 | * Add a new stage after all of the existing stages. | ||
| 132 | */ | ||
| 133 | bool addStage(const CoilCoolingDXMultiSpeedStageData& stage); | ||
| 134 | |||
| 135 | /* | ||
| 136 | * Add a new CoilCoolingDXMultiSpeedStageData to the list which a given index (1 to x). | ||
| 137 | * Internally calls addStage then setStageIndex, see remarks there | ||
| 138 | */ | ||
| 139 | bool addStage(const CoilCoolingDXMultiSpeedStageData& stage, unsigned index); | ||
| 140 | |||
| 141 | /* | ||
| 142 | * You can shuffle the priority of a given CoilCoolingDXMultiSpeedStageData after having added it | ||
| 143 | * If index is below 1, it's reset to 1. | ||
| 144 | * If index is greater than the number of stages, will reset to last | ||
| 145 | */ | ||
| 146 | bool setStageIndex(const CoilCoolingDXMultiSpeedStageData& stage, unsigned index); | ||
| 147 | |||
| 148 | /* | ||
| 149 | * Set all stages using a list of CoilCoolingDXMultiSpeedStageDatas | ||
| 150 | * Internally calls addStage, and will return the global status, but will continue trying if there are problems | ||
| 151 | * (eg: if you make a vector larger than the number of accepted stages, or a vector that has a stage from another model, the valid stages will be | ||
| 152 | * added indeed, but it'll eventually return false) | ||
| 153 | */ | ||
| 154 | bool setStages(const std::vector<CoilCoolingDXMultiSpeedStageData>& stages); | ||
| 155 | |||
| 156 | /* | ||
| 157 | * Removes all CoilCoolingDXMultiSpeedStageDatas in this object | ||
| 158 | */ | ||
| 159 | void removeAllStages(); | ||
| 160 | |||
| 161 | /* | ||
| 162 | * Remove the given CoilCoolingDXMultiSpeedStageData from this object's stages | ||
| 163 | */ | ||
| 164 | bool removeStage(const CoilCoolingDXMultiSpeedStageData& stage); | ||
| 165 | |||
| 166 | /* | ||
| 167 | * Remove the CoilCoolingDXMultiSpeedStageData at the given index (1-indexed) | ||
| 168 | */ | ||
| 169 | bool removeStage(unsigned index); | ||
| 170 | |||
| 171 | /** Creates a new equivalent duct object if an object is not already attached. */ | ||
| 172 | AirflowNetworkEquivalentDuct getAirflowNetworkEquivalentDuct(double length, double diameter); | ||
| 173 | |||
| 174 | /** Returns the attached equivalent duct object, if any. */ | ||
| 175 | boost::optional<AirflowNetworkEquivalentDuct> airflowNetworkEquivalentDuct() const; | ||
| 176 | |||
| 177 | //@} | ||
| 178 | protected: | ||
| 179 | /// @cond | ||
| 180 | using ImplType = detail::CoilCoolingDXMultiSpeed_Impl; | ||
| 181 | |||
| 182 | explicit CoilCoolingDXMultiSpeed(std::shared_ptr<detail::CoilCoolingDXMultiSpeed_Impl> impl); | ||
| 183 | |||
| 184 | friend class detail::CoilCoolingDXMultiSpeed_Impl; | ||
| 185 | friend class Model; | ||
| 186 | friend class IdfObject; | ||
| 187 | friend class openstudio::detail::IdfObject_Impl; | ||
| 188 | /// @endcond | ||
| 189 | private: | ||
| 190 | REGISTER_LOGGER("openstudio.model.CoilCoolingDXMultiSpeed"); | ||
| 191 | }; | ||
| 192 | |||
| 193 | /** \relates CoilCoolingDXMultiSpeed*/ | ||
| 194 | using OptionalCoilCoolingDXMultiSpeed = boost::optional<CoilCoolingDXMultiSpeed>; | ||
| 195 | |||
| 196 | /** \relates CoilCoolingDXMultiSpeed*/ | ||
| 197 | using CoilCoolingDXMultiSpeedVector = std::vector<CoilCoolingDXMultiSpeed>; | ||
| 198 | |||
| 199 | } // namespace model | ||
| 200 | } // namespace openstudio | ||
| 201 | |||
| 202 | #endif // MODEL_COILCOOLINGDXMULTISPEED_HPP | ||
| 203 |