src/model/CentralHeatPumpSystem_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_CENTRALHEATPUMPSYSTEM_IMPL_HPP | ||
| 7 | #define MODEL_CENTRALHEATPUMPSYSTEM_IMPL_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "WaterToWaterComponent_Impl.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | class Schedule; | ||
| 17 | class ModelObjectList; | ||
| 18 | class CentralHeatPumpSystemModule; | ||
| 19 | |||
| 20 | namespace detail { | ||
| 21 | |||
| 22 | /** CentralHeatPumpSystem_Impl is a WaterToWaterComponent_Impl that is the implementation class for CentralHeatPumpSystem.*/ | ||
| 23 | class MODEL_API CentralHeatPumpSystem_Impl : public WaterToWaterComponent_Impl | ||
| 24 | { | ||
| 25 | public: | ||
| 26 | /** @name Constructors and Destructors */ | ||
| 27 | //@{ | ||
| 28 | |||
| 29 | CentralHeatPumpSystem_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle); | ||
| 30 | |||
| 31 | CentralHeatPumpSystem_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 32 | |||
| 33 | CentralHeatPumpSystem_Impl(const CentralHeatPumpSystem_Impl& other, Model_Impl* model, bool keepHandle); | ||
| 34 | |||
| 35 | 29 | virtual ~CentralHeatPumpSystem_Impl() override = default; | |
| 36 | |||
| 37 | //@} | ||
| 38 | /** @name Virtual Methods */ | ||
| 39 | //@{ | ||
| 40 | |||
| 41 | virtual const std::vector<std::string>& outputVariableNames() const override; | ||
| 42 | |||
| 43 | virtual IddObjectType iddObjectType() const override; | ||
| 44 | |||
| 45 | virtual std::vector<ScheduleTypeKey> getScheduleTypeKeys(const Schedule& schedule) const override; | ||
| 46 | |||
| 47 | // CoolingLoop | ||
| 48 | virtual unsigned supplyInletPort() const override; | ||
| 49 | virtual unsigned supplyOutletPort() const override; | ||
| 50 | // SourceLoop | ||
| 51 | virtual unsigned demandInletPort() const override; | ||
| 52 | virtual unsigned demandOutletPort() const override; | ||
| 53 | // HeatingLoop | ||
| 54 | virtual unsigned tertiaryInletPort() const override; | ||
| 55 | virtual unsigned tertiaryOutletPort() const override; | ||
| 56 | |||
| 57 | /* This function will perform a check if trying to add it to a node that is on the supply side of a plant loop. | ||
| 58 | * If: | ||
| 59 | * - the node is on the supply side of a loop | ||
| 60 | * - the CentralHeatPumpSystem already has a cooling loop (supply side) | ||
| 61 | * - the node isn't on the cooling loop itself | ||
| 62 | * - the CentralHeatPumpSystem doesn't have a heating (tertiary) loop, | ||
| 63 | * then it tries to add it to the Tertiary loop. | ||
| 64 | * In all other cases, it will call the base class' method WaterToWaterComponent_Impl::addToNode() | ||
| 65 | */ | ||
| 66 | virtual bool addToNode(Node& node) override; | ||
| 67 | |||
| 68 | /* Restricts addToTertiaryNode to a node that is on the supply side of a plant loop (tertiary = Heating Loop) */ | ||
| 69 | virtual bool addToTertiaryNode(Node& node) override; | ||
| 70 | |||
| 71 | virtual ComponentType componentType() const override; | ||
| 72 | virtual std::vector<FuelType> coolingFuelTypes() const override; | ||
| 73 | virtual std::vector<FuelType> heatingFuelTypes() const override; | ||
| 74 | virtual std::vector<AppGFuelType> appGHeatingFuelTypes() const override; | ||
| 75 | |||
| 76 | //@} | ||
| 77 | /** @name Getters */ | ||
| 78 | //@{ | ||
| 79 | |||
| 80 | double ancillaryPower() const; | ||
| 81 | |||
| 82 | boost::optional<Schedule> ancillaryOperationSchedule() const; | ||
| 83 | |||
| 84 | boost::optional<ModelObjectList> chillerHeaterModuleList() const; | ||
| 85 | |||
| 86 | //@} | ||
| 87 | /** @name Setters */ | ||
| 88 | //@{ | ||
| 89 | |||
| 90 | bool setAncillaryPower(double ancillaryPower); | ||
| 91 | |||
| 92 | bool setAncillaryOperationSchedule(Schedule& schedule); | ||
| 93 | |||
| 94 | void resetAncillaryOperationSchedule(); | ||
| 95 | |||
| 96 | //@} | ||
| 97 | /** @name Other */ | ||
| 98 | //@{ | ||
| 99 | |||
| 100 | bool addModule(const CentralHeatPumpSystemModule& centralHeatPumpSystemModule); | ||
| 101 | |||
| 102 | void removeModule(const CentralHeatPumpSystemModule& centralHeatPumpSystemModule); | ||
| 103 | |||
| 104 | void removeAllModules(); | ||
| 105 | |||
| 106 | std::vector<CentralHeatPumpSystemModule> modules() const; | ||
| 107 | |||
| 108 | bool setChillerHeaterModuleList(const boost::optional<ModelObjectList>& modelObjectList); | ||
| 109 | |||
| 110 | void resetChillerHeaterModuleList(); | ||
| 111 | |||
| 112 | /** Convenience Function to return the Cooling Loop **/ | ||
| 113 | boost::optional<PlantLoop> coolingPlantLoop() const; | ||
| 114 | |||
| 115 | /** Convenience Function to return the Source Loop **/ | ||
| 116 | boost::optional<PlantLoop> sourcePlantLoop() const; | ||
| 117 | |||
| 118 | /** Convenience Function to return the Heating Loop **/ | ||
| 119 | boost::optional<PlantLoop> heatingPlantLoop() const; | ||
| 120 | |||
| 121 | // TODO: Need to override the clone, allowableChildTypes and children methods | ||
| 122 | ModelObject clone(Model model) const override; | ||
| 123 | |||
| 124 | // std::vector<IddObjectType> allowableChildTypes() const override; | ||
| 125 | |||
| 126 | // std::vector<ModelObject> children() const override; | ||
| 127 | |||
| 128 | //@} | ||
| 129 | protected: | ||
| 130 | private: | ||
| 131 | − | REGISTER_LOGGER("openstudio.model.CentralHeatPumpSystem"); | |
| 132 | |||
| 133 | // Optional getters for use by methods like children() so can remove() if the constructor fails. | ||
| 134 | // There are other ways for the public versions of these getters to fail--perhaps all required | ||
| 135 | // objects should be returned as boost::optionals | ||
| 136 | }; | ||
| 137 | |||
| 138 | } // namespace detail | ||
| 139 | |||
| 140 | } // namespace model | ||
| 141 | } // namespace openstudio | ||
| 142 | |||
| 143 | #endif // MODEL_CENTRALHEATPUMPSYSTEM_IMPL_HPP | ||
| 144 |