src/model/GeneratorPhotovoltaic.cpp
| 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 | #include "GeneratorPhotovoltaic.hpp" | ||
| 7 | #include "GeneratorPhotovoltaic_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Model.hpp" | ||
| 10 | #include "PlanarSurface.hpp" | ||
| 11 | #include "PlanarSurface_Impl.hpp" | ||
| 12 | #include "Surface.hpp" | ||
| 13 | #include "Surface_Impl.hpp" | ||
| 14 | #include "ShadingSurface.hpp" | ||
| 15 | #include "ShadingSurface_Impl.hpp" | ||
| 16 | #include "PhotovoltaicPerformance.hpp" | ||
| 17 | #include "PhotovoltaicPerformance_Impl.hpp" | ||
| 18 | #include "PhotovoltaicPerformanceSimple.hpp" | ||
| 19 | #include "PhotovoltaicPerformanceEquivalentOneDiode.hpp" | ||
| 20 | #include "PhotovoltaicPerformanceSandia.hpp" | ||
| 21 | #include "Schedule.hpp" | ||
| 22 | #include "Schedule_Impl.hpp" | ||
| 23 | #include "ScheduleTypeLimits.hpp" | ||
| 24 | #include "ScheduleTypeRegistry.hpp" | ||
| 25 | |||
| 26 | #include <utilities/idd/IddFactory.hxx> | ||
| 27 | #include <utilities/idd/IddEnums.hxx> | ||
| 28 | #include <utilities/idd/OS_Generator_Photovoltaic_FieldEnums.hxx> | ||
| 29 | |||
| 30 | #include "../utilities/units/Unit.hpp" | ||
| 31 | |||
| 32 | #include "../utilities/core/Assert.hpp" | ||
| 33 | |||
| 34 | namespace openstudio { | ||
| 35 | namespace model { | ||
| 36 | |||
| 37 | namespace detail { | ||
| 38 | |||
| 39 | 23 | GeneratorPhotovoltaic_Impl::GeneratorPhotovoltaic_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 40 | 23 | : Generator_Impl(idfObject, model, keepHandle) { | |
| 41 |
4/6✓ Branch 1 taken 23 times.
✓ Branch 4 taken 23 times.
✓ Branch 7 taken 23 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 23 times.
✗ Branch 13 not taken.
|
23 | OS_ASSERT(idfObject.iddObject().type() == GeneratorPhotovoltaic::iddObjectType()); |
| 42 | 23 | } | |
| 43 | |||
| 44 | ✗ | GeneratorPhotovoltaic_Impl::GeneratorPhotovoltaic_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle) | |
| 45 | ✗ | : Generator_Impl(other, model, keepHandle) { | |
| 46 | ✗ | OS_ASSERT(other.iddObject().type() == GeneratorPhotovoltaic::iddObjectType()); | |
| 47 | ✗ | } | |
| 48 | |||
| 49 | 6 | GeneratorPhotovoltaic_Impl::GeneratorPhotovoltaic_Impl(const GeneratorPhotovoltaic_Impl& other, Model_Impl* model, bool keepHandle) | |
| 50 | 6 | : Generator_Impl(other, model, keepHandle) {} | |
| 51 | |||
| 52 | ✗ | const std::vector<std::string>& GeneratorPhotovoltaic_Impl::outputVariableNames() const { | |
| 53 | static const std::vector<std::string> result{"Generator Produced DC Electricity Rate", "Generator Produced DC Electricity Energy", | ||
| 54 | "Generator PV Cell Temperature", "Generator PV Short Circuit Current", | ||
| 55 | ✗ | "Generator PV Open Circuit Voltage", "Generator PV Array Efficiency"}; | |
| 56 | ✗ | return result; | |
| 57 | ✗ | } | |
| 58 | |||
| 59 | ✗ | IddObjectType GeneratorPhotovoltaic_Impl::iddObjectType() const { | |
| 60 | ✗ | return GeneratorPhotovoltaic::iddObjectType(); | |
| 61 | } | ||
| 62 | |||
| 63 | ✗ | std::vector<ScheduleTypeKey> GeneratorPhotovoltaic_Impl::getScheduleTypeKeys(const Schedule& schedule) const { | |
| 64 | // TODO: Check schedule display names. | ||
| 65 | ✗ | std::vector<ScheduleTypeKey> result; | |
| 66 | ✗ | UnsignedVector fieldIndices = getSourceIndices(schedule.handle()); | |
| 67 | ✗ | UnsignedVector::const_iterator b(fieldIndices.begin()); | |
| 68 | ✗ | UnsignedVector::const_iterator e(fieldIndices.end()); | |
| 69 | ✗ | if (std::find(b, e, OS_Generator_PhotovoltaicFields::AvailabilityScheduleName) != e) { | |
| 70 | ✗ | result.push_back(ScheduleTypeKey("GeneratorPhotovoltaic", "Availability")); | |
| 71 | } | ||
| 72 | ✗ | return result; | |
| 73 | ✗ | } | |
| 74 | |||
| 75 | 7 | std::vector<ModelObject> GeneratorPhotovoltaic_Impl::children() const { | |
| 76 | 7 | std::vector<ModelObject> result; | |
| 77 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
7 | result.push_back(photovoltaicPerformance()); |
| 78 | 7 | return result; | |
| 79 | ✗ | } | |
| 80 | |||
| 81 | 5 | std::vector<openstudio::IdfObject> GeneratorPhotovoltaic_Impl::remove() { | |
| 82 | //setString(OS_Generator_PhotovoltaicFields::ModulePerformanceName, ""); | ||
| 83 | 5 | return Generator_Impl::remove(); | |
| 84 | } | ||
| 85 | |||
| 86 | ✗ | std::vector<IddObjectType> GeneratorPhotovoltaic_Impl::allowableChildTypes() const { | |
| 87 | ✗ | return {}; | |
| 88 | } | ||
| 89 | |||
| 90 | 2 | ModelObject GeneratorPhotovoltaic_Impl::clone(Model model) const { | |
| 91 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | auto result = ModelObject_Impl::clone(model).cast<GeneratorPhotovoltaic>(); |
| 92 |
4/4✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
|
2 | auto newPerformance = this->photovoltaicPerformance().clone(model).cast<PhotovoltaicPerformance>(); |
| 93 |
2/2✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
|
2 | result.setPointer(OS_Generator_PhotovoltaicFields::ModulePerformanceName, newPerformance.handle()); |
| 94 | |||
| 95 |
1/1✓ Branch 1 taken 2 times.
|
2 | result.resetSurface(); |
| 96 | 4 | return std::move(result); | |
| 97 | 2 | } | |
| 98 | |||
| 99 | 2 | std::string GeneratorPhotovoltaic_Impl::generatorObjectType() const { | |
| 100 |
1/1✓ Branch 1 taken 2 times.
|
4 | return "Generator:Photovoltaic"; |
| 101 | } | ||
| 102 | |||
| 103 | 5 | boost::optional<double> GeneratorPhotovoltaic_Impl::ratedThermaltoElectricalPowerRatio() const { | |
| 104 | 5 | return boost::none; | |
| 105 | } | ||
| 106 | |||
| 107 | 11 | boost::optional<PlanarSurface> GeneratorPhotovoltaic_Impl::surface() const { | |
| 108 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | return getObject<ModelObject>().getModelObjectTarget<PlanarSurface>(OS_Generator_PhotovoltaicFields::SurfaceName); |
| 109 | } | ||
| 110 | |||
| 111 | 25 | PhotovoltaicPerformance GeneratorPhotovoltaic_Impl::photovoltaicPerformance() const { | |
| 112 | boost::optional<PhotovoltaicPerformance> value = | ||
| 113 |
2/2✓ Branch 1 taken 25 times.
✓ Branch 4 taken 25 times.
|
25 | getObject<ModelObject>().getModelObjectTarget<PhotovoltaicPerformance>(OS_Generator_PhotovoltaicFields::ModulePerformanceName); |
| 114 |
1/2✗ Branch 1 not taken.
✓ Branch 2 taken 25 times.
|
25 | if (!value) { |
| 115 | ✗ | LOG_AND_THROW(briefDescription() << " does not have an PhotovoltaicPerformance attached."); | |
| 116 | } | ||
| 117 |
2/2✓ Branch 1 taken 25 times.
✓ Branch 4 taken 25 times.
|
50 | return value.get(); |
| 118 | 25 | } | |
| 119 | |||
| 120 | 8 | std::string GeneratorPhotovoltaic_Impl::heatTransferIntegrationMode() const { | |
| 121 |
1/1✓ Branch 1 taken 8 times.
|
8 | boost::optional<std::string> value = getString(OS_Generator_PhotovoltaicFields::HeatTransferIntegrationMode, true); |
| 122 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
|
8 | OS_ASSERT(value); |
| 123 |
2/2✓ Branch 1 taken 8 times.
✓ Branch 4 taken 8 times.
|
16 | return value.get(); |
| 124 | 8 | } | |
| 125 | |||
| 126 | 6 | bool GeneratorPhotovoltaic_Impl::isHeatTransferIntegrationModeDefaulted() const { | |
| 127 | 6 | return isEmpty(OS_Generator_PhotovoltaicFields::HeatTransferIntegrationMode); | |
| 128 | } | ||
| 129 | |||
| 130 | 8 | double GeneratorPhotovoltaic_Impl::numberOfModulesInParallel() const { | |
| 131 |
1/1✓ Branch 1 taken 8 times.
|
8 | boost::optional<double> value = getDouble(OS_Generator_PhotovoltaicFields::NumberofModulesinParallel, true); |
| 132 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
|
8 | OS_ASSERT(value); |
| 133 |
1/1✓ Branch 1 taken 8 times.
|
16 | return value.get(); |
| 134 | } | ||
| 135 | |||
| 136 | 6 | bool GeneratorPhotovoltaic_Impl::isNumberOfModulesInParallelDefaulted() const { | |
| 137 | 6 | return isEmpty(OS_Generator_PhotovoltaicFields::NumberofModulesinParallel); | |
| 138 | } | ||
| 139 | |||
| 140 | 8 | double GeneratorPhotovoltaic_Impl::numberOfModulesInSeries() const { | |
| 141 |
1/1✓ Branch 1 taken 8 times.
|
8 | boost::optional<double> value = getDouble(OS_Generator_PhotovoltaicFields::NumberofModulesinSeries, true); |
| 142 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
✗ Branch 4 not taken.
|
8 | OS_ASSERT(value); |
| 143 |
1/1✓ Branch 1 taken 8 times.
|
16 | return value.get(); |
| 144 | } | ||
| 145 | |||
| 146 | 6 | bool GeneratorPhotovoltaic_Impl::isNumberOfModulesInSeriesDefaulted() const { | |
| 147 | 6 | return isEmpty(OS_Generator_PhotovoltaicFields::NumberofModulesinSeries); | |
| 148 | } | ||
| 149 | |||
| 150 | 14 | boost::optional<double> GeneratorPhotovoltaic_Impl::ratedElectricPowerOutput() const { | |
| 151 | 14 | return getDouble(OS_Generator_PhotovoltaicFields::RatedElectricPowerOutput, true); | |
| 152 | } | ||
| 153 | |||
| 154 | 11 | boost::optional<Schedule> GeneratorPhotovoltaic_Impl::availabilitySchedule() const { | |
| 155 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_Generator_PhotovoltaicFields::AvailabilityScheduleName); |
| 156 | } | ||
| 157 | |||
| 158 | 7 | bool GeneratorPhotovoltaic_Impl::setSurface(const PlanarSurface& surface) { | |
| 159 | 7 | bool result = false; | |
| 160 |
3/3✓ Branch 1 taken 7 times.
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 6 times.
|
14 | if (surface.optionalCast<Surface>()) { |
| 161 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
1 | result = setPointer(OS_Generator_PhotovoltaicFields::SurfaceName, surface.handle()); |
| 162 |
2/3✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
|
12 | } else if (surface.optionalCast<ShadingSurface>()) { |
| 163 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
6 | result = setPointer(OS_Generator_PhotovoltaicFields::SurfaceName, surface.handle()); |
| 164 | } | ||
| 165 | 7 | return result; | |
| 166 | } | ||
| 167 | |||
| 168 | 5 | void GeneratorPhotovoltaic_Impl::resetSurface() { | |
| 169 |
2/2✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
|
10 | bool result = setString(OS_Generator_PhotovoltaicFields::SurfaceName, ""); |
| 170 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
|
5 | OS_ASSERT(result); |
| 171 | 5 | } | |
| 172 | |||
| 173 | 4 | bool GeneratorPhotovoltaic_Impl::setHeatTransferIntegrationMode(const std::string& heatTransferIntegrationMode) { | |
| 174 | 4 | bool result = setString(OS_Generator_PhotovoltaicFields::HeatTransferIntegrationMode, heatTransferIntegrationMode); | |
| 175 | 4 | return result; | |
| 176 | } | ||
| 177 | |||
| 178 | 3 | void GeneratorPhotovoltaic_Impl::resetHeatTransferIntegrationMode() { | |
| 179 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | bool result = setString(OS_Generator_PhotovoltaicFields::HeatTransferIntegrationMode, ""); |
| 180 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
|
3 | OS_ASSERT(result); |
| 181 | 3 | } | |
| 182 | |||
| 183 | 5 | bool GeneratorPhotovoltaic_Impl::setNumberOfModulesInParallel(double numberofModulesinParallel) { | |
| 184 | 5 | bool result = setDouble(OS_Generator_PhotovoltaicFields::NumberofModulesinParallel, numberofModulesinParallel); | |
| 185 | 5 | return result; | |
| 186 | } | ||
| 187 | |||
| 188 | 3 | void GeneratorPhotovoltaic_Impl::resetNumberOfModulesInParallel() { | |
| 189 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | bool result = setString(OS_Generator_PhotovoltaicFields::NumberofModulesinParallel, ""); |
| 190 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
|
3 | OS_ASSERT(result); |
| 191 | 3 | } | |
| 192 | |||
| 193 | 5 | bool GeneratorPhotovoltaic_Impl::setNumberOfModulesInSeries(double numberofModulesinSeries) { | |
| 194 | 5 | bool result = setDouble(OS_Generator_PhotovoltaicFields::NumberofModulesinSeries, numberofModulesinSeries); | |
| 195 | 5 | return result; | |
| 196 | } | ||
| 197 | |||
| 198 | 3 | void GeneratorPhotovoltaic_Impl::resetNumberOfModulesInSeries() { | |
| 199 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | bool result = setString(OS_Generator_PhotovoltaicFields::NumberofModulesinSeries, ""); |
| 200 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
|
3 | OS_ASSERT(result); |
| 201 | 3 | } | |
| 202 | |||
| 203 | 5 | bool GeneratorPhotovoltaic_Impl::setRatedElectricPowerOutput(double ratedElectricPowerOutput) { | |
| 204 | 5 | bool result = setDouble(OS_Generator_PhotovoltaicFields::RatedElectricPowerOutput, ratedElectricPowerOutput); | |
| 205 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
|
5 | OS_ASSERT(result); |
| 206 | 5 | return result; | |
| 207 | } | ||
| 208 | |||
| 209 | 3 | void GeneratorPhotovoltaic_Impl::resetRatedElectricPowerOutput() { | |
| 210 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | bool result = setString(OS_Generator_PhotovoltaicFields::RatedElectricPowerOutput, ""); |
| 211 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
|
3 | OS_ASSERT(result); |
| 212 | 3 | } | |
| 213 | |||
| 214 | 5 | bool GeneratorPhotovoltaic_Impl::setAvailabilitySchedule(Schedule& schedule) { | |
| 215 |
3/3✓ Branch 1 taken 5 times.
✓ Branch 4 taken 5 times.
✓ Branch 7 taken 5 times.
|
20 | bool result = setSchedule(OS_Generator_PhotovoltaicFields::AvailabilityScheduleName, "GeneratorPhotovoltaic", "Availability", schedule); |
| 216 | 5 | return result; | |
| 217 | } | ||
| 218 | |||
| 219 | 3 | void GeneratorPhotovoltaic_Impl::resetAvailabilitySchedule() { | |
| 220 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
6 | bool result = setString(OS_Generator_PhotovoltaicFields::AvailabilityScheduleName, ""); |
| 221 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
|
3 | OS_ASSERT(result); |
| 222 | 3 | } | |
| 223 | |||
| 224 | ✗ | std::vector<EMSActuatorNames> GeneratorPhotovoltaic_Impl::emsActuatorNames() const { | |
| 225 | ✗ | std::vector<EMSActuatorNames> actuators{{"On-Site Generator Control", "Requested Power"}}; | |
| 226 | ✗ | return actuators; | |
| 227 | ✗ | } | |
| 228 | |||
| 229 | ✗ | std::vector<std::string> GeneratorPhotovoltaic_Impl::emsInternalVariableNames() const { | |
| 230 | ✗ | std::vector<std::string> types{"Generator Nominal Maximum Power", "Generator Nominal Thermal To Electric Ratio"}; | |
| 231 | ✗ | return types; | |
| 232 | ✗ | } | |
| 233 | } // namespace detail | ||
| 234 | |||
| 235 | 15 | GeneratorPhotovoltaic GeneratorPhotovoltaic::simple(const Model& model) { | |
| 236 |
1/1✓ Branch 1 taken 15 times.
|
15 | PhotovoltaicPerformanceSimple performance(model); |
| 237 |
1/1✓ Branch 1 taken 15 times.
|
30 | return GeneratorPhotovoltaic(model, performance); |
| 238 | 15 | } | |
| 239 | |||
| 240 | 5 | GeneratorPhotovoltaic GeneratorPhotovoltaic::equivalentOneDiode(const Model& model) { | |
| 241 |
1/1✓ Branch 1 taken 5 times.
|
5 | PhotovoltaicPerformanceEquivalentOneDiode performance(model); |
| 242 |
1/1✓ Branch 1 taken 5 times.
|
10 | return GeneratorPhotovoltaic(model, performance); |
| 243 | 5 | } | |
| 244 | |||
| 245 | 2 | GeneratorPhotovoltaic GeneratorPhotovoltaic::sandia(const Model& model) { | |
| 246 |
1/1✓ Branch 1 taken 2 times.
|
2 | PhotovoltaicPerformanceSandia performance(model); |
| 247 |
1/1✓ Branch 1 taken 2 times.
|
4 | return GeneratorPhotovoltaic(model, performance); |
| 248 | 2 | } | |
| 249 | |||
| 250 | 1 | GeneratorPhotovoltaic GeneratorPhotovoltaic::fromSandiaDatabase(const Model& model, const std::string& sandiaModulePerformanceName) { | |
| 251 |
1/1✓ Branch 1 taken 1 time.
|
1 | PhotovoltaicPerformanceSandia performance = PhotovoltaicPerformanceSandia::fromSandiaDatabase(model, sandiaModulePerformanceName); |
| 252 |
1/1✓ Branch 1 taken 1 time.
|
2 | return GeneratorPhotovoltaic(model, performance); |
| 253 | 1 | } | |
| 254 | |||
| 255 | 23 | GeneratorPhotovoltaic::GeneratorPhotovoltaic(const Model& model, const PhotovoltaicPerformance& performance) | |
| 256 | 23 | : Generator(GeneratorPhotovoltaic::iddObjectType(), model) { | |
| 257 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 23 times.
✗ Branch 5 not taken.
|
23 | OS_ASSERT(getImpl<detail::GeneratorPhotovoltaic_Impl>()); |
| 258 | |||
| 259 |
2/2✓ Branch 1 taken 23 times.
✓ Branch 4 taken 23 times.
|
23 | bool ok = setPointer(OS_Generator_PhotovoltaicFields::ModulePerformanceName, performance.handle()); |
| 260 |
1/3✗ Branch 0 not taken.
✓ Branch 1 taken 23 times.
✗ Branch 3 not taken.
|
23 | OS_ASSERT(ok); |
| 261 | 23 | } | |
| 262 | |||
| 263 | 7783 | IddObjectType GeneratorPhotovoltaic::iddObjectType() { | |
| 264 |
1/1✓ Branch 1 taken 7783 times.
|
7783 | return {IddObjectType::OS_Generator_Photovoltaic}; |
| 265 | } | ||
| 266 | |||
| 267 | ✗ | std::vector<std::string> GeneratorPhotovoltaic::heatTransferIntegrationModeValues() { | |
| 268 | ✗ | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), OS_Generator_PhotovoltaicFields::HeatTransferIntegrationMode); | |
| 269 | } | ||
| 270 | |||
| 271 | 11 | boost::optional<PlanarSurface> GeneratorPhotovoltaic::surface() const { | |
| 272 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->surface(); |
| 273 | } | ||
| 274 | |||
| 275 | 16 | PhotovoltaicPerformance GeneratorPhotovoltaic::photovoltaicPerformance() const { | |
| 276 |
1/1✓ Branch 3 taken 16 times.
|
16 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->photovoltaicPerformance(); |
| 277 | } | ||
| 278 | |||
| 279 | 8 | std::string GeneratorPhotovoltaic::heatTransferIntegrationMode() const { | |
| 280 |
1/1✓ Branch 3 taken 8 times.
|
8 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->heatTransferIntegrationMode(); |
| 281 | } | ||
| 282 | |||
| 283 | 6 | bool GeneratorPhotovoltaic::isHeatTransferIntegrationModeDefaulted() const { | |
| 284 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->isHeatTransferIntegrationModeDefaulted(); |
| 285 | } | ||
| 286 | |||
| 287 | 8 | double GeneratorPhotovoltaic::numberOfModulesInParallel() const { | |
| 288 |
1/1✓ Branch 3 taken 8 times.
|
8 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->numberOfModulesInParallel(); |
| 289 | } | ||
| 290 | |||
| 291 | 6 | bool GeneratorPhotovoltaic::isNumberOfModulesInParallelDefaulted() const { | |
| 292 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->isNumberOfModulesInParallelDefaulted(); |
| 293 | } | ||
| 294 | |||
| 295 | 8 | double GeneratorPhotovoltaic::numberOfModulesInSeries() const { | |
| 296 |
1/1✓ Branch 3 taken 8 times.
|
8 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->numberOfModulesInSeries(); |
| 297 | } | ||
| 298 | |||
| 299 | 6 | bool GeneratorPhotovoltaic::isNumberOfModulesInSeriesDefaulted() const { | |
| 300 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->isNumberOfModulesInSeriesDefaulted(); |
| 301 | } | ||
| 302 | |||
| 303 | 12 | boost::optional<double> GeneratorPhotovoltaic::ratedElectricPowerOutput() const { | |
| 304 |
1/1✓ Branch 3 taken 12 times.
|
12 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->ratedElectricPowerOutput(); |
| 305 | } | ||
| 306 | |||
| 307 | 9 | boost::optional<Schedule> GeneratorPhotovoltaic::availabilitySchedule() const { | |
| 308 |
1/1✓ Branch 3 taken 9 times.
|
9 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->availabilitySchedule(); |
| 309 | } | ||
| 310 | |||
| 311 | 7 | bool GeneratorPhotovoltaic::setSurface(const PlanarSurface& surface) { | |
| 312 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->setSurface(surface); |
| 313 | } | ||
| 314 | |||
| 315 | 5 | void GeneratorPhotovoltaic::resetSurface() { | |
| 316 |
1/1✓ Branch 3 taken 5 times.
|
5 | getImpl<detail::GeneratorPhotovoltaic_Impl>()->resetSurface(); |
| 317 | 5 | } | |
| 318 | |||
| 319 | //bool GeneratorPhotovoltaic::setModulePerformance(const PVModules& pVModules) { | ||
| 320 | // return getImpl<detail::GeneratorPhotovoltaic_Impl>()->setModulePerformance(pVModules); | ||
| 321 | //} | ||
| 322 | |||
| 323 | 4 | bool GeneratorPhotovoltaic::setHeatTransferIntegrationMode(const std::string& heatTransferIntegrationMode) { | |
| 324 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->setHeatTransferIntegrationMode(heatTransferIntegrationMode); |
| 325 | } | ||
| 326 | |||
| 327 | 3 | void GeneratorPhotovoltaic::resetHeatTransferIntegrationMode() { | |
| 328 |
1/1✓ Branch 3 taken 3 times.
|
3 | getImpl<detail::GeneratorPhotovoltaic_Impl>()->resetHeatTransferIntegrationMode(); |
| 329 | 3 | } | |
| 330 | |||
| 331 | 5 | bool GeneratorPhotovoltaic::setNumberOfModulesInParallel(double numberofModulesinParallel) { | |
| 332 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->setNumberOfModulesInParallel(numberofModulesinParallel); |
| 333 | } | ||
| 334 | |||
| 335 | 3 | void GeneratorPhotovoltaic::resetNumberOfModulesInParallel() { | |
| 336 |
1/1✓ Branch 3 taken 3 times.
|
3 | getImpl<detail::GeneratorPhotovoltaic_Impl>()->resetNumberOfModulesInParallel(); |
| 337 | 3 | } | |
| 338 | |||
| 339 | 5 | bool GeneratorPhotovoltaic::setNumberOfModulesInSeries(double numberofModulesinSeries) { | |
| 340 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->setNumberOfModulesInSeries(numberofModulesinSeries); |
| 341 | } | ||
| 342 | |||
| 343 | 3 | void GeneratorPhotovoltaic::resetNumberOfModulesInSeries() { | |
| 344 |
1/1✓ Branch 3 taken 3 times.
|
3 | getImpl<detail::GeneratorPhotovoltaic_Impl>()->resetNumberOfModulesInSeries(); |
| 345 | 3 | } | |
| 346 | |||
| 347 | 5 | bool GeneratorPhotovoltaic::setRatedElectricPowerOutput(double ratedElectricPowerOutput) { | |
| 348 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->setRatedElectricPowerOutput(ratedElectricPowerOutput); |
| 349 | } | ||
| 350 | |||
| 351 | 3 | void GeneratorPhotovoltaic::resetRatedElectricPowerOutput() { | |
| 352 |
1/1✓ Branch 3 taken 3 times.
|
3 | getImpl<detail::GeneratorPhotovoltaic_Impl>()->resetRatedElectricPowerOutput(); |
| 353 | 3 | } | |
| 354 | |||
| 355 | 5 | bool GeneratorPhotovoltaic::setAvailabilitySchedule(Schedule& schedule) { | |
| 356 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::GeneratorPhotovoltaic_Impl>()->setAvailabilitySchedule(schedule); |
| 357 | } | ||
| 358 | |||
| 359 | 3 | void GeneratorPhotovoltaic::resetAvailabilitySchedule() { | |
| 360 |
1/1✓ Branch 3 taken 3 times.
|
3 | getImpl<detail::GeneratorPhotovoltaic_Impl>()->resetAvailabilitySchedule(); |
| 361 | 3 | } | |
| 362 | |||
| 363 | /// @cond | ||
| 364 |
1/1✓ Branch 3 taken 14 times.
|
14 | GeneratorPhotovoltaic::GeneratorPhotovoltaic(std::shared_ptr<detail::GeneratorPhotovoltaic_Impl> impl) : Generator(std::move(impl)) {} |
| 365 | /// @endcond | ||
| 366 | |||
| 367 | } // namespace model | ||
| 368 | } // namespace openstudio | ||
| 369 |