src/model/UnitarySystemPerformanceMultispeed.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_UNITARYSYSTEMPERFORMANCEMULTISPEED_HPP | ||
| 7 | #define MODEL_UNITARYSYSTEMPERFORMANCEMULTISPEED_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "ModelObject.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace energyplus { | ||
| 15 | class ForwardTranslator; | ||
| 16 | } | ||
| 17 | |||
| 18 | namespace model { | ||
| 19 | |||
| 20 | namespace detail { | ||
| 21 | class UnitarySystemPerformanceMultispeed_Impl; | ||
| 22 | } // namespace detail | ||
| 23 | |||
| 24 | class MODEL_API SupplyAirflowRatioField | ||
| 25 | { | ||
| 26 | public: | ||
| 27 | /// Default Constructor. Autosizes both heating and cooling. | ||
| 28 | SupplyAirflowRatioField(); | ||
| 29 | |||
| 30 | /// Constructor that sets values for both heating and cooling. | ||
| 31 | SupplyAirflowRatioField(double heatingRatio, double coolingRatio); | ||
| 32 | |||
| 33 | /// "Constructor" that autosizes cooling ratio and sets heating ratio. | ||
| 34 | static SupplyAirflowRatioField fromHeatingRatio(double heatingRatio); | ||
| 35 | |||
| 36 | /// "Constructor" that autosizes heating ration and sets cooling ratio. | ||
| 37 | static SupplyAirflowRatioField fromCoolingRatio(double coolingRatio); | ||
| 38 | |||
| 39 | /** @name Getters */ | ||
| 40 | //@{ | ||
| 41 | boost::optional<double> heatingRatio() const; | ||
| 42 | boost::optional<double> coolingRatio() const; | ||
| 43 | bool isHeatingRatioAutosized() const; | ||
| 44 | bool isCoolingRatioAutosized() const; | ||
| 45 | //@} | ||
| 46 | |||
| 47 | protected: | ||
| 48 | std::vector<std::string> getHeatingCoolingRatiosAsStrings() const; | ||
| 49 | |||
| 50 | friend class detail::UnitarySystemPerformanceMultispeed_Impl; | ||
| 51 | friend class openstudio::energyplus::ForwardTranslator; | ||
| 52 | |||
| 53 | private: | ||
| 54 | SupplyAirflowRatioField(bool isHeating, double value); | ||
| 55 | boost::optional<double> m_heatingRatio; // implementation detail, boost::none if autosized, otherwise the value | ||
| 56 | boost::optional<double> m_coolingRatio; | ||
| 57 | }; | ||
| 58 | |||
| 59 | /** UnitarySystemPerformanceMultispeed is a WaterToAirComponent that wraps the OpenStudio IDD object 'OS:UnitarySystemPerformance:Multispeed'. */ | ||
| 60 | class MODEL_API UnitarySystemPerformanceMultispeed : public ModelObject | ||
| 61 | { | ||
| 62 | public: | ||
| 63 | /** @name Constructors and Destructors */ | ||
| 64 | //@{ | ||
| 65 | explicit UnitarySystemPerformanceMultispeed(const Model& model); | ||
| 66 | |||
| 67 | 96 | virtual ~UnitarySystemPerformanceMultispeed() override = default; | |
| 68 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 69 | ✗ | UnitarySystemPerformanceMultispeed(const UnitarySystemPerformanceMultispeed& other) = default; | |
| 70 | 48 | UnitarySystemPerformanceMultispeed(UnitarySystemPerformanceMultispeed&& other) = default; | |
| 71 | ✗ | UnitarySystemPerformanceMultispeed& operator=(const UnitarySystemPerformanceMultispeed&) = default; | |
| 72 | ✗ | UnitarySystemPerformanceMultispeed& operator=(UnitarySystemPerformanceMultispeed&&) = default; | |
| 73 | //@} | ||
| 74 | |||
| 75 | static IddObjectType iddObjectType(); | ||
| 76 | |||
| 77 | /** @name Getters */ | ||
| 78 | //@{ | ||
| 79 | |||
| 80 | bool singleModeOperation() const; | ||
| 81 | |||
| 82 | double noLoadSupplyAirflowRateRatio() const; | ||
| 83 | |||
| 84 | std::vector<SupplyAirflowRatioField> supplyAirflowRatioFields() const; | ||
| 85 | |||
| 86 | //@} | ||
| 87 | |||
| 88 | //** @name Setters */ | ||
| 89 | |||
| 90 | bool setSingleModeOperation(bool singleMode); | ||
| 91 | |||
| 92 | void resetSingleModeOperation(); | ||
| 93 | |||
| 94 | bool setNoLoadSupplyAirflowRateRatio(double noLoadSupplyAirflowRateRatio); | ||
| 95 | |||
| 96 | bool setSupplyAirflowRatioFields(const std::vector<SupplyAirflowRatioField>& airflowRatioFields); | ||
| 97 | |||
| 98 | bool addSupplyAirflowRatioField(const SupplyAirflowRatioField& airflowRatio); | ||
| 99 | |||
| 100 | bool addSupplyAirflowRatioField(double heatingRatio, double coolingRatio); | ||
| 101 | |||
| 102 | void resetSupplyAirflowRatioFields(); | ||
| 103 | |||
| 104 | //@{ | ||
| 105 | |||
| 106 | //@} | ||
| 107 | |||
| 108 | protected: | ||
| 109 | /// @cond | ||
| 110 | using ImplType = detail::UnitarySystemPerformanceMultispeed_Impl; | ||
| 111 | |||
| 112 | explicit UnitarySystemPerformanceMultispeed(std::shared_ptr<detail::UnitarySystemPerformanceMultispeed_Impl> impl); | ||
| 113 | |||
| 114 | friend class detail::UnitarySystemPerformanceMultispeed_Impl; | ||
| 115 | friend class Model; | ||
| 116 | friend class IdfObject; | ||
| 117 | friend class openstudio::detail::IdfObject_Impl; | ||
| 118 | /// @endcond | ||
| 119 | |||
| 120 | private: | ||
| 121 | REGISTER_LOGGER("openstudio.model.UnitarySystemPerformanceMultispeed"); | ||
| 122 | }; | ||
| 123 | |||
| 124 | /** \relates UnitarySystemPerformanceMultispeed */ | ||
| 125 | using OptionalUnitarySystemPerformanceMultispeed = boost::optional<UnitarySystemPerformanceMultispeed>; | ||
| 126 | |||
| 127 | /** \relates UnitarySystemPerformanceMultispeed */ | ||
| 128 | using UnitarySystemPerformanceMultispeedVector = std::vector<UnitarySystemPerformanceMultispeed>; | ||
| 129 | |||
| 130 | } // namespace model | ||
| 131 | } // namespace openstudio | ||
| 132 | |||
| 133 | #endif // MODEL_UNITARYSYSTEMPERFORMANCEMULTISPEED_HPP | ||
| 134 |