From 8ebb413b476ae3496406b878e9c0dd2b35325dc7 Mon Sep 17 00:00:00 2001 From: muradjava Date: Thu, 3 Mar 2022 08:42:03 +0100 Subject: [PATCH] Misleading parameter name 'height' has changed to 'elevationAngle' (#443) * mh/#393-Misleading parameter name 'height' has changed to 'elevationAngle' in PvInput * fix formatting * fix variable height to elevationAngle in PvInputTest.groovy * fix variable height to elevationAngle in some classes * fix variable height to elevationAngle in PvInputFactoryTest.groovy * fix variable height to elevationAngle in PvInputFactory and Test * fix variable height to elevationAngle in PvInputFactory and Test * fix variable height to elevationAngle in pv_input and CsvSystemParticipantSourceTest * fix variable height to elevationAngle in PvInputFactoryTest.groovy * Adapting tests to refactored field * Add changed name of parameter height to elevationAngle to Changelog * More related refactoring in comments and tests Co-authored-by: Chris Kittl <44838605+ckittl@users.noreply.github.com> Co-authored-by: t-ober <63147366+t-ober@users.noreply.github.com> Co-authored-by: Sebastian Peter <14994800+sebastian-peter@users.noreply.github.com> Co-authored-by: danielfeismann Co-authored-by: Sebastian Peter --- CHANGELOG.md | 1 + .../models/input/participant/pv.rst | 2 +- .../main/input/SystemDatamodelConcept.puml | 2 +- .../input/participant/PvInputFactory.java | 9 ++--- .../ie3/datamodel/models/StandardUnits.java | 2 +- .../models/input/system/PvInput.java | 36 +++++++++---------- .../SystemParticipantValidationUtils.java | 16 +++++---- .../participant/PvInputFactoryTest.groovy | 4 +-- .../input/InputEntityProcessorTest.groovy | 2 +- .../csv/CsvSystemParticipantSourceTest.groovy | 2 +- .../models/input/system/PvInputTest.groovy | 4 +-- ...ystemParticipantValidationUtilsTest.groovy | 14 ++++---- .../ie3/test/common/SampleJointGrid.groovy | 2 +- .../common/SystemParticipantTestData.groovy | 4 +-- .../testGridFiles/participants/pv_input.csv | 2 +- 15 files changed, 53 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e209002bf..13dad1f23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Let JavDoc pass, if there are warnings **ATTENTION:** Should be removed, when JavaDoc is fixed! (cf. Issue [#494](https://github.com/ie3-institute/PowerSystemDataModel/issues/494)) ### Changed +- BREAKING: PvInput Model parameter name height changed to elevationAngle [#393](https://github.com/ie3-institute/PowerSystemDataModel/issues/393) :warning: - BREAKING: Transformer's no load susceptance needs to be zero or negative to pass model validation [#378](https://github.com/ie3-institute/PowerSystemDataModel/issues/378) - All input data sets for version < 3.0.0 need to be altered! - Deprecating (as part of [#513](https://github.com/ie3-institute/PowerSystemDataModel/issues/513)): diff --git a/docs/readthedocs/models/input/participant/pv.rst b/docs/readthedocs/models/input/participant/pv.rst index 665869c7c..3308f9c6b 100644 --- a/docs/readthedocs/models/input/participant/pv.rst +++ b/docs/readthedocs/models/input/participant/pv.rst @@ -26,7 +26,7 @@ Detailed model of a photovoltaic power plant. +------------------+---------+--------------------------------------------------------------------------------------+ | etaConv | % | Efficiency of the assets inverter | +------------------+---------+--------------------------------------------------------------------------------------+ -| height | ° | Tilted inclination from horizontal [0°, 90°] | +| elevationAngle | ° | Tilted inclination from horizontal [0°, 90°] | +------------------+---------+--------------------------------------------------------------------------------------+ | kG | -- | Generator correction factor merging technical influences | +------------------+---------+--------------------------------------------------------------------------------------+ diff --git a/docs/uml/main/input/SystemDatamodelConcept.puml b/docs/uml/main/input/SystemDatamodelConcept.puml index 370fd6028..5e666732f 100644 --- a/docs/uml/main/input/SystemDatamodelConcept.puml +++ b/docs/uml/main/input/SystemDatamodelConcept.puml @@ -233,7 +233,7 @@ package models { - albedo: Double - azimuth: ComparableQuantity [°] - etaConv: ComparableQuantity [%] - - height: ComparableQuantity [°] + - elevationAngle: ComparableQuantity [°] - kG: Double - kT: Double - marketReaction: Boolean diff --git a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/PvInputFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/PvInputFactory.java index aef90b41a..9812354e3 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/input/participant/PvInputFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/input/participant/PvInputFactory.java @@ -22,7 +22,7 @@ public class PvInputFactory private static final String ALBEDO = "albedo"; private static final String AZIMUTH = "azimuth"; private static final String ETA_CONV = "etaconv"; - private static final String HEIGHT = "height"; + private static final String ELEVATION_ANGLE = "elevationangle"; private static final String KG = "kg"; private static final String KT = "kt"; private static final String MARKET_REACTION = "marketreaction"; @@ -36,7 +36,7 @@ public PvInputFactory() { @Override protected String[] getAdditionalFields() { return new String[] { - ALBEDO, AZIMUTH, ETA_CONV, HEIGHT, KG, KT, MARKET_REACTION, S_RATED, COS_PHI_RATED + ALBEDO, AZIMUTH, ETA_CONV, ELEVATION_ANGLE, KG, KT, MARKET_REACTION, S_RATED, COS_PHI_RATED }; } @@ -53,7 +53,8 @@ protected PvInput buildModel( final ComparableQuantity azimuth = data.getQuantity(AZIMUTH, StandardUnits.AZIMUTH); final ComparableQuantity etaConv = data.getQuantity(ETA_CONV, StandardUnits.EFFICIENCY); - final ComparableQuantity height = data.getQuantity(HEIGHT, StandardUnits.SOLAR_HEIGHT); + final ComparableQuantity elevationAngle = + data.getQuantity(ELEVATION_ANGLE, StandardUnits.SOLAR_ELEVATION_ANGLE); final double kG = data.getDouble(KG); final double kT = data.getDouble(KT); final boolean marketReaction = data.getBoolean(MARKET_REACTION); @@ -70,7 +71,7 @@ protected PvInput buildModel( albedo, azimuth, etaConv, - height, + elevationAngle, kG, kT, marketReaction, diff --git a/src/main/java/edu/ie3/datamodel/models/StandardUnits.java b/src/main/java/edu/ie3/datamodel/models/StandardUnits.java index 1e5f697fe..cc793e181 100644 --- a/src/main/java/edu/ie3/datamodel/models/StandardUnits.java +++ b/src/main/java/edu/ie3/datamodel/models/StandardUnits.java @@ -99,7 +99,7 @@ public class StandardUnits { /** Orientation of a pv panel with regard to the north-south line in degree_geom */ public static final Unit AZIMUTH = DEGREE_GEOM; /** Elevation of a pv panel with regard to the plane in degree_geom */ - public static final Unit SOLAR_HEIGHT = DEGREE_GEOM; + public static final Unit SOLAR_ELEVATION_ANGLE = DEGREE_GEOM; /** Direction of the wind in degree geom */ public static final Unit WIND_DIRECTION = DEGREE_GEOM; /** Velocity of the wind in metre per second */ diff --git a/src/main/java/edu/ie3/datamodel/models/input/system/PvInput.java b/src/main/java/edu/ie3/datamodel/models/input/system/PvInput.java index 9a4095c52..382e449ac 100644 --- a/src/main/java/edu/ie3/datamodel/models/input/system/PvInput.java +++ b/src/main/java/edu/ie3/datamodel/models/input/system/PvInput.java @@ -27,7 +27,7 @@ public class PvInput extends SystemParticipantInput { /** Efficiency of converter (typically in %) */ private final ComparableQuantity etaConv; /** Tilted inclination from horizontal (typically in °) */ - private final ComparableQuantity height; + private final ComparableQuantity elevationAngle; /** Generator correction factor merging different technical influences */ private final double kG; /** Temperature correction factor */ @@ -51,7 +51,7 @@ public class PvInput extends SystemParticipantInput { * @param albedo Albedo value (typically a value between 0 and 1) * @param azimuth Inclination in a compass direction (typically °: South 0◦; West 90◦; East -90◦) * @param etaConv Efficiency of converter (typically in %) - * @param height Tilted inclination from horizontal (typically in °) + * @param elevationAngle Tilted inclination from horizontal (typically in °) * @param kG Generator correction factor merging different technical influences * @param kT Generator correction factor merging different technical influences * @param marketReaction Is this asset market oriented? @@ -68,7 +68,7 @@ public PvInput( double albedo, ComparableQuantity azimuth, ComparableQuantity etaConv, - ComparableQuantity height, + ComparableQuantity elevationAngle, double kG, double kT, boolean marketReaction, @@ -78,7 +78,7 @@ public PvInput( this.albedo = albedo; this.azimuth = azimuth.to(StandardUnits.AZIMUTH); this.etaConv = etaConv.to(StandardUnits.EFFICIENCY); - this.height = height.to(StandardUnits.SOLAR_HEIGHT); + this.elevationAngle = elevationAngle.to(StandardUnits.SOLAR_ELEVATION_ANGLE); this.kG = kG; this.kT = kT; this.marketReaction = marketReaction; @@ -96,7 +96,7 @@ public PvInput( * @param albedo Albedo value (typically a value between 0 and 1) * @param azimuth Inclination in a compass direction (typically °: South 0◦; West 90◦; East -90◦) * @param etaConv Efficiency of converter (typically in %) - * @param height Tilted inclination from horizontal (typically in °) + * @param elevationAngle Tilted inclination from horizontal (typically in °) * @param kG Generator correction factor merging different technical influences * @param kT Generator correction factor merging different technical influences * @param marketReaction Is this asset market oriented? @@ -111,7 +111,7 @@ public PvInput( double albedo, ComparableQuantity azimuth, ComparableQuantity etaConv, - ComparableQuantity height, + ComparableQuantity elevationAngle, double kG, double kT, boolean marketReaction, @@ -121,7 +121,7 @@ public PvInput( this.albedo = albedo; this.azimuth = azimuth.to(StandardUnits.AZIMUTH); this.etaConv = etaConv.to(StandardUnits.EFFICIENCY); - this.height = height.to(StandardUnits.SOLAR_HEIGHT); + this.elevationAngle = elevationAngle.to(StandardUnits.SOLAR_ELEVATION_ANGLE); this.kG = kG; this.kT = kT; this.marketReaction = marketReaction; @@ -141,8 +141,8 @@ public ComparableQuantity getEtaConv() { return etaConv; } - public ComparableQuantity getHeight() { - return height; + public ComparableQuantity getElevationAngle() { + return elevationAngle; } public boolean isMarketReaction() { @@ -181,7 +181,7 @@ public boolean equals(Object o) { && Double.compare(pvInput.cosPhiRated, cosPhiRated) == 0 && azimuth.equals(pvInput.azimuth) && etaConv.equals(pvInput.etaConv) - && height.equals(pvInput.height) + && elevationAngle.equals(pvInput.elevationAngle) && sRated.equals(pvInput.sRated); } @@ -192,7 +192,7 @@ public int hashCode() { albedo, azimuth, etaConv, - height, + elevationAngle, kG, kT, marketReaction, @@ -222,8 +222,8 @@ public String toString() { + azimuth + ", etaConv=" + etaConv - + ", height=" - + height + + ", elevationAngle=" + + elevationAngle + ", kG=" + kG + ", kT=" @@ -250,7 +250,7 @@ public static class PvInputCopyBuilder private double albedo; private ComparableQuantity azimuth; private ComparableQuantity etaConv; - private ComparableQuantity height; + private ComparableQuantity elevationAngle; private double kG; private double kT; private boolean marketReaction; @@ -262,7 +262,7 @@ public PvInputCopyBuilder(PvInput entity) { this.albedo = entity.getAlbedo(); this.azimuth = entity.getAzimuth(); this.etaConv = entity.getEtaConv(); - this.height = entity.getHeight(); + this.elevationAngle = entity.getElevationAngle(); this.kG = entity.getkG(); this.kT = entity.getkT(); this.marketReaction = entity.isMarketReaction(); @@ -285,8 +285,8 @@ public PvInputCopyBuilder etaConv(ComparableQuantity etaConv) { return this; } - public PvInputCopyBuilder height(ComparableQuantity height) { - this.height = height; + public PvInputCopyBuilder elevationAngle(ComparableQuantity elevationAngle) { + this.elevationAngle = elevationAngle; return this; } @@ -327,7 +327,7 @@ public PvInput build() { albedo, azimuth, etaConv, - height, + elevationAngle, kG, kT, marketReaction, diff --git a/src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java b/src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java index 84638f7ac..b532b1af6 100644 --- a/src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java +++ b/src/main/java/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtils.java @@ -238,9 +238,9 @@ private static void checkLoad(LoadInput loadInput) { * Validates a PvInput if:
* - its rated apparent power is not negative
* - its albedo value of the plant's surrounding is between 0 and 1
- * - its inclination in a compass direction (azimuth) is is between -90° and 90°
- * - its efficiency of the asset's inverter (etaConv) is is between 0% and 100%
- * - its tilted inclination from horizontal (height) is is between 0° and 90°
+ * - its inclination in a compass direction (azimuth) is between -90° and 90°
+ * - its efficiency of the asset's inverter (etaConv) is between 0% and 100%
+ * - its tilted inclination from horizontal (elevation angle) is between 0° and 90°
* - its rated power factor is between 0 and 1 * * @param pvInput PvInput to validate @@ -250,7 +250,7 @@ private static void checkPv(PvInput pvInput) { checkAlbedo(pvInput); checkAzimuth(pvInput); isBetweenZeroAndHundredPercent(pvInput, pvInput.getEtaConv(), "Efficiency of the converter"); - checkHeight(pvInput); + checkElevationAngle(pvInput); checkRatedPowerFactor(pvInput, pvInput.getCosPhiRated()); } @@ -288,9 +288,11 @@ private static void checkAzimuth(PvInput pvInput) { * * @param pvInput PvInput to validate */ - private static void checkHeight(PvInput pvInput) { - if (pvInput.getHeight().isLessThan(Quantities.getQuantity(0d, SOLAR_HEIGHT)) - || pvInput.getHeight().isGreaterThan(Quantities.getQuantity(90d, SOLAR_HEIGHT))) + private static void checkElevationAngle(PvInput pvInput) { + if (pvInput.getElevationAngle().isLessThan(Quantities.getQuantity(0d, SOLAR_ELEVATION_ANGLE)) + || pvInput + .getElevationAngle() + .isGreaterThan(Quantities.getQuantity(90d, SOLAR_ELEVATION_ANGLE))) throw new InvalidEntityException( "Tilted inclination from horizontal of " + pvInput.getClass().getSimpleName() diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/PvInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/PvInputFactoryTest.groovy index f6457cde5..ce19b6fca 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/PvInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/PvInputFactoryTest.groovy @@ -42,7 +42,7 @@ class PvInputFactoryTest extends Specification implements FactoryTestHelper { "albedo" : "3", "azimuth" : "4", "etaconv" : "5", - "height" : "6", + "elevationangle" : "6", "kg" : "7", "kt" : "8", "marketreaction" : "true", @@ -78,7 +78,7 @@ class PvInputFactoryTest extends Specification implements FactoryTestHelper { assert albedo == Double.parseDouble(parameter["albedo"]) assert azimuth == getQuant(parameter["azimuth"], StandardUnits.AZIMUTH) assert etaConv == getQuant(parameter["etaconv"], StandardUnits.EFFICIENCY) - assert height == getQuant(parameter["height"], StandardUnits.SOLAR_HEIGHT) + assert elevationAngle == getQuant(parameter["elevationangle"], StandardUnits.SOLAR_ELEVATION_ANGLE) assert kG == Double.parseDouble(parameter["kg"]) assert kT == Double.parseDouble(parameter["kt"]) assert marketReaction diff --git a/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy index e439fe380..b1137ee35 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/processor/input/InputEntityProcessorTest.groovy @@ -173,7 +173,7 @@ class InputEntityProcessorTest extends Specification { "azimuth" : SystemParticipantTestData.pvInput.azimuth.to(StandardUnits.AZIMUTH).getValue().doubleValue().toString(), "cosPhiRated" : SystemParticipantTestData.pvInput.cosPhiRated.toString(), "etaConv" : SystemParticipantTestData.pvInput.etaConv.getValue().doubleValue().toString(), - "height" : SystemParticipantTestData.pvInput.height.getValue().doubleValue().toString(), + "elevationAngle" : SystemParticipantTestData.pvInput.elevationAngle.getValue().doubleValue().toString(), "id" : SystemParticipantTestData.pvInput.id, "kG" : SystemParticipantTestData.pvInput.kG.toString(), "kT" : SystemParticipantTestData.pvInput.kT.toString(), diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy index 79c279595..99f525c33 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvSystemParticipantSourceTest.groovy @@ -353,7 +353,7 @@ class CsvSystemParticipantSourceTest extends Specification implements CsvTestDat nodes | operators || resultingSize || resultingSet [sptd.pvInput.node]| [sptd.pvInput.operator]|| 1 || [sptd.pvInput] [sptd.pvInput.node]| []|| 1 || [ - new PvInput(sptd.pvInput.uuid, sptd.pvInput.id, OperatorInput.NO_OPERATOR_ASSIGNED, sptd.pvInput.operationTime, sptd.pvInput.node, sptd.pvInput.qCharacteristics, sptd.pvInput.albedo, sptd.pvInput.azimuth, sptd.pvInput.etaConv, sptd.pvInput.height, sptd.pvInput.kG, sptd.pvInput.kT, sptd.pvInput.marketReaction, sptd.pvInput.sRated, sptd.pvInput.cosPhiRated) + new PvInput(sptd.pvInput.uuid, sptd.pvInput.id, OperatorInput.NO_OPERATOR_ASSIGNED, sptd.pvInput.operationTime, sptd.pvInput.node, sptd.pvInput.qCharacteristics, sptd.pvInput.albedo, sptd.pvInput.azimuth, sptd.pvInput.etaConv, sptd.pvInput.elevationAngle, sptd.pvInput.kG, sptd.pvInput.kT, sptd.pvInput.marketReaction, sptd.pvInput.sRated, sptd.pvInput.cosPhiRated) ] []| [sptd.pvInput.operator]|| 0 || [] []| []|| 0 || [] diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/PvInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/PvInputTest.groovy index 2e66b87ae..5e9d8de0f 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/PvInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/PvInputTest.groovy @@ -21,7 +21,7 @@ class PvInputTest extends Specification { def pvInput = SystemParticipantTestData.pvInput when: - def alteredUnit = pvInput.copy().albedo(10).azimuth(Quantities.getQuantity(10, DEGREE_GEOM)).height(Quantities.getQuantity(50, DEGREE_GEOM)) + def alteredUnit = pvInput.copy().albedo(10).azimuth(Quantities.getQuantity(10, DEGREE_GEOM)).elevationAngle(Quantities.getQuantity(50, DEGREE_GEOM)) .etaConv(Quantities.getQuantity(50d, PERCENT)).kG(10).kT(5).marketReaction(true).sRated(Quantities.getQuantity(0d, KILOVOLTAMPERE)) .cosPhiRated(0.7d).build() then: @@ -37,7 +37,7 @@ class PvInputTest extends Specification { assert albedo == 10 assert azimuth == Quantities.getQuantity(10, DEGREE_GEOM) assert etaConv == Quantities.getQuantity(50, PERCENT) - assert height == Quantities.getQuantity(50, DEGREE_GEOM) + assert elevationAngle == Quantities.getQuantity(50, DEGREE_GEOM) assert kG == 10 assert kT == 5 } diff --git a/src/test/groovy/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtilsTest.groovy index b0eacd69f..bd51b1a6f 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/SystemParticipantValidationUtilsTest.groovy @@ -354,13 +354,13 @@ class SystemParticipantValidationUtilsTest extends Specification { ex.message == expectedException.message where: - invalidPV || expectedException - SystemParticipantTestData.pvInput.copy().sRated(Quantities.getQuantity(-25d, ACTIVE_POWER_IN)).build() || new InvalidEntityException("The following quantities have to be zero or positive: -25 kVA", invalidPV) - SystemParticipantTestData.pvInput.copy().albedo(2).build() || new InvalidEntityException("Albedo of the plant's surrounding of PvInput must be between 0 and 1", invalidPV) - SystemParticipantTestData.pvInput.copy().azimuth(Quantities.getQuantity(-100d, AZIMUTH)).build() || new InvalidEntityException("Azimuth angle of PvInput must be between -90° (east) and 90° (west)", invalidPV) - SystemParticipantTestData.pvInput.copy().etaConv(Quantities.getQuantity(110d, EFFICIENCY)).build() || new InvalidEntityException("Efficiency of the converter of PvInput must be between 0% and 100%", invalidPV) - SystemParticipantTestData.pvInput.copy().height(Quantities.getQuantity(100d, SOLAR_HEIGHT)).build() || new InvalidEntityException("Tilted inclination from horizontal of PvInput must be between 0° and 90°", invalidPV) - SystemParticipantTestData.pvInput.copy().cosPhiRated(2).build() || new InvalidEntityException("Rated power factor of PvInput must be between 0 and 1", invalidPV) + invalidPV || expectedException + SystemParticipantTestData.pvInput.copy().sRated(Quantities.getQuantity(-25d, ACTIVE_POWER_IN)).build() || new InvalidEntityException("The following quantities have to be zero or positive: -25 kVA", invalidPV) + SystemParticipantTestData.pvInput.copy().albedo(2).build() || new InvalidEntityException("Albedo of the plant's surrounding of PvInput must be between 0 and 1", invalidPV) + SystemParticipantTestData.pvInput.copy().azimuth(Quantities.getQuantity(-100d, AZIMUTH)).build() || new InvalidEntityException("Azimuth angle of PvInput must be between -90° (east) and 90° (west)", invalidPV) + SystemParticipantTestData.pvInput.copy().etaConv(Quantities.getQuantity(110d, EFFICIENCY)).build() || new InvalidEntityException("Efficiency of the converter of PvInput must be between 0% and 100%", invalidPV) + SystemParticipantTestData.pvInput.copy().elevationAngle(Quantities.getQuantity(100d, SOLAR_ELEVATION_ANGLE)).build() || new InvalidEntityException("Tilted inclination from horizontal of PvInput must be between 0° and 90°", invalidPV) + SystemParticipantTestData.pvInput.copy().cosPhiRated(2).build() || new InvalidEntityException("Rated power factor of PvInput must be between 0 and 1", invalidPV) } // Storage diff --git a/src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy b/src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy index c603a1cb9..d476b568d 100644 --- a/src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy +++ b/src/test/groovy/edu/ie3/test/common/SampleJointGrid.groovy @@ -75,7 +75,7 @@ class SampleJointGrid extends SystemParticipantTestData { SystemParticipantTestData.albedo, SystemParticipantTestData.azimuth, SystemParticipantTestData.etaConv, - SystemParticipantTestData.height, + SystemParticipantTestData.elevationAngle, SystemParticipantTestData.kG, SystemParticipantTestData.kT, false, diff --git a/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy b/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy index f604042fd..869c85647 100644 --- a/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy +++ b/src/test/groovy/edu/ie3/test/common/SystemParticipantTestData.groovy @@ -71,7 +71,7 @@ class SystemParticipantTestData { // PV private static final double albedo = 0.20000000298023224d private static final ComparableQuantity azimuth = Quantities.getQuantity(-8.926613807678223d, AZIMUTH) - private static final ComparableQuantity height = Quantities.getQuantity(41.01871871948242d, SOLAR_HEIGHT) + private static final ComparableQuantity elevationAngle = Quantities.getQuantity(41.01871871948242d, SOLAR_ELEVATION_ANGLE) private static double kT = 1d private static double kG = 0.8999999761581421d public static final PvInput pvInput = new PvInput( @@ -84,7 +84,7 @@ class SystemParticipantTestData { albedo, azimuth, etaConv, - height, + elevationAngle, kG, kT, false, diff --git a/src/test/resources/testGridFiles/participants/pv_input.csv b/src/test/resources/testGridFiles/participants/pv_input.csv index 51f1a8d20..70b1881a7 100644 --- a/src/test/resources/testGridFiles/participants/pv_input.csv +++ b/src/test/resources/testGridFiles/participants/pv_input.csv @@ -1,2 +1,2 @@ -uuid,albedo,azimuth,cosphi_rated,eta_conv,height,id,k_g,k_t,market_reaction,node,operates_from,operates_until,operator,q_characteristics,s_rated +uuid,albedo,azimuth,cosphi_rated,eta_conv,elevation_angle,id,k_g,k_t,market_reaction,node,operates_from,operates_until,operator,q_characteristics,s_rated d56f15b7-8293-4b98-b5bd-58f6273ce229,0.20000000298023224,-8.926613807678223,0.95,98.0,41.01871871948242,test_pvInput,0.8999999761581421,1.0,false,4ca90220-74c2-4369-9afa-a18bf068840d,2020-03-24T15:11:31Z[UTC],2020-03-25T15:11:31Z[UTC],8f9682df-0744-4b58-a122-f0dc730f6510,"cosPhiFixed:{(0.00,0.95)}",25.0