src/model/GeneratorPhotovoltaic.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_GENERATORPHOTOVOLTAIC_HPP | ||
| 7 | #define MODEL_GENERATORPHOTOVOLTAIC_HPP | ||
| 8 | |||
| 9 | #include "ModelAPI.hpp" | ||
| 10 | #include "Generator.hpp" | ||
| 11 | |||
| 12 | namespace openstudio { | ||
| 13 | |||
| 14 | namespace model { | ||
| 15 | |||
| 16 | class PlanarSurface; | ||
| 17 | class PhotovoltaicPerformance; | ||
| 18 | class Schedule; | ||
| 19 | |||
| 20 | namespace detail { | ||
| 21 | |||
| 22 | class GeneratorPhotovoltaic_Impl; | ||
| 23 | |||
| 24 | } // namespace detail | ||
| 25 | |||
| 26 | /** GeneratorPhotovoltaic is a Generator that wraps the OpenStudio IDD object 'OS:Generator:Photovoltaic'. */ | ||
| 27 | class MODEL_API GeneratorPhotovoltaic : public Generator | ||
| 28 | { | ||
| 29 | public: | ||
| 30 | /** @name Constructors and Destructors */ | ||
| 31 | //@{ | ||
| 32 | |||
| 33 | /// Creates a GeneratorPhotovoltaic object with PhotovoltaicPerformanceSimple performance | ||
| 34 | static GeneratorPhotovoltaic simple(const Model& model); | ||
| 35 | |||
| 36 | /// Creates a GeneratorPhotovoltaic object with PhotovoltaicPerformanceEquivalentOneDiode performance | ||
| 37 | static GeneratorPhotovoltaic equivalentOneDiode(const Model& model); | ||
| 38 | |||
| 39 | /// Creates a GeneratorPhotovoltaic object with PhotovoltaicPerformanceSandia performance, using the default Ctor | ||
| 40 | static GeneratorPhotovoltaic sandia(const Model& model); | ||
| 41 | |||
| 42 | /// Factory method to creates a GeneratorPhotovoltaic object with PhotovoltaicPerformanceSandia by looking up characteristics in the embedded | ||
| 43 | // Sandia database by its name. Please use the PhotovoltaicPerformanceSandia::sandiaModulePerformanceNames() static method | ||
| 44 | // to look up the valid names as it will throw if it cannot find it | ||
| 45 | static GeneratorPhotovoltaic fromSandiaDatabase(const Model& model, const std::string& sandiaModulePerformanceName); | ||
| 46 | |||
| 47 | 69 | virtual ~GeneratorPhotovoltaic() override = default; | |
| 48 | // Default the copy and move operators because the virtual dtor is explicit | ||
| 49 | 2 | GeneratorPhotovoltaic(const GeneratorPhotovoltaic& other) = default; | |
| 50 | 22 | GeneratorPhotovoltaic(GeneratorPhotovoltaic&& other) = default; | |
| 51 | ✗ | GeneratorPhotovoltaic& operator=(const GeneratorPhotovoltaic&) = default; | |
| 52 | ✗ | GeneratorPhotovoltaic& operator=(GeneratorPhotovoltaic&&) = default; | |
| 53 | |||
| 54 | //@} | ||
| 55 | |||
| 56 | static IddObjectType iddObjectType(); | ||
| 57 | |||
| 58 | static std::vector<std::string> heatTransferIntegrationModeValues(); | ||
| 59 | |||
| 60 | /** @name Getters */ | ||
| 61 | //@{ | ||
| 62 | |||
| 63 | boost::optional<PlanarSurface> surface() const; | ||
| 64 | |||
| 65 | PhotovoltaicPerformance photovoltaicPerformance() const; | ||
| 66 | |||
| 67 | std::string heatTransferIntegrationMode() const; | ||
| 68 | |||
| 69 | bool isHeatTransferIntegrationModeDefaulted() const; | ||
| 70 | |||
| 71 | double numberOfModulesInParallel() const; | ||
| 72 | |||
| 73 | bool isNumberOfModulesInParallelDefaulted() const; | ||
| 74 | |||
| 75 | double numberOfModulesInSeries() const; | ||
| 76 | |||
| 77 | bool isNumberOfModulesInSeriesDefaulted() const; | ||
| 78 | |||
| 79 | boost::optional<double> ratedElectricPowerOutput() const; | ||
| 80 | |||
| 81 | boost::optional<Schedule> availabilitySchedule() const; | ||
| 82 | |||
| 83 | //@} | ||
| 84 | /** @name Setters */ | ||
| 85 | //@{ | ||
| 86 | |||
| 87 | bool setSurface(const PlanarSurface& surface); | ||
| 88 | |||
| 89 | void resetSurface(); | ||
| 90 | |||
| 91 | bool setHeatTransferIntegrationMode(const std::string& heatTransferIntegrationMode); | ||
| 92 | |||
| 93 | void resetHeatTransferIntegrationMode(); | ||
| 94 | |||
| 95 | bool setNumberOfModulesInParallel(double numberOfModulesInParallel); | ||
| 96 | |||
| 97 | void resetNumberOfModulesInParallel(); | ||
| 98 | |||
| 99 | bool setNumberOfModulesInSeries(double numberOfModulesInSeries); | ||
| 100 | |||
| 101 | void resetNumberOfModulesInSeries(); | ||
| 102 | |||
| 103 | bool setRatedElectricPowerOutput(double ratedElectricPowerOutput); | ||
| 104 | |||
| 105 | void resetRatedElectricPowerOutput(); | ||
| 106 | |||
| 107 | bool setAvailabilitySchedule(Schedule& schedule); | ||
| 108 | |||
| 109 | void resetAvailabilitySchedule(); | ||
| 110 | |||
| 111 | //@} | ||
| 112 | /** @name Other */ | ||
| 113 | //@{ | ||
| 114 | |||
| 115 | //@} | ||
| 116 | protected: | ||
| 117 | /// @cond | ||
| 118 | using ImplType = detail::GeneratorPhotovoltaic_Impl; | ||
| 119 | |||
| 120 | GeneratorPhotovoltaic(const Model& model, const PhotovoltaicPerformance& performance); | ||
| 121 | |||
| 122 | explicit GeneratorPhotovoltaic(std::shared_ptr<detail::GeneratorPhotovoltaic_Impl> impl); | ||
| 123 | |||
| 124 | friend class detail::GeneratorPhotovoltaic_Impl; | ||
| 125 | friend class Model; | ||
| 126 | friend class IdfObject; | ||
| 127 | friend class openstudio::detail::IdfObject_Impl; | ||
| 128 | /// @endcond | ||
| 129 | private: | ||
| 130 | REGISTER_LOGGER("openstudio.model.GeneratorPhotovoltaic"); | ||
| 131 | }; | ||
| 132 | |||
| 133 | /** \relates GeneratorPhotovoltaic*/ | ||
| 134 | using OptionalGeneratorPhotovoltaic = boost::optional<GeneratorPhotovoltaic>; | ||
| 135 | |||
| 136 | /** \relates GeneratorPhotovoltaic*/ | ||
| 137 | using GeneratorPhotovoltaicVector = std::vector<GeneratorPhotovoltaic>; | ||
| 138 | |||
| 139 | } // namespace model | ||
| 140 | } // namespace openstudio | ||
| 141 | |||
| 142 | #endif // MODEL_GENERATORPHOTOVOLTAIC_HPP | ||
| 143 |