src/model/HeatPumpAirToWaterHeating_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_HEATPUMPAIRTOWATERHEATING_IMPL_HPP | ||
| 7 | #define MODEL_HEATPUMPAIRTOWATERHEATING_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "StraightComponent_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | namespace model { | ||
| 14 | |||
| 15 | class Curve; | ||
| 16 | class HeatPumpAirToWater; | ||
| 17 | class HeatPumpAirToWaterHeatingSpeedData; | ||
| 18 | class ModelObjectList; | ||
| 19 | class Node; | ||
| 20 | class Schedule; | ||
| 21 | |||
| 22 | namespace detail { | ||
| 23 | |||
| 24 | /** HeatPumpAirToWaterHeating_Impl is a StraightComponent_Impl that is the implementation class for HeatPumpAirToWaterHeating.*/ | ||
| 25 | class MODEL_API HeatPumpAirToWaterHeating_Impl : public StraightComponent_Impl | ||
| 26 | { | ||
| 27 | public: | ||
| 28 | /** @name Constructors and Destructors */ | ||
| 29 | //@{ | ||
| 30 | |||
| 31 | HeatPumpAirToWaterHeating_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 32 | |||
| 33 | HeatPumpAirToWaterHeating_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 34 | |||
| 35 | HeatPumpAirToWaterHeating_Impl(const HeatPumpAirToWaterHeating_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 36 | |||
| 37 | 27 | virtual ~HeatPumpAirToWaterHeating_Impl() = default; | |
| 38 | |||
| 39 | //@} | ||
| 40 | /** @name Virtual Methods */ | ||
| 41 | //@{ | ||
| 42 | |||
| 43 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 44 | |||
| 45 | virtual IddObjectType iddObjectType() const override; | ||
| 46 | |||
| 47 | virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override; | ||
| 48 | |||
| 49 | virtual ModelObject clone(Model model) const override; | ||
| 50 | |||
| 51 | virtual std::vector<ModelObject> children() const override; | ||
| 52 | // virtual std::vector<IddObjectType> allowableChildTypes() const override; | ||
| 53 | |||
| 54 | virtual std::vector<IdfObject> remove() override; | ||
| 55 | |||
| 56 | // Overrides from StraightComponent | ||
| 57 | virtual unsigned inletPort() const override; | ||
| 58 | virtual unsigned outletPort() const override; | ||
| 59 | |||
| 60 | virtual bool addToNode(Node& node) override; | ||
| 61 | |||
| 62 | virtual boost::optional<HVACComponent> containingHVACComponent() const override; | ||
| 63 | // virtual boost::optional<Mixer> containingZoneHVACComponent() const override; | ||
| 64 | // virtual boost::optional<SetpointManager> containingStraightComponent() const override; | ||
| 65 | |||
| 66 | virtual void autosize() override; | ||
| 67 | |||
| 68 | virtual void applySizingValues() override; | ||
| 69 | |||
| 70 | virtual ComponentType componentType() const override; | ||
| 71 | virtual std::vector<FuelType> coolingFuelTypes() const override; | ||
| 72 | virtual std::vector<FuelType> heatingFuelTypes() const override; | ||
| 73 | virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override; | ||
| 74 | |||
| 75 | //@} | ||
| 76 | /** @name Getters */ | ||
| 77 | //@{ | ||
| 78 | |||
| 79 | Schedule availabilitySchedule() const; | ||
| 80 | |||
| 81 | double ratedInletAirTemperature() const; | ||
| 82 | |||
| 83 | boost::optional<double> ratedAirFlowRate() const; | ||
| 84 | |||
| 85 | bool isRatedAirFlowRateAutosized() const; | ||
| 86 | |||
| 87 | double ratedLeavingWaterTemperature() const; | ||
| 88 | |||
| 89 | boost::optional<double> ratedWaterFlowRate() const; | ||
| 90 | |||
| 91 | bool isRatedWaterFlowRateAutosized() const; | ||
| 92 | |||
| 93 | double minimumOutdoorAirTemperature() const; | ||
| 94 | |||
| 95 | double maximumOutdoorAirTemperature() const; | ||
| 96 | |||
| 97 | boost::optional<Curve> minimumLeavingWaterTemperatureCurve() const; | ||
| 98 | |||
| 99 | boost::optional<Curve> maximumLeavingWaterTemperatureCurve() const; | ||
| 100 | |||
| 101 | double sizingFactor() const; | ||
| 102 | |||
| 103 | boost::optional<HeatPumpAirToWaterHeatingSpeedData> boosterModeOnSpeed() const; | ||
| 104 | |||
| 105 | //@} | ||
| 106 | /** @name Setters */ | ||
| 107 | //@{ | ||
| 108 | |||
| 109 | bool setAvailabilitySchedule(Schedule& availabilitySchedule); | ||
| 110 | |||
| 111 | bool setRatedInletAirTemperature(double ratedInletAirTemperature); | ||
| 112 | |||
| 113 | bool setRatedAirFlowRate(double ratedAirFlowRate); | ||
| 114 | |||
| 115 | void autosizeRatedAirFlowRate(); | ||
| 116 | |||
| 117 | bool setRatedLeavingWaterTemperature(double ratedLeavingWaterTemperature); | ||
| 118 | |||
| 119 | bool setRatedWaterFlowRate(double ratedWaterFlowRate); | ||
| 120 | |||
| 121 | void autosizeRatedWaterFlowRate(); | ||
| 122 | |||
| 123 | bool setMinimumOutdoorAirTemperature(double minimumOutdoorAirTemperature); | ||
| 124 | |||
| 125 | bool setMaximumOutdoorAirTemperature(double maximumOutdoorAirTemperature); | ||
| 126 | |||
| 127 | bool setMinimumLeavingWaterTemperatureCurve(const Curve& minimumLeavingWaterTemperatureCurve); | ||
| 128 | |||
| 129 | void resetMinimumLeavingWaterTemperatureCurve(); | ||
| 130 | |||
| 131 | bool setMaximumLeavingWaterTemperatureCurve(const Curve& maximumLeavingWaterTemperatureCurve); | ||
| 132 | |||
| 133 | void resetMaximumLeavingWaterTemperatureCurve(); | ||
| 134 | |||
| 135 | bool setSizingFactor(double sizingFactor); | ||
| 136 | |||
| 137 | bool setBoosterModeOnSpeed(const HeatPumpAirToWaterHeatingSpeedData& boosterModeOnSpeed); | ||
| 138 | |||
| 139 | void resetBoosterModeOnSpeed(); | ||
| 140 | |||
| 141 | //@} | ||
| 142 | /** @name Other */ | ||
| 143 | //@{ | ||
| 144 | |||
| 145 | bool setSpeedDataList(const ModelObjectList& speedDataList); | ||
| 146 | void resetSpeedDataList(); | ||
| 147 | ModelObjectList speedDataList() const; | ||
| 148 | |||
| 149 | std::vector<HeatPumpAirToWaterHeatingSpeedData> speeds() const; | ||
| 150 | unsigned numberOfSpeeds() const; | ||
| 151 | boost::optional<unsigned> speedIndex(const HeatPumpAirToWaterHeatingSpeedData& speed) const; | ||
| 152 | |||
| 153 | bool addSpeed(const HeatPumpAirToWaterHeatingSpeedData& speed); | ||
| 154 | bool addSpeed(const HeatPumpAirToWaterHeatingSpeedData& speed, unsigned index); | ||
| 155 | bool setSpeedIndex(const HeatPumpAirToWaterHeatingSpeedData& speed, unsigned index); | ||
| 156 | bool setSpeeds(const std::vector<HeatPumpAirToWaterHeatingSpeedData>& speeds); | ||
| 157 | bool removeSpeed(const HeatPumpAirToWaterHeatingSpeedData& speed); | ||
| 158 | bool removeSpeed(unsigned index); | ||
| 159 | void removeAllSpeeds(); | ||
| 160 | |||
| 161 | // Convenience function to return the HeatPumpAirToWater object that reference this heating coil if any | ||
| 162 | boost::optional<HeatPumpAirToWater> heatPumpAirToWater() const; | ||
| 163 | |||
| 164 | // Autosize methods | ||
| 165 | |||
| 166 | boost::optional<double> autosizedRatedAirFlowRate() const; | ||
| 167 | boost::optional<double> autosizedRatedWaterFlowRate() const; | ||
| 168 | boost::optional<double> autosizedRatedHeatingCapacity() const; // Convenience method | ||
| 169 | |||
| 170 | //@} | ||
| 171 | protected: | ||
| 172 | private: | ||
| 173 | − | REGISTER_LOGGER("openstudio.model.HeatPumpAirToWaterHeating"); | |
| 174 | |||
| 175 | // TODO: Check the return types of these methods. | ||
| 176 | // Optional getters for use by methods like children() so can remove() if the constructor fails. | ||
| 177 | // There are other ways for the public versions of these getters to fail--perhaps all required | ||
| 178 | // objects should be returned as boost::optionals | ||
| 179 | boost::optional<Schedule> optionalAvailabilitySchedule() const; | ||
| 180 | boost::optional<ModelObjectList> optionalSpeedDataList() const; | ||
| 181 | }; | ||
| 182 | |||
| 183 | } // namespace detail | ||
| 184 | |||
| 185 | } // namespace model | ||
| 186 | } // namespace openstudio | ||
| 187 | |||
| 188 | #endif // MODEL_HEATPUMPAIRTOWATERHEATING_IMPL_HPP | ||
| 189 |