diff --git a/pom.xml b/pom.xml index 0bf868886f..25b95a9368 100644 --- a/pom.xml +++ b/pom.xml @@ -92,6 +92,7 @@ org.apache.maven.plugins maven-surefire-plugin + -Duser.language=en -Duser.region=US com.powsybl:powsybl-config-classic diff --git a/src/main/java/com/powsybl/openloadflow/ac/outerloop/ReactiveLimitsOuterLoop.java b/src/main/java/com/powsybl/openloadflow/ac/outerloop/ReactiveLimitsOuterLoop.java index 07fb06c47d..f068c0d82d 100644 --- a/src/main/java/com/powsybl/openloadflow/ac/outerloop/ReactiveLimitsOuterLoop.java +++ b/src/main/java/com/powsybl/openloadflow/ac/outerloop/ReactiveLimitsOuterLoop.java @@ -187,7 +187,7 @@ private static boolean switchPqPv(List pqToPvBuses, ContextData conte int pvPqSwitchCount = contextData.getPvPqSwitchCount(controllerBus.getId()); if (pvPqSwitchCount >= maxPqPvSwitch) { - pqPvNodes.add(Reports.reportPvPqSwitchLimit(reportNode, controllerBus, pvPqSwitchCount, log, LOGGER)); + pqPvNodes.add(Reports.createRootReportPvPqSwitchLimit(reportNode, controllerBus, pvPqSwitchCount, log, LOGGER)); } else { controllerBus.setGeneratorVoltageControlEnabled(true); controllerBus.setGenerationTargetQ(0); @@ -195,7 +195,7 @@ private static boolean switchPqPv(List pqToPvBuses, ContextData conte pqPvSwitchCount++; if (pqToPvBus.limitType.isMaxLimit()) { - pqPvNodes.add(Reports.reportPqToPvBusMaxLimit( + pqPvNodes.add(Reports.createRootReportPqToPvBusMaxLimit( reportNode, controllerBus, controllerBus.getGeneratorVoltageControl().map(VoltageControl::getControlledBus).orElseThrow(), @@ -203,7 +203,7 @@ private static boolean switchPqPv(List pqToPvBuses, ContextData conte log, LOGGER)); } else { - pqPvNodes.add(Reports.reportPqToPvBusMinLimit( + pqPvNodes.add(Reports.createRootReportPqToPvBusMinLimit( reportNode, controllerBus, controllerBus.getGeneratorVoltageControl().map(VoltageControl::getControlledBus).orElseThrow(), @@ -345,10 +345,10 @@ private boolean switchReactiveControllerBusPq(List reactiv switch (bus.limitType) { case MAX_Q: - switchedNodes.add(Reports.reportReactiveControllerBusesToPqMaxQ(reportNode, controllerBus, bus.q, bus.qLimit, log, LOGGER)); + switchedNodes.add(Reports.createRootReportReactiveControllerBusesToPqMaxQ(reportNode, controllerBus, bus.q, bus.qLimit, log, LOGGER)); break; case MIN_Q: - switchedNodes.add(Reports.reportReactiveControllerBusesToPqMinQ(reportNode, controllerBus, bus.q, bus.qLimit, log, LOGGER)); + switchedNodes.add(Reports.createRootReportReactiveControllerBusesToPqMinQ(reportNode, controllerBus, bus.q, bus.qLimit, log, LOGGER)); break; case MIN_REALISTIC_V, MAX_REALISTIC_V: // Note: never happens for now. Robust mode applies only to remote voltage control generators diff --git a/src/main/java/com/powsybl/openloadflow/sa/AbstractSecurityAnalysis.java b/src/main/java/com/powsybl/openloadflow/sa/AbstractSecurityAnalysis.java index dc0855bccd..ce65d41f80 100644 --- a/src/main/java/com/powsybl/openloadflow/sa/AbstractSecurityAnalysis.java +++ b/src/main/java/com/powsybl/openloadflow/sa/AbstractSecurityAnalysis.java @@ -220,7 +220,7 @@ SecurityAnalysisReport runSync(SecurityAnalysisParameters securityAnalysisParame parameters = createParameters(lfParameters, lfParametersExt, partitionTopoConfig.isBreaker(), isAreaInterchangeControl(lfParametersExt, contingencies)); - ReportNode threadRootNode = partitionNum == 0 ? saReportNode : Reports.createThreadRootReport(saReportNode); + ReportNode threadRootNode = partitionNum == 0 ? saReportNode : Reports.createRootThreadReport(saReportNode); reportNodes.set(partitionNum, threadRootNode); // create networks including all necessary switches diff --git a/src/main/java/com/powsybl/openloadflow/util/Reports.java b/src/main/java/com/powsybl/openloadflow/util/Reports.java index f895773c9d..9dd450fd3b 100644 --- a/src/main/java/com/powsybl/openloadflow/util/Reports.java +++ b/src/main/java/com/powsybl/openloadflow/util/Reports.java @@ -309,7 +309,7 @@ public static ReportNode reportPqToPvBuses(ReportNode reportNode, int pqToPvBusC .add(); } - public static ReportNode reportPvPqSwitchLimit(ReportNode firstRootReportNode, LfBus controllerBus, int limit, boolean log, Logger logger) { + public static ReportNode createRootReportPvPqSwitchLimit(ReportNode firstRootReportNode, LfBus controllerBus, int limit, boolean log, Logger logger) { ReportNode result = ReportNode.newRootReportNode() .withLocale(firstRootReportNode.getTreeContext().getLocale()) .withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME) @@ -324,7 +324,7 @@ public static ReportNode reportPvPqSwitchLimit(ReportNode firstRootReportNode, L return result; } - public static ReportNode reportPqToPvBusMaxLimit(ReportNode firstRootReportNode, LfBus controllerBus, LfBus controlledBus, double targetV, boolean log, Logger logger) { + public static ReportNode createRootReportPqToPvBusMaxLimit(ReportNode firstRootReportNode, LfBus controllerBus, LfBus controlledBus, double targetV, boolean log, Logger logger) { ReportNode result = ReportNode.newRootReportNode() .withLocale(firstRootReportNode.getTreeContext().getLocale()) .withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME) @@ -342,7 +342,7 @@ public static ReportNode reportPqToPvBusMaxLimit(ReportNode firstRootReportNode, return result; } - public static ReportNode reportPqToPvBusMinLimit(ReportNode firstRootReportNode, LfBus controllerBus, LfBus controlledBus, double targetV, boolean log, Logger logger) { + public static ReportNode createRootReportPqToPvBusMinLimit(ReportNode firstRootReportNode, LfBus controllerBus, LfBus controlledBus, double targetV, boolean log, Logger logger) { ReportNode result = ReportNode.newRootReportNode() .withLocale(firstRootReportNode.getTreeContext().getLocale()) .withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME) @@ -384,12 +384,12 @@ public static ReportNode reportReactiveControllerBusesToPqBuses(ReportNode repor .add(); } - public static ReportNode reportReactiveControllerBusesToPqMaxQ(ReportNode firstRootReportNode, - LfBus controllerBus, - double busQ, - double maxQ, - boolean log, - Logger logger) { + public static ReportNode createRootReportReactiveControllerBusesToPqMaxQ(ReportNode firstRootReportNode, + LfBus controllerBus, + double busQ, + double maxQ, + boolean log, + Logger logger) { ReportNode result = ReportNode.newRootReportNode() .withLocale(firstRootReportNode.getTreeContext().getLocale()) .withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME) @@ -405,12 +405,12 @@ public static ReportNode reportReactiveControllerBusesToPqMaxQ(ReportNode firstR return result; } - public static ReportNode reportReactiveControllerBusesToPqMinQ(ReportNode firstRootReportNode, - LfBus controllerBus, - double busQ, - double minQ, - boolean log, - Logger logger) { + public static ReportNode createRootReportReactiveControllerBusesToPqMinQ(ReportNode firstRootReportNode, + LfBus controllerBus, + double busQ, + double minQ, + boolean log, + Logger logger) { ReportNode result = ReportNode.newRootReportNode() .withLocale(firstRootReportNode.getTreeContext().getLocale()) .withResourceBundles(PowsyblOpenLoadFlowReportResourceBundle.BASE_NAME) @@ -895,7 +895,7 @@ public static void reportActionApplicationFailure(String actionId, String contin .add(); } - public static ReportNode createThreadRootReport(ReportNode firstRootReport) { + public static ReportNode createRootThreadReport(ReportNode firstRootReport) { return ReportNode.newRootReportNode() .withLocale(firstRootReport.getTreeContext().getLocale()) .withAllResourceBundlesFromClasspath() diff --git a/src/test/java/com/powsybl/openloadflow/ac/DistributedSlackOnGenerationTest.java b/src/test/java/com/powsybl/openloadflow/ac/DistributedSlackOnGenerationTest.java index cdc4f7da7a..99cbcfd78e 100644 --- a/src/test/java/com/powsybl/openloadflow/ac/DistributedSlackOnGenerationTest.java +++ b/src/test/java/com/powsybl/openloadflow/ac/DistributedSlackOnGenerationTest.java @@ -35,10 +35,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import java.util.EnumSet; -import java.util.List; -import java.util.OptionalDouble; -import java.util.Set; +import java.util.*; import java.util.concurrent.CompletionException; import static com.powsybl.openloadflow.util.LoadFlowAssert.*; diff --git a/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisWithActionsTest.java b/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisWithActionsTest.java index c703786216..9ed28ff74d 100644 --- a/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisWithActionsTest.java +++ b/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisWithActionsTest.java @@ -43,10 +43,7 @@ import java.io.ByteArrayInputStream; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; +import java.util.*; import java.util.concurrent.CompletionException; import java.util.stream.Stream; diff --git a/src/test/resources/i18n/reports_en.properties b/src/test/resources/i18n/reports_en.properties deleted file mode 100644 index 8b13789179..0000000000 --- a/src/test/resources/i18n/reports_en.properties +++ /dev/null @@ -1 +0,0 @@ -