src/model/CoilHeatingGasMultiStage.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_COILHEATINGGASMULTISTAGE_HPP | ||
| 7 | #define MODEL_COILHEATINGGASMULTISTAGE_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "StraightComponent.hpp" | ||
| 11 | #include "../utilities/core/Deprecated.hpp" | ||
| 12 | |||
| 13 | namespace openstudio { | ||
| 14 | |||
| 15 | namespace model { | ||
| 16 | |||
| 17 | class Schedule; | ||
| 18 | class CoilHeatingGasMultiStageStageData; | ||
| 19 | class Curve; | ||
| 20 | |||
| 21 | namespace detail { | ||
| 22 | |||
| 23 | class CoilHeatingGasMultiStage_Impl; | ||
| 24 | |||
| 25 | } // namespace detail | ||
| 26 | |||
| 27 | /** CoilHeatingGasMultiStage is a StraightComponent that wraps the OpenStudio IDD object 'OS:Coil:Heating:Gas:MultiStage'. | ||
| 28 | * Performance data for each stage is contained in a separate ModelObject called OS:Coil:Heating:Gas:MultiStage:StageData **/ | ||
| 29 | class MODEL_API CoilHeatingGasMultiStage : public StraightComponent | ||
| 30 | { | ||
| 31 | public: | ||
| 32 | /** @name Constructors and Destructors */ | ||
| 33 | //@{ | ||
| 34 | |||
| 35 | explicit CoilHeatingGasMultiStage(const Model& model); | ||
| 36 | |||
| 37 | 37 | virtual ~CoilHeatingGasMultiStage() override = default; | |
| 38 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 39 | ✗ | CoilHeatingGasMultiStage(const CoilHeatingGasMultiStage& other) = default; | |
| 40 | 10 | CoilHeatingGasMultiStage(CoilHeatingGasMultiStage&& other) = default; | |
| 41 | ✗ | CoilHeatingGasMultiStage& operator=(const CoilHeatingGasMultiStage&) = default; | |
| 42 | ✗ | CoilHeatingGasMultiStage& operator=(CoilHeatingGasMultiStage&&) = default; | |
| 43 | |||
| 44 | //@} | ||
| 45 | |||
| 46 | static IddObjectType iddObjectType(); | ||
| 47 | |||
| 48 | /** @name Getters */ | ||
| 49 | //@{ | ||
| 50 | |||
| 51 | Schedule availabilitySchedule() const; | ||
| 52 | |||
| 53 | boost::optional<Curve> partLoadFractionCorrelationCurve() const; | ||
| 54 | |||
| 55 | OS_DEPRECATED(3, 7, 0) boost::optional<double> parasiticGasLoad() const; | ||
| 56 | |||
| 57 | boost::optional<double> offCycleParasiticGasLoad() const; | ||
| 58 | |||
| 59 | //@} | ||
| 60 | /** @name Setters */ | ||
| 61 | //@{ | ||
| 62 | |||
| 63 | bool setAvailabilitySchedule(Schedule& schedule); | ||
| 64 | |||
| 65 | bool setPartLoadFractionCorrelationCurve(const Curve& curve); | ||
| 66 | |||
| 67 | void resetPartLoadFractionCorrelationCurve(); | ||
| 68 | |||
| 69 | OS_DEPRECATED(3, 7, 0) bool setParasiticGasLoad(double parasiticGasLoad); | ||
| 70 | |||
| 71 | bool setOffCycleParasiticGasLoad(double offCycleParasiticGasLoad); | ||
| 72 | |||
| 73 | OS_DEPRECATED(3, 7, 0) void resetParasiticGasLoad(); | ||
| 74 | |||
| 75 | void resetOffCycleParasiticGasLoad(); | ||
| 76 | |||
| 77 | //@} | ||
| 78 | /** @name Other */ | ||
| 79 | //@{ | ||
| 80 | |||
| 81 | /** Return the performance data for each stage. **/ | ||
| 82 | std::vector<CoilHeatingGasMultiStageStageData> stages() const; | ||
| 83 | |||
| 84 | unsigned numberOfStages() const; | ||
| 85 | |||
| 86 | /* | ||
| 87 | * Get the index of a given CoilHeatingGasMultiStageStageData (1-indexed) | ||
| 88 | */ | ||
| 89 | boost::optional<unsigned> stageIndex(const CoilHeatingGasMultiStageStageData& stage) const; | ||
| 90 | |||
| 91 | /* | ||
| 92 | * Add a new stage after all of the existing stages. | ||
| 93 | */ | ||
| 94 | bool addStage(const CoilHeatingGasMultiStageStageData& stage); | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Add a new CoilHeatingGasMultiStageStageData to the list which a given index (1 to x). | ||
| 98 | * Internally calls addStage then setStageIndex, see remarks there | ||
| 99 | */ | ||
| 100 | bool addStage(const CoilHeatingGasMultiStageStageData& stage, unsigned index); | ||
| 101 | |||
| 102 | /* | ||
| 103 | * You can shuffle the priority of a given CoilHeatingGasMultiStageStageData after having added it | ||
| 104 | * If index is below 1, it's reset to 1. | ||
| 105 | * If index is greater than the number of stages, will reset to last | ||
| 106 | */ | ||
| 107 | bool setStageIndex(const CoilHeatingGasMultiStageStageData& stage, unsigned index); | ||
| 108 | |||
| 109 | /* | ||
| 110 | * Set all stages using a list of CoilHeatingGasMultiStageStageDatas | ||
| 111 | * Internally calls addStage, and will return the global status, but will continue trying if there are problems | ||
| 112 | * (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 | ||
| 113 | * added indeed, but it'll eventually return false) | ||
| 114 | */ | ||
| 115 | bool setStages(const std::vector<CoilHeatingGasMultiStageStageData>& stages); | ||
| 116 | |||
| 117 | /* | ||
| 118 | * Removes all CoilHeatingGasMultiStageStageDatas in this object | ||
| 119 | */ | ||
| 120 | void removeAllStages(); | ||
| 121 | |||
| 122 | /* | ||
| 123 | * Remove the given CoilHeatingGasMultiStageStageData from this object's stages | ||
| 124 | */ | ||
| 125 | bool removeStage(const CoilHeatingGasMultiStageStageData& stage); | ||
| 126 | |||
| 127 | /* | ||
| 128 | * Remove the CoilHeatingGasMultiStageStageData at the given index (1-indexed) | ||
| 129 | */ | ||
| 130 | bool removeStage(unsigned index); | ||
| 131 | |||
| 132 | //@} | ||
| 133 | protected: | ||
| 134 | /// @cond | ||
| 135 | using ImplType = detail::CoilHeatingGasMultiStage_Impl; | ||
| 136 | |||
| 137 | explicit CoilHeatingGasMultiStage(std::shared_ptr<detail::CoilHeatingGasMultiStage_Impl> impl); | ||
| 138 | |||
| 139 | friend class detail::CoilHeatingGasMultiStage_Impl; | ||
| 140 | friend class Model; | ||
| 141 | friend class IdfObject; | ||
| 142 | friend class openstudio::detail::IdfObject_Impl; | ||
| 143 | /// @endcond | ||
| 144 | private: | ||
| 145 | − | REGISTER_LOGGER("openstudio.model.CoilHeatingGasMultiStage"); | |
| 146 | }; | ||
| 147 | |||
| 148 | /** \relates CoilHeatingGasMultiStage*/ | ||
| 149 | using OptionalCoilHeatingGasMultiStage = boost::optional<CoilHeatingGasMultiStage>; | ||
| 150 | |||
| 151 | /** \relates CoilHeatingGasMultiStage*/ | ||
| 152 | using CoilHeatingGasMultiStageVector = std::vector<CoilHeatingGasMultiStage>; | ||
| 153 | |||
| 154 | } // namespace model | ||
| 155 | } // namespace openstudio | ||
| 156 | |||
| 157 | #endif // MODEL_COILHEATINGGASMULTISTAGE_HPP | ||
| 158 |