From e4dd373936b6379ce9f4dfba4b92b453ac1ca90b Mon Sep 17 00:00:00 2001 From: Franck LECUYER Date: Mon, 12 Aug 2024 14:41:13 +0200 Subject: [PATCH 1/2] Fix message key in reports for voltage levels missing limits Signed-off-by: Franck LECUYER --- .../openreac/parameters/input/OpenReacParameters.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java index 62d3352a..c40c84d7 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java +++ b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java @@ -594,14 +594,17 @@ private void checkLowAndHighVoltageLimitIntegrity(Network network, boolean integ .withUntypedValue("size", voltageLevelsWithMissingLimits.size()) .add(); voltageLevelsWithMissingLimits.forEach((key, value) -> { + String messageKey = "voltageLevelWithBothMissingLimits"; String messageSuffix = "has undefined low and high voltage limits"; if (value.getLeft() == 0) { + messageKey = "voltageLevelWithHighMissingLimits"; messageSuffix = "has undefined high voltage limit"; } else if (value.getRight() == 0) { + messageKey = "voltageLevelWithLowMissingLimits"; messageSuffix = "has undefined low voltage limit"; } reportNode.newReportNode() - .withMessageTemplate("voltageLevelWithMissingLimits", "${vlId} " + messageSuffix) + .withMessageTemplate(messageKey, "${vlId} " + messageSuffix) .withSeverity(TypedValue.TRACE_SEVERITY) .withUntypedValue("vlId", key) .add(); From ebcee64e4ee676a996142f9cde9e37c7df7ff52a Mon Sep 17 00:00:00 2001 From: Franck LECUYER Date: Mon, 26 Aug 2024 11:30:59 +0200 Subject: [PATCH 2/2] Change typo for message keys Signed-off-by: Franck LECUYER --- .../openreac/parameters/input/OpenReacParameters.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java index c40c84d7..f78f8155 100644 --- a/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java +++ b/open-reac/src/main/java/com/powsybl/openreac/parameters/input/OpenReacParameters.java @@ -594,13 +594,13 @@ private void checkLowAndHighVoltageLimitIntegrity(Network network, boolean integ .withUntypedValue("size", voltageLevelsWithMissingLimits.size()) .add(); voltageLevelsWithMissingLimits.forEach((key, value) -> { - String messageKey = "voltageLevelWithBothMissingLimits"; + String messageKey = "voltageLevelWithBothLimitsMissing"; String messageSuffix = "has undefined low and high voltage limits"; if (value.getLeft() == 0) { - messageKey = "voltageLevelWithHighMissingLimits"; + messageKey = "voltageLevelWithUpperLimitMissing"; messageSuffix = "has undefined high voltage limit"; } else if (value.getRight() == 0) { - messageKey = "voltageLevelWithLowMissingLimits"; + messageKey = "voltageLevelWithLowerLimitMissing"; messageSuffix = "has undefined low voltage limit"; } reportNode.newReportNode()