diff --git a/commons/pom.xml b/commons/pom.xml
index 7dc3d4355..1a5967564 100644
--- a/commons/pom.xml
+++ b/commons/pom.xml
@@ -13,7 +13,7 @@
powsybl-dynawo
com.powsybl
- 2.4.0-SNAPSHOT
+ 2.5.0-SNAPSHOT
powsybl-dynawo-commons
diff --git a/commons/src/main/java/com/powsybl/dynawo/commons/CommonReports.java b/commons/src/main/java/com/powsybl/dynawo/commons/CommonReports.java
index a5ede19af..9a24fff4f 100644
--- a/commons/src/main/java/com/powsybl/dynawo/commons/CommonReports.java
+++ b/commons/src/main/java/com/powsybl/dynawo/commons/CommonReports.java
@@ -7,9 +7,8 @@
*/
package com.powsybl.dynawo.commons;
-import com.powsybl.commons.reporter.Report;
-import com.powsybl.commons.reporter.Reporter;
-import com.powsybl.commons.reporter.TypedValue;
+import com.powsybl.commons.report.ReportNode;
+import com.powsybl.commons.report.TypedValue;
import com.powsybl.dynawo.commons.dynawologs.LogEntry;
import com.powsybl.dynawo.commons.timeline.TimelineEntry;
@@ -24,28 +23,27 @@ public final class CommonReports {
private CommonReports() {
}
- public static Reporter createDynawoLogReporter(Reporter reporter) {
- return reporter.createSubReporter("dynawoLog",
- "Dynawo Log");
+ public static ReportNode createDynawoLogReportNode(ReportNode reportNode) {
+ return reportNode.newReportNode()
+ .withMessageTemplate("dynawoLog", "Dynawo Log")
+ .add();
}
- public static void reportTimelineEvent(Reporter reporter, TimelineEntry timelineEntry) {
- reporter.report(Report.builder()
- .withKey("DynawoTimelineEvent")
- .withDefaultMessage("[t=${time}] ${message} on equipment '${identifiableId}'")
+ public static void reportTimelineEntry(ReportNode reportNode, TimelineEntry timelineEntry) {
+ reportNode.newReportNode()
+ .withMessageTemplate("dynawoTimelineEntry", "[t=${time}] ${message} on equipment '${identifiableId}'")
.withTypedValue("time", timelineEntry.time(), TIME_MS)
.withTypedValue("identifiableId", timelineEntry.modelName(), ID)
- .withValue("message", timelineEntry.message())
+ .withUntypedValue("message", timelineEntry.message())
.withSeverity(TypedValue.TRACE_SEVERITY)
- .build());
+ .add();
}
- public static void reportLogEvent(Reporter reporter, LogEntry logEntry) {
- reporter.report(Report.builder()
- .withKey("DynawoTimelineEvent")
- .withDefaultMessage("${message}")
- .withValue("message", logEntry.message())
+ public static void reportLogEntry(ReportNode reportNode, LogEntry logEntry) {
+ reportNode.newReportNode()
+ .withMessageTemplate("dynawoLogEntry", "${message}")
+ .withUntypedValue("message", logEntry.message())
.withSeverity(logEntry.severity())
- .build());
+ .add();
}
}
diff --git a/commons/src/main/java/com/powsybl/dynawo/commons/dynawologs/LogEntry.java b/commons/src/main/java/com/powsybl/dynawo/commons/dynawologs/LogEntry.java
index 928221c4f..cef225643 100644
--- a/commons/src/main/java/com/powsybl/dynawo/commons/dynawologs/LogEntry.java
+++ b/commons/src/main/java/com/powsybl/dynawo/commons/dynawologs/LogEntry.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawo.commons.dynawologs;
-import com.powsybl.commons.reporter.TypedValue;
+import com.powsybl.commons.report.TypedValue;
/**
* @author Laurent Issertial {@literal }
diff --git a/commons/src/main/java/com/powsybl/dynawo/commons/dynawologs/LogUtils.java b/commons/src/main/java/com/powsybl/dynawo/commons/dynawologs/LogUtils.java
index 760c431de..cefcccdf9 100644
--- a/commons/src/main/java/com/powsybl/dynawo/commons/dynawologs/LogUtils.java
+++ b/commons/src/main/java/com/powsybl/dynawo/commons/dynawologs/LogUtils.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawo.commons.dynawologs;
-import com.powsybl.commons.reporter.TypedValue;
+import com.powsybl.commons.report.TypedValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/commons/src/test/java/com/powsybl/dynawo/commons/AbstractDynawoCommonsTest.java b/commons/src/test/java/com/powsybl/dynawo/commons/AbstractDynawoCommonsTest.java
index d284f684d..832792558 100644
--- a/commons/src/test/java/com/powsybl/dynawo/commons/AbstractDynawoCommonsTest.java
+++ b/commons/src/test/java/com/powsybl/dynawo/commons/AbstractDynawoCommonsTest.java
@@ -17,7 +17,7 @@
import java.nio.file.Path;
import java.util.Objects;
-import static com.powsybl.commons.test.ComparisonUtils.compareXml;
+import static com.powsybl.commons.test.ComparisonUtils.assertXmlEquals;
/**
* @author Florian Dupuy {@literal }
@@ -26,11 +26,11 @@ abstract class AbstractDynawoCommonsTest extends AbstractSerDeTest {
protected void compare(String expectedIidmResource, Network actual) throws IOException {
InputStream expected = Objects.requireNonNull(getClass().getResourceAsStream(expectedIidmResource));
- compareXml(expected, getInputStream(actual, tmpDir.resolve("actual.xiidm")));
+ assertXmlEquals(expected, getInputStream(actual, tmpDir.resolve("actual.xiidm")));
}
protected void compare(Network expected, Network actual) throws IOException {
- compareXml(getInputStream(expected, tmpDir.resolve("expected.xiidm")),
+ assertXmlEquals(getInputStream(expected, tmpDir.resolve("expected.xiidm")),
getInputStream(actual, tmpDir.resolve("actual.xiidm")));
}
diff --git a/commons/src/test/java/com/powsybl/dynawo/commons/dynawologs/CsvLogParserTest.java b/commons/src/test/java/com/powsybl/dynawo/commons/dynawologs/CsvLogParserTest.java
index f9fc16b28..417198618 100644
--- a/commons/src/test/java/com/powsybl/dynawo/commons/dynawologs/CsvLogParserTest.java
+++ b/commons/src/test/java/com/powsybl/dynawo/commons/dynawologs/CsvLogParserTest.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawo.commons.dynawologs;
-import com.powsybl.commons.reporter.TypedValue;
+import com.powsybl.commons.report.TypedValue;
import org.junit.jupiter.api.Test;
import java.net.URISyntaxException;
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 22006f6c1..92a7318e4 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -16,7 +16,7 @@
powsybl-dynawo
com.powsybl
- 2.4.0-SNAPSHOT
+ 2.5.0-SNAPSHOT
pom
@@ -41,6 +41,10 @@
${project.groupId}
powsybl-dynawaltz-dsl
+
+ ${project.groupId}
+ powsybl-dynawo-dynamic-security-analysis
+
${project.groupId}
powsybl-dynawo-integration-tests
diff --git a/dynaflow/pom.xml b/dynaflow/pom.xml
index cb280a4ec..8bf8cbf88 100644
--- a/dynaflow/pom.xml
+++ b/dynaflow/pom.xml
@@ -13,7 +13,7 @@
powsybl-dynawo
com.powsybl
- 2.4.0-SNAPSHOT
+ 2.5.0-SNAPSHOT
powsybl-dynaflow
diff --git a/dynaflow/src/main/java/com/powsybl/dynaflow/ContingencyResultsUtils.java b/dynaflow/src/main/java/com/powsybl/dynaflow/ContingencyResultsUtils.java
index 0277ca5a8..cf8addb4f 100644
--- a/dynaflow/src/main/java/com/powsybl/dynaflow/ContingencyResultsUtils.java
+++ b/dynaflow/src/main/java/com/powsybl/dynaflow/ContingencyResultsUtils.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynaflow;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.contingency.Contingency;
import com.powsybl.dynaflow.xml.ConstraintsReader;
import com.powsybl.dynawo.commons.CommonReports;
@@ -67,10 +67,10 @@ private static PostContingencyResult getPostContingencyResult(Network network, L
}
// Report the timeline events from the timeline files written by dynawo
- public static void reportContingenciesTimelines(List contingencies, Path timelineDir, Reporter reporter) {
+ public static void reportContingenciesTimelines(List contingencies, Path timelineDir, ReportNode reportNode) {
contingencies.forEach(c -> {
- Reporter contingencyReporter = Reports.createContingenciesTimelineReporter(reporter, c.getId());
- getTimeline(timelineDir, c).forEach(e -> CommonReports.reportTimelineEvent(contingencyReporter, e));
+ ReportNode contingencyReporter = Reports.createContingenciesTimelineReporter(reportNode, c.getId());
+ getTimeline(timelineDir, c).forEach(e -> CommonReports.reportTimelineEntry(contingencyReporter, e));
});
}
diff --git a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowHandler.java b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowHandler.java
index 63503ce1d..a263bf2fb 100644
--- a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowHandler.java
+++ b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowHandler.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynaflow;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.computation.AbstractExecutionHandler;
import com.powsybl.computation.Command;
import com.powsybl.computation.CommandExecution;
@@ -29,7 +29,10 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import static com.powsybl.dynaflow.DynaFlowConstants.*;
import static com.powsybl.dynawo.commons.DynawoConstants.DYNAWO_TIMELINE_FOLDER;
@@ -45,16 +48,16 @@ public class DynaFlowHandler extends AbstractExecutionHandler {
private final DynaFlowParameters dynaFlowParameters;
private final LoadFlowParameters loadFlowParameters;
private final Command command;
- private final Reporter reporter;
+ private final ReportNode reportNode;
- public DynaFlowHandler(Network network, String workingStateId, DynaFlowParameters dynaFlowParameters, LoadFlowParameters loadFlowParameters, Command command, Reporter reporter) {
+ public DynaFlowHandler(Network network, String workingStateId, DynaFlowParameters dynaFlowParameters, LoadFlowParameters loadFlowParameters, Command command, ReportNode reportNode) {
this.network = network;
this.workingStateId = workingStateId;
this.dynaFlowParameters = dynaFlowParameters;
this.loadFlowParameters = loadFlowParameters;
this.command = command;
this.dynawoInput = this.dynaFlowParameters.isMergeLoads() ? LoadsMerger.mergeLoads(this.network) : this.network;
- this.reporter = reporter;
+ this.reportNode = reportNode;
}
@Override
@@ -95,11 +98,11 @@ public LoadFlowResult after(Path workingDir, ExecutionReport report) {
}
private void reportTimeLine(Path workingDir) {
- Reporter dfReporter = Reports.createDynaFlowReporter(reporter, network.getId());
+ ReportNode dfReporter = Reports.createDynaFlowReportNode(reportNode, network.getId());
Path timelineFile = workingDir.resolve(DYNAFLOW_OUTPUTS_FOLDER)
.resolve(DYNAWO_TIMELINE_FOLDER)
.resolve(DYNAFLOW_TIMELINE_FILE);
List tl = new XmlTimeLineParser().parse(timelineFile);
- tl.forEach(e -> CommonReports.reportTimelineEvent(dfReporter, e));
+ tl.forEach(e -> CommonReports.reportTimelineEntry(dfReporter, e));
}
}
diff --git a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowProvider.java b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowProvider.java
index 033dfaa80..1b9ff072f 100644
--- a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowProvider.java
+++ b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowProvider.java
@@ -13,7 +13,7 @@
import com.powsybl.commons.extensions.Extension;
import com.powsybl.commons.extensions.ExtensionJsonSerializer;
import com.powsybl.commons.parameters.Parameter;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.computation.*;
import com.powsybl.dynaflow.json.JsonDynaFlowParametersSerializer;
import com.powsybl.dynawo.commons.DynawoUtil;
@@ -94,7 +94,7 @@ public String getVersion() {
@Override
public CompletableFuture run(Network network, ComputationManager computationManager, String workingStateId,
- LoadFlowParameters loadFlowParameters, Reporter reporter) {
+ LoadFlowParameters loadFlowParameters, ReportNode reportNode) {
Objects.requireNonNull(network);
Objects.requireNonNull(computationManager);
Objects.requireNonNull(workingStateId);
@@ -105,7 +105,7 @@ public CompletableFuture run(Network network, ComputationManager
ExecutionEnvironment execEnv = new ExecutionEnvironment(config.createEnv(), WORKING_DIR_PREFIX, config.isDebug());
Command versionCmd = getVersionCommand(config);
DynawoUtil.requireDynaMinVersion(execEnv, computationManager, versionCmd, DynaFlowConfig.DYNAFLOW_LAUNCHER_PROGRAM_NAME, true);
- return computationManager.execute(execEnv, new DynaFlowHandler(network, workingStateId, dynaFlowParameters, loadFlowParameters, getCommand(config), reporter));
+ return computationManager.execute(execEnv, new DynaFlowHandler(network, workingStateId, dynaFlowParameters, loadFlowParameters, getCommand(config), reportNode));
}
@Override
diff --git a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisHandler.java b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisHandler.java
index 2e8b7f055..314c2ed94 100644
--- a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisHandler.java
+++ b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisHandler.java
@@ -10,7 +10,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.powsybl.commons.json.JsonUtil;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.computation.AbstractExecutionHandler;
import com.powsybl.computation.Command;
import com.powsybl.computation.CommandExecution;
@@ -54,12 +54,12 @@ public final class DynaFlowSecurityAnalysisHandler extends AbstractExecutionHand
private final List contingencies;
private final LimitViolationFilter violationFilter;
private final List interceptors;
- private final Reporter reporter;
+ private final ReportNode reportNode;
public DynaFlowSecurityAnalysisHandler(Network network, String workingVariantId, Command command,
SecurityAnalysisParameters securityAnalysisParameters, List contingencies,
LimitViolationFilter violationFilter, List interceptors,
- Reporter reporter) {
+ ReportNode reportNode) {
this.network = network;
this.workingVariantId = workingVariantId;
this.command = command;
@@ -67,7 +67,7 @@ public DynaFlowSecurityAnalysisHandler(Network network, String workingVariantId,
this.contingencies = contingencies;
this.violationFilter = violationFilter;
this.interceptors = interceptors;
- this.reporter = reporter;
+ this.reportNode = reportNode;
}
@Override
@@ -84,7 +84,7 @@ public List before(Path workingDir) throws IOException {
public SecurityAnalysisReport after(Path workingDir, ExecutionReport report) throws IOException {
super.after(workingDir, report);
network.getVariantManager().setWorkingVariant(workingVariantId);
- ContingencyResultsUtils.reportContingenciesTimelines(contingencies, workingDir.resolve(DYNAWO_TIMELINE_FOLDER), reporter);
+ ContingencyResultsUtils.reportContingenciesTimelines(contingencies, workingDir.resolve(DYNAWO_TIMELINE_FOLDER), reportNode);
return new SecurityAnalysisReport(
new SecurityAnalysisResult(
ContingencyResultsUtils.getPreContingencyResult(network, violationFilter),
diff --git a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisProvider.java b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisProvider.java
index 8dcbb6221..43d6b80b9 100644
--- a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisProvider.java
+++ b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisProvider.java
@@ -7,16 +7,20 @@
package com.powsybl.dynaflow;
import com.google.auto.service.AutoService;
-import com.powsybl.commons.reporter.Reporter;
-import com.powsybl.computation.*;
+import com.powsybl.action.Action;
+import com.powsybl.commons.report.ReportNode;
+import com.powsybl.computation.Command;
+import com.powsybl.computation.ComputationManager;
+import com.powsybl.computation.ExecutionEnvironment;
+import com.powsybl.computation.SimpleCommandBuilder;
import com.powsybl.contingency.ContingenciesProvider;
import com.powsybl.contingency.Contingency;
import com.powsybl.dynawo.commons.DynawoUtil;
import com.powsybl.dynawo.commons.PowsyblDynawoVersion;
import com.powsybl.iidm.network.Network;
import com.powsybl.security.*;
-import com.powsybl.security.action.Action;
import com.powsybl.security.interceptors.SecurityAnalysisInterceptor;
+import com.powsybl.security.limitreduction.LimitReduction;
import com.powsybl.security.monitor.StateMonitor;
import com.powsybl.security.strategy.OperatorStrategy;
import org.slf4j.Logger;
@@ -62,7 +66,8 @@ public CompletableFuture run(Network network,
List operatorStrategies,
List actions,
List monitors,
- Reporter reporter) {
+ List limitReductions,
+ ReportNode reportNode) {
if (detector != null) {
LOG.error("LimitViolationDetector is not used in Dynaflow implementation.");
}
@@ -75,6 +80,9 @@ public CompletableFuture run(Network network,
if (actions != null && !actions.isEmpty()) {
LOG.error("Actions are not implemented in Dynaflow");
}
+ if (limitReductions != null && !limitReductions.isEmpty()) {
+ LOG.error("Limit reductions are not implemented in Dynaflow");
+ }
Objects.requireNonNull(computationManager);
Objects.requireNonNull(network);
@@ -88,9 +96,10 @@ public CompletableFuture run(Network network,
ExecutionEnvironment execEnv = new ExecutionEnvironment(config.createEnv(), WORKING_DIR_PREFIX, config.isDebug());
DynawoUtil.requireDynaMinVersion(execEnv, computationManager, getVersionCommand(config), DynaFlowConfig.DYNAFLOW_LAUNCHER_PROGRAM_NAME, true);
List contingencies = contingenciesProvider.getContingencies(network);
- Reporter dfsaReporter = Reports.createDynaFlowSecurityAnalysisReporter(reporter, network.getId());
+ ReportNode dfsaReportNode = Reports.createDynaFlowSecurityAnalysisReportNode(reportNode, network.getId());
- return computationManager.execute(execEnv, new DynaFlowSecurityAnalysisHandler(network, workingVariantId, getCommand(config), parameters, contingencies, filter, interceptors, dfsaReporter));
+ DynaFlowSecurityAnalysisHandler executionHandler = new DynaFlowSecurityAnalysisHandler(network, workingVariantId, getCommand(config), parameters, contingencies, filter, interceptors, dfsaReportNode);
+ return computationManager.execute(execEnv, executionHandler);
}
@Override
diff --git a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaflowReports.java b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaflowReports.java
new file mode 100644
index 000000000..9223cbc4f
--- /dev/null
+++ b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaflowReports.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2023, RTE (http://www.rte-france.com)
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ * SPDX-License-Identifier: MPL-2.0
+ */
+package com.powsybl.dynaflow;
+
+import com.powsybl.commons.report.ReportNode;
+
+/**
+ * @author Florian Dupuy {@literal }
+ */
+public final class DynaflowReports {
+
+ private DynaflowReports() {
+ }
+
+ public static ReportNode createDynaFlowReportNode(ReportNode reportNode, String networkId) {
+ return reportNode.newReportNode()
+ .withMessageTemplate("dynaflow", "Dynaflow loadflow on network '${networkId}'")
+ .withUntypedValue("networkId", networkId)
+ .add();
+ }
+
+ public static ReportNode createDynaFlowSecurityAnalysisReportNode(ReportNode reportNode, String networkId) {
+ return reportNode.newReportNode()
+ .withMessageTemplate("dynaflowSa", "Dynaflow security analysis on network '${networkId}'")
+ .withUntypedValue("networkId", networkId)
+ .add();
+ }
+
+ public static ReportNode createDynaFlowTimelineReportNode(ReportNode reportNode, String contingencyId) {
+ return reportNode.newReportNode()
+ .withMessageTemplate("dynaflowSaContingency", "Contingency '${contingencyId}'")
+ .withUntypedValue("contingencyId", contingencyId)
+ .add();
+ }
+}
diff --git a/dynaflow/src/main/java/com/powsybl/dynaflow/Reports.java b/dynaflow/src/main/java/com/powsybl/dynaflow/Reports.java
index e666a5afb..66085bbde 100644
--- a/dynaflow/src/main/java/com/powsybl/dynaflow/Reports.java
+++ b/dynaflow/src/main/java/com/powsybl/dynaflow/Reports.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynaflow;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
/**
* @author Florian Dupuy {@literal }
@@ -17,21 +17,24 @@ public final class Reports {
private Reports() {
}
- public static Reporter createDynaFlowReporter(Reporter reporter, String networkId) {
- return reporter.createSubReporter("dynaflow",
- "Dynaflow loadflow on network '${networkId}'",
- "networkId", networkId);
+ public static ReportNode createDynaFlowReportNode(ReportNode reportNode, String networkId) {
+ return reportNode.newReportNode()
+ .withMessageTemplate("dynaflow", "Dynaflow loadflow on network '${networkId}'")
+ .withUntypedValue("networkId", networkId)
+ .add();
}
- public static Reporter createDynaFlowSecurityAnalysisReporter(Reporter reporter, String networkId) {
- return reporter.createSubReporter("dynaflowSa",
- "Dynaflow security analysis on network '${networkId}'",
- "networkId", networkId);
+ public static ReportNode createDynaFlowSecurityAnalysisReportNode(ReportNode reportNode, String networkId) {
+ return reportNode.newReportNode()
+ .withMessageTemplate("dynaflowSa", "Dynaflow security analysis on network '${networkId}'")
+ .withUntypedValue("networkId", networkId)
+ .add();
}
- public static Reporter createContingenciesTimelineReporter(Reporter reporter, String contingencyId) {
- return reporter.createSubReporter("saContingency",
- "Contingency '${contingencyId}'",
- "contingencyId", contingencyId);
+ public static ReportNode createContingenciesTimelineReporter(ReportNode reporter, String contingencyId) {
+ return reporter.newReportNode()
+ .withMessageTemplate("saContingency", "Contingency '${contingencyId}'")
+ .withUntypedValue("contingencyId", contingencyId)
+ .add();
}
}
diff --git a/dynaflow/src/test/java/com/powsybl/dynaflow/ConstraintsReaderTest.java b/dynaflow/src/test/java/com/powsybl/dynaflow/ConstraintsReaderTest.java
index 2b2db1202..b58af03c1 100644
--- a/dynaflow/src/test/java/com/powsybl/dynaflow/ConstraintsReaderTest.java
+++ b/dynaflow/src/test/java/com/powsybl/dynaflow/ConstraintsReaderTest.java
@@ -22,7 +22,7 @@
import java.util.List;
import java.util.Objects;
-import static com.powsybl.commons.test.ComparisonUtils.compareTxt;
+import static com.powsybl.commons.test.ComparisonUtils.assertTxtEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
@@ -40,6 +40,6 @@ void test() throws IOException {
ObjectMapper mapper = JsonUtil.createObjectMapper().registerModule(new SecurityAnalysisJsonModule());
mapper.writerWithDefaultPrettyPrinter().writeValue(stringWriter, violations);
- compareTxt(Objects.requireNonNull(getClass().getResourceAsStream("/limitViolations.json")), stringWriter.toString());
+ assertTxtEquals(Objects.requireNonNull(getClass().getResourceAsStream("/limitViolations.json")), stringWriter.toString());
}
}
diff --git a/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowParametersTest.java b/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowParametersTest.java
index 52347e736..ea1dc6489 100644
--- a/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowParametersTest.java
+++ b/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowParametersTest.java
@@ -26,7 +26,7 @@
import java.nio.file.Path;
import java.util.*;
-import static com.powsybl.commons.test.ComparisonUtils.compareTxt;
+import static com.powsybl.commons.test.ComparisonUtils.assertTxtEquals;
import static com.powsybl.dynaflow.DynaFlowProvider.MODULE_SPECIFIC_PARAMETERS;
import static org.junit.jupiter.api.Assertions.*;
@@ -205,7 +205,7 @@ void defaultParametersSerialization() throws IOException {
try (InputStream actual = Files.newInputStream(parameterFile);
InputStream expected = getClass().getResourceAsStream("/params_default.json")) {
- compareTxt(expected, actual);
+ assertTxtEquals(Objects.requireNonNull(expected), actual);
}
}
@@ -239,7 +239,7 @@ void parametersSerialization() throws IOException {
try (InputStream actual = Files.newInputStream(parameterFile);
InputStream expected = getClass().getResourceAsStream("/params.json")) {
- compareTxt(expected, actual);
+ assertTxtEquals(Objects.requireNonNull(expected), actual);
}
}
diff --git a/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowProviderTest.java b/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowProviderTest.java
index 67bc0d722..301ec73ce 100644
--- a/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowProviderTest.java
+++ b/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowProviderTest.java
@@ -33,7 +33,7 @@
import java.util.Objects;
import java.util.concurrent.ForkJoinPool;
-import static com.powsybl.commons.test.ComparisonUtils.compareXml;
+import static com.powsybl.commons.test.ComparisonUtils.assertXmlEquals;
import static com.powsybl.dynaflow.DynaFlowConstants.*;
import static com.powsybl.dynawo.commons.DynawoConstants.OUTPUT_IIDM_FILENAME;
import static org.junit.jupiter.api.Assertions.*;
@@ -221,7 +221,7 @@ private void compare(Network expected, Network actual) throws IOException {
NetworkSerDe.write(expected, pexpected);
actual.setCaseDate(expected.getCaseDate());
NetworkSerDe.write(actual, pactual);
- compareXml(Files.newInputStream(pexpected), Files.newInputStream(pactual));
+ assertXmlEquals(Files.newInputStream(pexpected), Files.newInputStream(pactual));
}
private static Network createTestNetwork() {
diff --git a/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisTest.java b/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisTest.java
index 60d6c4910..454a0c920 100644
--- a/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisTest.java
+++ b/dynaflow/src/test/java/com/powsybl/dynaflow/DynaFlowSecurityAnalysisTest.java
@@ -36,8 +36,8 @@
import java.util.Objects;
import java.util.concurrent.ForkJoinPool;
-import static com.powsybl.commons.test.ComparisonUtils.compareTxt;
-import static com.powsybl.commons.test.ComparisonUtils.compareXml;
+import static com.powsybl.commons.test.ComparisonUtils.assertTxtEquals;
+import static com.powsybl.commons.test.ComparisonUtils.assertXmlEquals;
import static com.powsybl.dynaflow.DynaFlowConstants.DYNAFLOW_NAME;
import static com.powsybl.dynaflow.DynaFlowConstants.IIDM_FILENAME;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -86,11 +86,11 @@ public int execute(String program, List args, Path outFile, Path errFile
private void validateInputs(Path workingDir) throws IOException {
if (inputFile != null) {
- compareXml(getClass().getResourceAsStream(inputFile), Files.newInputStream(workingDir.resolve(IIDM_FILENAME)));
+ assertXmlEquals(getClass().getResourceAsStream(inputFile), Files.newInputStream(workingDir.resolve(IIDM_FILENAME)));
}
if (contingencyFile != null) {
InputStream contingencyIs = Objects.requireNonNull(getClass().getResourceAsStream(contingencyFile));
- compareTxt(contingencyIs, Files.newInputStream(workingDir.resolve("contingencies.json")));
+ assertTxtEquals(contingencyIs, Files.newInputStream(workingDir.resolve("contingencies.json")));
}
}
@@ -128,7 +128,7 @@ void test() throws IOException {
StringWriter writer = new StringWriter();
SecurityAnalysisResultSerializer.write(result, writer);
- compareTxt(Objects.requireNonNull(getClass().getResourceAsStream("/SecurityAnalysis/result.json")), writer.toString());
+ assertTxtEquals(Objects.requireNonNull(getClass().getResourceAsStream("/SecurityAnalysis/result.json")), writer.toString());
}
@Test
diff --git a/dynaflow/src/test/resources/SecurityAnalysis/result.json b/dynaflow/src/test/resources/SecurityAnalysis/result.json
index d3ca88b06..3ded0d9b3 100644
--- a/dynaflow/src/test/resources/SecurityAnalysis/result.json
+++ b/dynaflow/src/test/resources/SecurityAnalysis/result.json
@@ -1,5 +1,5 @@
{
- "version" : "1.5",
+ "version" : "1.6",
"preContingencyResult" : {
"status" : "CONVERGED",
"limitViolationsResult" : {
diff --git a/dynaflow/src/test/resources/dynaflow_default_serialization.json b/dynaflow/src/test/resources/dynaflow_default_serialization.json
index 3ccf51804..d1f587fe7 100644
--- a/dynaflow/src/test/resources/dynaflow_default_serialization.json
+++ b/dynaflow/src/test/resources/dynaflow_default_serialization.json
@@ -7,7 +7,7 @@
"twtSplitShuntAdmittance" : false,
"shuntCompensatorVoltageControlOn" : false,
"readSlackBus" : true,
- "writeSlackBus" : false,
+ "writeSlackBus" : true,
"dc" : false,
"distributedSlack" : true,
"balanceType" : "PROPORTIONAL_TO_GENERATION_P_MAX",
diff --git a/dynaflow/src/test/resources/dynaflow_parameters_set_serialization.json b/dynaflow/src/test/resources/dynaflow_parameters_set_serialization.json
index 8771080ce..605143a3c 100644
--- a/dynaflow/src/test/resources/dynaflow_parameters_set_serialization.json
+++ b/dynaflow/src/test/resources/dynaflow_parameters_set_serialization.json
@@ -7,7 +7,7 @@
"twtSplitShuntAdmittance" : false,
"shuntCompensatorVoltageControlOn" : false,
"readSlackBus" : true,
- "writeSlackBus" : false,
+ "writeSlackBus" : true,
"dc" : false,
"distributedSlack" : true,
"balanceType" : "PROPORTIONAL_TO_GENERATION_P_MAX",
diff --git a/dynawaltz-dsl/pom.xml b/dynawaltz-dsl/pom.xml
index 285f8161d..f4ab8ef3d 100644
--- a/dynawaltz-dsl/pom.xml
+++ b/dynawaltz-dsl/pom.xml
@@ -13,7 +13,7 @@
powsybl-dynawo
com.powsybl
- 2.4.0-SNAPSHOT
+ 2.5.0-SNAPSHOT
powsybl-dynawaltz-dsl
diff --git a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/Reporters.groovy b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DslReports.groovy
similarity index 53%
rename from dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/Reporters.groovy
rename to dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DslReports.groovy
index db42ee06f..9f28bce91 100644
--- a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/Reporters.groovy
+++ b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DslReports.groovy
@@ -7,19 +7,20 @@
*/
package com.powsybl.dynawaltz.dsl
+import com.powsybl.commons.report.ReportNode;
-import com.powsybl.commons.reporter.Reporter
/**
* @author Laurent Issertial {@literal }
*/
-final class Reporters {
+final class DslReports {
- private Reporters() {
+ private DslReports() {
}
- static Reporter createModelBuilderReporter(Reporter reporter, String name) {
- reporter.createSubReporter("DSLModelBuilder",
- 'DSL model builder for ${name}',
- "name", name)
+ static ReportNode createModelBuilderReportNode(ReportNode reportNode, String name) {
+ reportNode.newReportNode()
+ .withMessageTemplate("DSLModelBuilder", 'DSL model builder for ${name}')
+ .withUntypedValue("name", name)
+ .add()
}
}
diff --git a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzCurveGroovyExtension.groovy b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzCurveGroovyExtension.groovy
index 63f698aba..36b0f4fc1 100644
--- a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzCurveGroovyExtension.groovy
+++ b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzCurveGroovyExtension.groovy
@@ -7,7 +7,7 @@
package com.powsybl.dynawaltz.dsl
import com.google.auto.service.AutoService
-import com.powsybl.commons.reporter.Reporter
+import com.powsybl.commons.report.ReportNode
import com.powsybl.dsl.DslException
import com.powsybl.dynamicsimulation.Curve
import com.powsybl.dynamicsimulation.groovy.CurveGroovyExtension
@@ -79,7 +79,7 @@ class DynaWaltzCurveGroovyExtension implements CurveGroovyExtension {
}
@Override
- void load(Binding binding, Consumer consumer, Reporter reporter) {
+ void load(Binding binding, Consumer consumer, ReportNode reportNode) {
binding.curve = { Closure closure ->
def cloned = closure.clone()
CurvesSpec curveSpec = new CurvesSpec()
diff --git a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzDynamicModelGroovyExtension.groovy b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzDynamicModelGroovyExtension.groovy
index 8e00fe363..7196518f5 100644
--- a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzDynamicModelGroovyExtension.groovy
+++ b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzDynamicModelGroovyExtension.groovy
@@ -8,7 +8,7 @@
package com.powsybl.dynawaltz.dsl
import com.google.auto.service.AutoService
-import com.powsybl.commons.reporter.Reporter
+import com.powsybl.commons.report.ReportNode
import com.powsybl.dynamicsimulation.DynamicModel
import com.powsybl.dynamicsimulation.groovy.DynamicModelGroovyExtension
import com.powsybl.dynawaltz.DynaWaltzProvider
@@ -18,6 +18,7 @@ import com.powsybl.dynawaltz.builders.ModelConfigsHandler
import com.powsybl.iidm.network.Network
import java.util.function.Consumer
+
/**
* @author Laurent Issertial {@literal }
*/
@@ -42,13 +43,13 @@ class DynaWaltzDynamicModelGroovyExtension implements DynamicModelGroovyExtensio
@Override
- void load(Binding binding, Consumer consumer, Reporter reporter) {
+ void load(Binding binding, Consumer consumer, ReportNode reportNode) {
builderConfigs.forEach {conf ->
conf.libs.forEach {lib ->
binding.setVariable(lib , { Closure closure ->
def cloned = closure.clone()
ModelBuilder builder = conf.builderConstructor
- .createBuilder(binding.getVariable("network") as Network, lib, Reporters.createModelBuilderReporter(reporter, lib))
+ .createBuilder(binding.getVariable("network") as Network, lib, DslReports.createModelBuilderReportNode(reportNode, lib))
cloned.delegate = builder
cloned()
builder.build()?.tap {
diff --git a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzEventModelGroovyExtension.groovy b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzEventModelGroovyExtension.groovy
index 1310c7024..816673fcd 100644
--- a/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzEventModelGroovyExtension.groovy
+++ b/dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/DynaWaltzEventModelGroovyExtension.groovy
@@ -8,7 +8,7 @@
package com.powsybl.dynawaltz.dsl
import com.google.auto.service.AutoService
-import com.powsybl.commons.reporter.Reporter
+import com.powsybl.commons.report.ReportNode
import com.powsybl.dynamicsimulation.EventModel
import com.powsybl.dynamicsimulation.groovy.EventModelGroovyExtension
import com.powsybl.dynawaltz.DynaWaltzProvider
@@ -18,6 +18,7 @@ import com.powsybl.dynawaltz.builders.ModelConfigsHandler
import com.powsybl.iidm.network.Network
import java.util.function.Consumer
+
/**
* @author Laurent Issertial {@literal }
*/
@@ -40,13 +41,13 @@ class DynaWaltzEventModelGroovyExtension implements EventModelGroovyExtension {
}
@Override
- void load(Binding binding, Consumer consumer, Reporter reporter) {
+ void load(Binding binding, Consumer consumer, ReportNode reportNode) {
builderConfigs.forEach {
binding.setVariable(it.tag, { Closure closure ->
def cloned = closure.clone()
ModelBuilder builder = it.builderConstructor.createBuilder(
binding.getVariable("network") as Network,
- Reporters.createModelBuilderReporter(reporter, it.tag))
+ DslReports.createModelBuilderReportNode(reportNode, it.tag))
cloned.delegate = builder
cloned()
builder.build()?.tap {
diff --git a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/AbstractModelSupplierTest.java b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/AbstractModelSupplierTest.java
index 7776a7b20..c9507e507 100644
--- a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/AbstractModelSupplierTest.java
+++ b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/AbstractModelSupplierTest.java
@@ -7,9 +7,10 @@
*/
package com.powsybl.dynawaltz.dsl;
-import com.powsybl.commons.reporter.ReporterModel;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.commons.test.TestUtil;
+import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.Objects;
@@ -21,15 +22,15 @@
*/
abstract class AbstractModelSupplierTest {
- protected final ReporterModel reporter = new ReporterModel("dslTests", "DSL tests");
+ protected final ReportNode reportNode = ReportNode.newRootReportNode().withMessageTemplate("dslTests", "DSL tests").build();
protected InputStream getResourceAsStream(String name) {
return Objects.requireNonNull(AbstractModelSupplierTest.class.getResourceAsStream(name));
}
- protected void checkReporter(String report) {
+ protected void checkReportNode(String report) throws IOException {
StringWriter sw = new StringWriter();
- reporter.export(sw);
+ reportNode.print(sw);
assertEquals(report, TestUtil.normalizeLineSeparator(sw.toString()));
}
}
diff --git a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/DynamicModelsSupplierTest.java b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/DynamicModelsSupplierTest.java
index 949001571..de01d2460 100644
--- a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/DynamicModelsSupplierTest.java
+++ b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/DynamicModelsSupplierTest.java
@@ -43,6 +43,7 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
+import java.io.IOException;
import java.util.List;
import java.util.stream.Stream;
@@ -77,21 +78,21 @@ void testAutomationSystemDynamicModels(String groovyScriptName, Class extends
@ParameterizedTest(name = "{0}")
@MethodSource("provideWarningsModel")
- void testDslWarnings(String groovyScriptName, Network network, String report) {
+ void testDslWarnings(String groovyScriptName, Network network, String report) throws IOException {
DynamicModelsSupplier supplier = new GroovyDynamicModelsSupplier(getResourceAsStream(groovyScriptName), EXTENSIONS);
- assertTrue(supplier.get(network, reporter).isEmpty());
- checkReporter(report);
+ assertTrue(supplier.get(network, reportNode).isEmpty());
+ checkReportNode(report);
}
@ParameterizedTest(name = "{0}")
@MethodSource("provideGenerator")
- void testGeneratorPrefixes(String groovyScriptName, Class extends GeneratorModel> modelClass, Network network, String terminalVarName, String report) {
+ void testGeneratorPrefixes(String groovyScriptName, Class extends GeneratorModel> modelClass, Network network, String terminalVarName, String report) throws IOException {
DynamicModelsSupplier supplier = new GroovyDynamicModelsSupplier(getResourceAsStream(groovyScriptName), EXTENSIONS);
- List dynamicModels = supplier.get(network, reporter);
+ List dynamicModels = supplier.get(network, reportNode);
assertEquals(1, dynamicModels.size());
assertTrue(modelClass.isInstance(dynamicModels.get(0)));
assertEquals(terminalVarName, modelClass.cast(dynamicModels.get(0)).getTerminalVarName());
- checkReporter(report);
+ checkReportNode(report);
}
void assertEquipmentBlackBoxModel(EquipmentBlackBoxModel bbm, String dynamicId, String staticId, String parameterId, String lib) {
@@ -153,139 +154,139 @@ private static Stream provideWarningsModel() {
Arguments.of("/warnings/missingStaticId.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for LoadAlphaBeta
- 'staticId' field is not set
- 'dynamicModelId' field is not set, staticId (unknown staticId) will be used instead
- Model unknownDynamicId cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for LoadAlphaBeta
+ 'staticId' field is not set
+ 'dynamicModelId' field is not set, staticId (unknown staticId) will be used instead
+ Model unknownDynamicId cannot be instantiated
"""),
Arguments.of("/warnings/missingParameterId.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for LoadAlphaBeta
- 'parameterSetId' field is not set
- 'dynamicModelId' field is not set, staticId LOAD will be used instead
- Model LOAD cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for LoadAlphaBeta
+ 'parameterSetId' field is not set
+ 'dynamicModelId' field is not set, staticId LOAD will be used instead
+ Model LOAD cannot be instantiated
"""),
Arguments.of("/warnings/missingEquipment.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for LoadAlphaBeta
- 'staticId' field value 'GEN' not found for equipment type(s) LOAD
- 'dynamicModelId' field is not set, staticId GEN will be used instead
- Model GEN cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for LoadAlphaBeta
+ 'staticId' field value 'GEN' not found for equipment type(s) LOAD
+ 'dynamicModelId' field is not set, staticId GEN will be used instead
+ Model GEN cannot be instantiated
"""),
Arguments.of("/warnings/missingDangling.groovy", HvdcTestNetwork.createVsc(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for HvdcPVDangling
- 'dangling' field is not set
- Model BBM_HVDC_L cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for HvdcPVDangling
+ 'dangling' field is not set
+ Model BBM_HVDC_L cannot be instantiated
"""),
Arguments.of("/warnings/missingDanglingProperty.groovy", HvdcTestNetwork.createVsc(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for HvdcPV
- 'dangling' field is set but HvdcPV does not possess this option
- Model BBM_HVDC_L cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for HvdcPV
+ 'dangling' field is set but HvdcPV does not possess this option
+ Model BBM_HVDC_L cannot be instantiated
"""),
Arguments.of("/warnings/underVoltageMissingGenerator.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for UnderVoltage
- 'generator' field value 'NGEN' not found for equipment type(s) GENERATOR
- Model UV_GEN cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for UnderVoltage
+ 'generator' field value 'NGEN' not found for equipment type(s) GENERATOR
+ Model UV_GEN cannot be instantiated
"""),
Arguments.of("/warnings/phaseShifterMissingTransformer.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for PhaseShifterI
- 'transformer' field value 'NGEN' not found for equipment type(s) TWO_WINDINGS_TRANSFORMER
- Model PS_NGEN_NHV1 cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for PhaseShifterI
+ 'transformer' field value 'NGEN' not found for equipment type(s) TWO_WINDINGS_TRANSFORMER
+ Model PS_NGEN_NHV1 cannot be instantiated
"""),
Arguments.of("/warnings/claMissingMeasurement.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for OverloadManagementSystem
- 'iMeasurement' field value 'NGEN' not found for equipment type(s) BRANCH
- Model CLA_NGEN cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for OverloadManagementSystem
+ 'iMeasurement' field value 'NGEN' not found for equipment type(s) BRANCH
+ Model CLA_NGEN cannot be instantiated
"""),
Arguments.of("/warnings/claMissingMeasurementSide.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for OverloadManagementSystem
- 'iMeasurementSide' field is not set
- Model CLA_NGEN cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for OverloadManagementSystem
+ 'iMeasurementSide' field is not set
+ Model CLA_NGEN cannot be instantiated
"""),
Arguments.of("/warnings/claMissingControlled.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for OverloadManagementSystem
- 'controlledBranch' field value 'GEN' not found for equipment type(s) BRANCH
- Model CLA_NGEN cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for OverloadManagementSystem
+ 'controlledBranch' field value 'GEN' not found for equipment type(s) BRANCH
+ Model CLA_NGEN cannot be instantiated
"""),
Arguments.of("/warnings/cla2MissingMeasurement2.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for TwoLevelsOverloadManagementSystem
- 'iMeasurement2' field value 'NGEN' not found for equipment type(s) BRANCH
- Model CLA_NGEN cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for TwoLevelsOverloadManagementSystem
+ 'iMeasurement2' field value 'NGEN' not found for equipment type(s) BRANCH
+ Model CLA_NGEN cannot be instantiated
"""),
Arguments.of("/warnings/cla2MissingMeasurementSide2.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for TwoLevelsOverloadManagementSystem
- 'iMeasurement2Side' field is not set
- Model CLA_NGEN cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for TwoLevelsOverloadManagementSystem
+ 'iMeasurement2Side' field is not set
+ Model CLA_NGEN cannot be instantiated
"""),
Arguments.of("/warnings/tapChangerMissingBus.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for TapChangerBlockingAutomaton
- 'uMeasurements' field value 'LOAD' not found for equipment type(s) BUS/BUSBAR_SECTION
- 'uMeasurements' field value 'Wrong_ID' not found for equipment type(s) BUS/BUSBAR_SECTION
- 'uMeasurements' list is empty
- Model ZAB cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for TapChangerBlockingAutomaton
+ 'uMeasurements' field value 'LOAD' not found for equipment type(s) BUS/BUSBAR_SECTION
+ 'uMeasurements' field value 'Wrong_ID' not found for equipment type(s) BUS/BUSBAR_SECTION
+ 'uMeasurements' list is empty
+ Model ZAB cannot be instantiated
"""),
Arguments.of("/warnings/tapChangerMissingBusList.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for TapChangerBlockingAutomaton
- 'uMeasurements' field value '[LOAD, Wrong_ID]' not found for equipment type(s) BUS/BUSBAR_SECTION
- 'uMeasurements' field value '[NGEN_NHV1]' not found for equipment type(s) BUS/BUSBAR_SECTION
- 'uMeasurements' list is empty
- Model ZAB cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for TapChangerBlockingAutomaton
+ 'uMeasurements' field value '[LOAD, Wrong_ID]' not found for equipment type(s) BUS/BUSBAR_SECTION
+ 'uMeasurements' field value '[NGEN_NHV1]' not found for equipment type(s) BUS/BUSBAR_SECTION
+ 'uMeasurements' list is empty
+ Model ZAB cannot be instantiated
"""),
Arguments.of("/warnings/tapChangerCompatible.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for TapChangerBlockingAutomaton
- 'transformers' field value 'GEN' not found for equipment type(s) TWO_WINDINGS_TRANSFORMER/LOAD, id will be used as pure dynamic model id
- 'uMeasurements' field value 'GEN' not found for equipment type(s) BUS/BUSBAR_SECTION
- 'uMeasurements' list is empty
- Model ZAB cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for TapChangerBlockingAutomaton
+ 'transformers' field value 'GEN' not found for equipment type(s) TWO_WINDINGS_TRANSFORMER/LOAD, id will be used as pure dynamic model id
+ 'uMeasurements' field value 'GEN' not found for equipment type(s) BUS/BUSBAR_SECTION
+ 'uMeasurements' list is empty
+ Model ZAB cannot be instantiated
"""),
Arguments.of("/warnings/hvdcVscWrongStaticType.groovy", HvdcTestNetwork.createLcc(),
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for HvdcVSC
- 'staticId' field value 'L' not found for equipment type(s) VSC HVDC_LINE
- Model BBM_HVDC cannot be instantiated
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for HvdcVSC
+ 'staticId' field value 'L' not found for equipment type(s) VSC HVDC_LINE
+ Model BBM_HVDC cannot be instantiated
""")
);
}
@@ -295,16 +296,16 @@ private static Stream provideGenerator() {
Arguments.of("/dynamicModels/gen.groovy", SynchronousGenerator.class, EurostagTutorialExample1Factory.create(), "generator_terminal",
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for GeneratorSynchronousThreeWindings
- Model BBM_GEN instantiation successful
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for GeneratorSynchronousThreeWindings
+ Model BBM_GEN instantiation successful
"""),
Arguments.of("/dynamicModels/genTfo.groovy", SynchronousGenerator.class, EurostagTutorialExample1Factory.create(), "transformer_terminal1",
"""
+ DSL tests
- + Groovy Dynamic Models Supplier
- + DSL model builder for GeneratorSynchronousThreeWindingsPmConstVRNordicTfo
- Model BBM_GEN instantiation successful
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for GeneratorSynchronousThreeWindingsPmConstVRNordicTfo
+ Model BBM_GEN instantiation successful
""")
);
}
diff --git a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/EventModelsSupplierTest.java b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/EventModelsSupplierTest.java
index daae12680..224310852 100644
--- a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/EventModelsSupplierTest.java
+++ b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/EventModelsSupplierTest.java
@@ -23,6 +23,7 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
+import java.io.IOException;
import java.util.List;
import java.util.stream.Stream;
@@ -47,10 +48,10 @@ void testEventModels(String groovyScriptName, Class extends AbstractEvent> mod
@ParameterizedTest(name = "{0}")
@MethodSource("provideWarningsModel")
- void testDslWarnings(String groovyScriptName, Network network, String report) {
+ void testDslWarnings(String groovyScriptName, Network network, String report) throws IOException {
EventModelsSupplier supplier = new GroovyEventModelsSupplier(getResourceAsStream(groovyScriptName), EXTENSIONS);
- assertTrue(supplier.get(network, reporter).isEmpty());
- checkReporter(report);
+ assertTrue(supplier.get(network, reportNode).isEmpty());
+ checkReportNode(report);
}
void assertEventModel(AbstractEvent em, String dynamicId, String equipmentStaticId, String lib, double startTime) {
@@ -81,51 +82,51 @@ private static Stream provideWarningsModel() {
Arguments.of("/eventWarnings/missingStaticId.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Event Models Supplier
- + DSL model builder for NodeFault
- 'staticId' field value 'GEN' not found for equipment type(s) BUS
- Model NodeFault_GEN cannot be instantiated
+ + Groovy Event Models Supplier
+ + DSL model builder for NodeFault
+ 'staticId' field value 'GEN' not found for equipment type(s) BUS
+ Model NodeFault_GEN cannot be instantiated
"""),
Arguments.of("/eventWarnings/missingStartTime.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Event Models Supplier
- + DSL model builder for NodeFault
- 'startTime' field is not set
- Model NodeFault_NGEN cannot be instantiated
+ + Groovy Event Models Supplier
+ + DSL model builder for NodeFault
+ 'startTime' field is not set
+ Model NodeFault_NGEN cannot be instantiated
"""),
Arguments.of("/eventWarnings/missingNodeFaultParameters.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Event Models Supplier
- + DSL model builder for NodeFault
- faultTime should be strictly positive (0.0)
- Model NodeFault_NGEN cannot be instantiated
+ + Groovy Event Models Supplier
+ + DSL model builder for NodeFault
+ faultTime should be strictly positive (0.0)
+ Model NodeFault_NGEN cannot be instantiated
"""),
Arguments.of("/eventWarnings/missingAPVParameters.groovy", SvcTestCaseFactory.create(),
"""
+ DSL tests
- + Groovy Event Models Supplier
- + DSL model builder for Step
- 'staticId' field value 'SVC2' not found for equipment type(s) GENERATOR/LOAD
- 'deltaP' field is not set
- Model Step_SVC2 cannot be instantiated
+ + Groovy Event Models Supplier
+ + DSL model builder for Step
+ 'staticId' field value 'SVC2' not found for equipment type(s) GENERATOR/LOAD
+ 'deltaP' field is not set
+ Model Step_SVC2 cannot be instantiated
"""),
Arguments.of("/eventWarnings/missingDisconnectionEquipment.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Event Models Supplier
- + DSL model builder for Disconnect
- 'staticId' field value 'NGEN' not found for equipment type(s) Disconnectable equipment
- Model Disconnect_NGEN cannot be instantiated
+ + Groovy Event Models Supplier
+ + DSL model builder for Disconnect
+ 'staticId' field value 'NGEN' not found for equipment type(s) Disconnectable equipment
+ Model Disconnect_NGEN cannot be instantiated
"""),
Arguments.of("/eventWarnings/missingDisconnectionSide.groovy", EurostagTutorialExample1Factory.create(),
"""
+ DSL tests
- + Groovy Event Models Supplier
- + DSL model builder for Disconnect
- 'disconnectOnly' field is set but GENERATOR GEN does not possess this option
- Model Disconnect_GEN cannot be instantiated
+ + Groovy Event Models Supplier
+ + DSL model builder for Disconnect
+ 'disconnectOnly' field is set but GENERATOR GEN does not possess this option
+ Model Disconnect_GEN cannot be instantiated
""")
);
}
diff --git a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/ieee/AbstractIeeeTest.java b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/ieee/AbstractIeeeTest.java
index 10fa9d61b..a27013195 100644
--- a/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/ieee/AbstractIeeeTest.java
+++ b/dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/ieee/AbstractIeeeTest.java
@@ -29,7 +29,7 @@
import java.util.Objects;
import java.util.concurrent.ForkJoinPool;
-import static com.powsybl.commons.reporter.Reporter.NO_OP;
+import static com.powsybl.commons.report.ReportNode.NO_OP;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
diff --git a/dynawaltz/pom.xml b/dynawaltz/pom.xml
index 967a1b181..795f11b35 100644
--- a/dynawaltz/pom.xml
+++ b/dynawaltz/pom.xml
@@ -13,7 +13,7 @@
powsybl-dynawo
com.powsybl
- 2.4.0-SNAPSHOT
+ 2.5.0-SNAPSHOT
powsybl-dynawaltz
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzContext.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzContext.java
index 1d79071b7..9cf4704f5 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzContext.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzContext.java
@@ -7,7 +7,7 @@
package com.powsybl.dynawaltz;
import com.powsybl.commons.PowsyblException;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynamicsimulation.Curve;
import com.powsybl.dynamicsimulation.DynamicSimulationParameters;
import com.powsybl.dynawaltz.models.AbstractPureDynamicBlackBoxModel;
@@ -65,26 +65,26 @@ public class DynaWaltzContext {
public DynaWaltzContext(Network network, String workingVariantId, List dynamicModels, List eventModels,
List curves, DynamicSimulationParameters parameters, DynaWaltzParameters dynaWaltzParameters) {
- this(network, workingVariantId, dynamicModels, eventModels, curves, parameters, dynaWaltzParameters, Reporter.NO_OP);
+ this(network, workingVariantId, dynamicModels, eventModels, curves, parameters, dynaWaltzParameters, ReportNode.NO_OP);
}
public DynaWaltzContext(Network network, String workingVariantId, List dynamicModels, List eventModels,
- List curves, DynamicSimulationParameters parameters, DynaWaltzParameters dynaWaltzParameters, Reporter reporter) {
+ List curves, DynamicSimulationParameters parameters, DynaWaltzParameters dynaWaltzParameters, ReportNode reportNode) {
- Reporter contextReporter = DynawaltzReports.createDynaWaltzContextReporter(reporter);
+ ReportNode contextReportNode = DynawaltzReports.createDynaWaltzContextReportNode(reportNode);
this.network = Objects.requireNonNull(network);
this.workingVariantId = Objects.requireNonNull(workingVariantId);
this.parameters = Objects.requireNonNull(parameters);
this.dynaWaltzParameters = Objects.requireNonNull(dynaWaltzParameters);
Stream uniqueIdsDynamicModels = Objects.requireNonNull(dynamicModels).stream()
- .filter(distinctByDynamicId(contextReporter).and(distinctByStaticId(contextReporter)));
+ .filter(distinctByDynamicId(contextReportNode).and(distinctByStaticId(contextReportNode)));
this.dynamicModels = dynaWaltzParameters.isUseModelSimplifiers()
- ? simplifyModels(uniqueIdsDynamicModels, contextReporter).toList()
+ ? simplifyModels(uniqueIdsDynamicModels, contextReportNode).toList()
: uniqueIdsDynamicModels.toList();
this.eventModels = Objects.requireNonNull(eventModels).stream()
- .filter(distinctByDynamicId(contextReporter))
+ .filter(distinctByDynamicId(contextReportNode))
.toList();
this.staticIdBlackBoxModelMap = getInputBlackBoxDynamicModelStream()
.filter(EquipmentBlackBoxModel.class::isInstance)
@@ -103,7 +103,7 @@ public DynaWaltzContext(Network network, String workingVariantId, List new MacroStaticReference(k, bbm.getVarsMapping()));
@@ -119,10 +119,10 @@ public DynaWaltzContext(Network network, String workingVariantId, List simplifyModels(Stream inputBbm, Reporter reporter) {
+ private Stream simplifyModels(Stream inputBbm, ReportNode reportNode) {
Stream outputBbm = inputBbm;
for (ModelsSimplifier modelsSimplifier : ServiceLoader.load(ModelsSimplifier.class)) {
- outputBbm = modelsSimplifier.simplifyModels(outputBbm, network, dynaWaltzParameters, reporter);
+ outputBbm = modelsSimplifier.simplifyModels(outputBbm, network, dynaWaltzParameters, reportNode);
}
return outputBbm;
}
@@ -194,22 +194,22 @@ public T getPureDynamicModel(String dynamicId, Class connec
}
}
- protected static Predicate distinctByStaticId(Reporter reporter) {
+ protected static Predicate distinctByStaticId(ReportNode reportNode) {
Set seen = new HashSet<>();
return bbm -> {
if (bbm instanceof EquipmentBlackBoxModel eBbm && !seen.add(eBbm.getStaticId())) {
- DynawaltzReports.reportDuplicateStaticId(reporter, eBbm.getStaticId(), eBbm.getLib(), eBbm.getDynamicModelId());
+ DynawaltzReports.reportDuplicateStaticId(reportNode, eBbm.getStaticId(), eBbm.getLib(), eBbm.getDynamicModelId());
return false;
}
return true;
};
}
- protected static Predicate distinctByDynamicId(Reporter reporter) {
+ protected static Predicate distinctByDynamicId(ReportNode reportNode) {
Set seen = new HashSet<>();
return bbm -> {
if (!seen.add(bbm.getDynamicModelId())) {
- DynawaltzReports.reportDuplicateDynamicId(reporter, bbm.getDynamicModelId(), bbm.getName());
+ DynawaltzReports.reportDuplicateDynamicId(reportNode, bbm.getDynamicModelId(), bbm.getName());
return false;
}
return true;
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzHandler.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzHandler.java
index 3f8f81e1d..c72c6e101 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzHandler.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzHandler.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.computation.AbstractExecutionHandler;
import com.powsybl.computation.Command;
import com.powsybl.computation.CommandExecution;
@@ -38,7 +38,10 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,7 +56,7 @@
*/
public final class DynaWaltzHandler extends AbstractExecutionHandler {
- private static final Logger LOGGER = LoggerFactory.getLogger(DynaWaltzProvider.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(DynaWaltzHandler.class);
private static final String LOGS_FOLDER = "logs";
private static final String OUTPUT_IIDM_FILENAME = "outputIIDM.xml";
private static final String OUTPUT_DUMP_FILENAME = "outputState.dmp";
@@ -65,20 +68,20 @@ public final class DynaWaltzHandler extends AbstractExecutionHandler timeline = new ArrayList<>();
private final Map curves = new HashMap<>();
private DynamicSimulationResult.Status status = DynamicSimulationResult.Status.SUCCESS;
private String statusText = "";
- public DynaWaltzHandler(DynaWaltzContext context, Command command, Reporter reporter) {
+ public DynaWaltzHandler(DynaWaltzContext context, Command command, ReportNode reportNode) {
this.context = context;
this.dynawoInput = context.getDynaWaltzParameters().isMergeLoads()
? LoadsMerger.mergeLoads(context.getNetwork())
: context.getNetwork();
this.command = command;
- this.reporter = reporter;
+ this.reportNode = reportNode;
}
@Override
@@ -135,8 +138,8 @@ public DynamicSimulationResult after(Path workingDir, ExecutionReport report) th
private void setDynawoLog(Path outputsFolder) {
Path logFile = outputsFolder.resolve(LOGS_FOLDER).resolve(LOGS_FILENAME);
if (Files.exists(logFile)) {
- Reporter logReporter = CommonReports.createDynawoLogReporter(reporter);
- new CsvLogParser().parse(logFile).forEach(e -> CommonReports.reportLogEvent(logReporter, e));
+ ReportNode logReportNode = CommonReports.createDynawoLogReportNode(reportNode);
+ new CsvLogParser().parse(logFile).forEach(e -> CommonReports.reportLogEntry(logReportNode, e));
} else {
LOGGER.warn("Dynawo logs file not found");
}
@@ -165,11 +168,7 @@ private void setDumpFile(Path outputsFolder, Path dumpFileFolder, Path fileName)
private void setTimeline(Path outputsFolder) {
Path timelineFile = outputsFolder.resolve(DYNAWO_TIMELINE_FOLDER).resolve(TIMELINE_FILENAME);
if (Files.exists(timelineFile)) {
- Reporter timelineReporter = DynawaltzReports.createDynaWaltzTimelineReporter(reporter);
- new CsvTimeLineParser().parse(timelineFile).forEach(e -> {
- CommonReports.reportTimelineEvent(timelineReporter, e);
- timeline.add(new TimelineEvent(e.time(), e.modelName(), e.message()));
- });
+ new CsvTimeLineParser().parse(timelineFile).forEach(e -> timeline.add(new TimelineEvent(e.time(), e.modelName(), e.message())));
} else {
LOGGER.warn("Timeline file not found");
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzProvider.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzProvider.java
index 1f674d1d1..cf2a375a4 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzProvider.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynaWaltzProvider.java
@@ -8,7 +8,7 @@
import com.google.auto.service.AutoService;
import com.powsybl.commons.config.PlatformConfig;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.computation.*;
import com.powsybl.dynamicsimulation.*;
import com.powsybl.dynawaltz.models.utils.BlackBoxSupplierUtils;
@@ -77,26 +77,26 @@ public static Command getVersionCommand(DynaWaltzConfig dynaWaltzConfig) {
@Override
public CompletableFuture run(Network network, DynamicModelsSupplier dynamicModelsSupplier, EventModelsSupplier eventModelsSupplier, CurvesSupplier curvesSupplier, String workingVariantId,
- ComputationManager computationManager, DynamicSimulationParameters parameters, Reporter reporter) {
+ ComputationManager computationManager, DynamicSimulationParameters parameters, ReportNode reportNode) {
Objects.requireNonNull(dynamicModelsSupplier);
Objects.requireNonNull(eventModelsSupplier);
Objects.requireNonNull(curvesSupplier);
Objects.requireNonNull(workingVariantId);
Objects.requireNonNull(parameters);
- Objects.requireNonNull(reporter);
+ Objects.requireNonNull(reportNode);
- Reporter dsReporter = DynawaltzReports.createDynaWaltzReporter(reporter, network.getId());
+ ReportNode dsReportNode = DynawaltzReports.createDynaWaltzReportNode(reportNode, network.getId());
network.getVariantManager().setWorkingVariant(workingVariantId);
ExecutionEnvironment execEnv = new ExecutionEnvironment(Collections.emptyMap(), WORKING_DIR_PREFIX, config.isDebug());
DynawoUtil.requireDynaMinVersion(execEnv, computationManager, getVersionCommand(config), DynaWaltzConfig.DYNAWALTZ_LAUNCHER_PROGRAM_NAME, false);
DynaWaltzContext context = new DynaWaltzContext(network, workingVariantId,
- BlackBoxSupplierUtils.getBlackBoxModelList(dynamicModelsSupplier, network, dsReporter),
- BlackBoxSupplierUtils.getBlackBoxModelList(eventModelsSupplier, network, dsReporter),
+ BlackBoxSupplierUtils.getBlackBoxModelList(dynamicModelsSupplier, network, dsReportNode),
+ BlackBoxSupplierUtils.getBlackBoxModelList(eventModelsSupplier, network, dsReportNode),
curvesSupplier.get(network),
parameters,
DynaWaltzParameters.load(parameters),
- reporter);
+ reportNode);
- return computationManager.execute(execEnv, new DynaWaltzHandler(context, getCommand(config), reporter));
+ return computationManager.execute(execEnv, new DynaWaltzHandler(context, getCommand(config), reportNode));
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynawaltzReports.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynawaltzReports.java
index 927db67a4..f2e65a340 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynawaltzReports.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/DynawaltzReports.java
@@ -7,9 +7,8 @@
*/
package com.powsybl.dynawaltz;
-import com.powsybl.commons.reporter.Report;
-import com.powsybl.commons.reporter.Reporter;
-import com.powsybl.commons.reporter.TypedValue;
+import com.powsybl.commons.report.ReportNode;
+import com.powsybl.commons.report.TypedValue;
/**
* @author Laurent Issertial {@literal }
@@ -19,62 +18,58 @@ public final class DynawaltzReports {
private DynawaltzReports() {
}
- public static Reporter createDynaWaltzReporter(Reporter reporter, String networkId) {
- return reporter.createSubReporter("dynawaltz",
- "Dynawaltz dynamic simulation on network '${networkId}'",
- "networkId", networkId);
+ public static ReportNode createDynaWaltzReportNode(ReportNode reportNode, String networkId) {
+ return reportNode.newReportNode()
+ .withMessageTemplate("dynawaltz", "Dynawaltz dynamic simulation on network '${networkId}'")
+ .withUntypedValue("networkId", networkId)
+ .add();
}
- public static Reporter createDynaWaltzContextReporter(Reporter reporter) {
- return reporter.createSubReporter("dynawaltzContext",
- "Dynawaltz models processing");
+ public static ReportNode createDynaWaltzContextReportNode(ReportNode reportNode) {
+ return reportNode.newReportNode()
+ .withMessageTemplate("dynawaltzContext", "Dynawaltz models processing")
+ .add();
}
- public static Reporter createDynaWaltzTimelineReporter(Reporter reporter) {
- return reporter.createSubReporter("dynawaltzTimeline",
- "Dynawaltz Timeline");
- }
-
- public static void reportDuplicateStaticId(Reporter reporter, String duplicateId, String modelName, String dynamicId) {
- reporter.report(Report.builder()
- .withKey("duplicateStaticId")
- .withDefaultMessage("Duplicate static id found: ${duplicateId} -> model ${modelName} ${dynamicId} will be skipped")
- .withValue("duplicateId", duplicateId)
- .withValue("modelName", modelName)
- .withValue("dynamicId", dynamicId)
+ public static void reportDuplicateStaticId(ReportNode reportNode, String duplicateId, String modelName, String dynamicId) {
+ reportNode.newReportNode()
+ .withMessageTemplate("duplicateStaticId", "Duplicate static id found: ${duplicateId} -> model ${modelName} ${dynamicId} will be skipped")
+ .withUntypedValue("duplicateId", duplicateId)
+ .withUntypedValue("modelName", modelName)
+ .withUntypedValue("dynamicId", dynamicId)
.withSeverity(TypedValue.WARN_SEVERITY)
- .build());
+ .add();
}
- public static void reportDuplicateDynamicId(Reporter reporter, String duplicateId, String modelName) {
- reporter.report(Report.builder()
- .withKey("duplicateDynamicId")
- .withDefaultMessage("Duplicate dynamic id found: ${duplicateId} -> model ${modelName} will be skipped")
- .withValue("duplicateId", duplicateId)
- .withValue("modelName", modelName)
+ public static void reportDuplicateDynamicId(ReportNode reportNode, String duplicateId, String modelName) {
+ reportNode.newReportNode()
+ .withMessageTemplate("duplicateDynamicId",
+ "Duplicate dynamic id found: ${duplicateId} -> model ${modelName} will be skipped")
+ .withUntypedValue("duplicateId", duplicateId)
+ .withUntypedValue("modelName", modelName)
.withSeverity(TypedValue.WARN_SEVERITY)
- .build());
+ .add();
}
- public static void reportEmptyAutomaton(Reporter reporter, String automatonName, String dynamicId, String expectedModels) {
- reporter.report(Report.builder()
- .withKey("emptyAutomaton")
- .withDefaultMessage("${automatonName} ${dynamicId} equipment is not a ${expectedModels}, the automation system will be skipped")
- .withValue("automatonName", automatonName)
- .withValue("dynamicId", dynamicId)
- .withValue("expectedModels", expectedModels)
+ public static void reportEmptyAutomaton(ReportNode reportNode, String automatonName, String dynamicId, String expectedModels) {
+ reportNode.newReportNode()
+ .withMessageTemplate("emptyAutomaton",
+ "${automatonName} ${dynamicId} equipment is not a ${expectedModels}, the automation system will be skipped")
+ .withUntypedValue("automatonName", automatonName)
+ .withUntypedValue("dynamicId", dynamicId)
+ .withUntypedValue("expectedModels", expectedModels)
.withSeverity(TypedValue.WARN_SEVERITY)
- .build());
+ .add();
}
- public static void reportEmptyListAutomaton(Reporter reporter, String automatonName, String dynamicId, String expectedModels) {
- reporter.report(Report.builder()
- .withKey("emptyListAutomaton")
- .withDefaultMessage("None of ${automatonName} ${dynamicId} equipments are ${expectedModels}, the automation system will be skipped")
- .withValue("automatonName", automatonName)
- .withValue("dynamicId", dynamicId)
- .withValue("expectedModels", expectedModels)
+ public static void reportEmptyListAutomaton(ReportNode reportNode, String automatonName, String dynamicId, String expectedModels) {
+ reportNode.newReportNode()
+ .withMessageTemplate("emptyListAutomaton",
+ "None of ${automatonName} ${dynamicId} equipments are ${expectedModels}, the automation system will be skipped")
+ .withUntypedValue("automatonName", automatonName)
+ .withUntypedValue("dynamicId", dynamicId)
+ .withUntypedValue("expectedModels", expectedModels)
.withSeverity(TypedValue.WARN_SEVERITY)
- .build());
+ .add();
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/ModelsSimplifier.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/ModelsSimplifier.java
index b616f6e31..9e15b52df 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/ModelsSimplifier.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/ModelsSimplifier.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.models.BlackBoxModel;
import com.powsybl.iidm.network.Network;
@@ -18,5 +18,5 @@
*/
public interface ModelsSimplifier {
- Stream simplifyModels(Stream models, Network network, DynaWaltzParameters dynaWaltzParameters, Reporter reporter);
+ Stream simplifyModels(Stream models, Network network, DynaWaltzParameters dynaWaltzParameters, ReportNode reportNode);
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/AbstractDynamicModelBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/AbstractDynamicModelBuilder.java
index 35205f032..ff1a62574 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/AbstractDynamicModelBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/AbstractDynamicModelBuilder.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.builders;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.iidm.network.Network;
import java.util.Objects;
@@ -18,12 +18,12 @@
public abstract class AbstractDynamicModelBuilder {
protected final Network network;
- protected final Reporter reporter;
+ protected final ReportNode reportNode;
protected boolean isInstantiable = true;
- protected AbstractDynamicModelBuilder(Network network, Reporter reporter) {
+ protected AbstractDynamicModelBuilder(Network network, ReportNode reportNode) {
this.network = Objects.requireNonNull(network);
- this.reporter = Objects.requireNonNull(reporter);
+ this.reportNode = Objects.requireNonNull(reportNode);
}
protected abstract void checkData();
@@ -31,9 +31,9 @@ protected AbstractDynamicModelBuilder(Network network, Reporter reporter) {
protected final boolean isInstantiable() {
checkData();
if (isInstantiable) {
- Reporters.reportModelInstantiation(reporter, getModelId());
+ BuilderReports.reportModelInstantiation(reportNode, getModelId());
} else {
- Reporters.reportModelInstantiationFailure(reporter, getModelId());
+ BuilderReports.reportModelInstantiationFailure(reportNode, getModelId());
}
return isInstantiable;
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/AbstractEquipmentModelBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/AbstractEquipmentModelBuilder.java
index 437440ef2..54435c474 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/AbstractEquipmentModelBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/AbstractEquipmentModelBuilder.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.builders;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.iidm.network.Identifiable;
import com.powsybl.iidm.network.IdentifiableType;
import com.powsybl.iidm.network.Network;
@@ -24,14 +24,14 @@ public abstract class AbstractEquipmentModelBuilder, R
protected final ModelConfig modelConfig;
protected final BuilderEquipment builderEquipment;
- protected AbstractEquipmentModelBuilder(Network network, ModelConfig modelConfig, IdentifiableType equipmentType, Reporter reporter) {
- super(network, reporter);
+ protected AbstractEquipmentModelBuilder(Network network, ModelConfig modelConfig, IdentifiableType equipmentType, ReportNode reportNode) {
+ super(network, reportNode);
this.modelConfig = Objects.requireNonNull(modelConfig);
this.builderEquipment = new BuilderEquipment<>(equipmentType);
}
- protected AbstractEquipmentModelBuilder(Network network, ModelConfig modelConfig, String equipmentType, Reporter reporter) {
- super(network, reporter);
+ protected AbstractEquipmentModelBuilder(Network network, ModelConfig modelConfig, String equipmentType, ReportNode reportNode) {
+ super(network, reportNode);
this.modelConfig = modelConfig;
this.builderEquipment = new BuilderEquipment<>(equipmentType);
}
@@ -58,13 +58,13 @@ public R parameterSetId(String parameterSetId) {
@Override
protected void checkData() {
- isInstantiable = builderEquipment.checkEquipmentData(reporter);
+ isInstantiable = builderEquipment.checkEquipmentData(reportNode);
if (parameterSetId == null) {
- Reporters.reportFieldNotSet(reporter, "parameterSetId");
+ BuilderReports.reportFieldNotSet(reportNode, "parameterSetId");
isInstantiable = false;
}
if (dynamicModelId == null) {
- Reporters.reportFieldReplacement(reporter, "dynamicModelId", "staticId", builderEquipment.hasStaticId() ? builderEquipment.getStaticId() : "(unknown staticId)");
+ BuilderReports.reportFieldReplacement(reportNode, "dynamicModelId", "staticId", builderEquipment.hasStaticId() ? builderEquipment.getStaticId() : "(unknown staticId)");
dynamicModelId = builderEquipment.getStaticId();
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderConfig.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderConfig.java
index 95106acbe..d5e3a3ef1 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderConfig.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderConfig.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.builders;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynamicsimulation.DynamicModel;
import com.powsybl.iidm.network.Network;
@@ -21,7 +21,7 @@ public class BuilderConfig {
@FunctionalInterface
public interface ModelBuilderConstructor {
- ModelBuilder createBuilder(Network network, String lib, Reporter reporter);
+ ModelBuilder createBuilder(Network network, String lib, ReportNode reportNode);
}
private final ModelBuilderConstructor builderConstructor;
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderEquipment.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderEquipment.java
index 1030b2a2a..fa6e6452a 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderEquipment.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderEquipment.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.builders;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.iidm.network.Identifiable;
import com.powsybl.iidm.network.IdentifiableType;
@@ -64,15 +64,15 @@ public void addEquipment(T equipment, Predicate equipmentChecker) {
}
}
- public boolean checkEquipmentData(Reporter reporter) {
+ public boolean checkEquipmentData(ReportNode reportNode) {
if (!hasStaticId()) {
- Reporters.reportFieldNotSet(reporter, fieldName);
+ BuilderReports.reportFieldNotSet(reportNode, fieldName);
return false;
} else if (equipment == null) {
if (fromStaticId) {
- Reporters.reportStaticIdUnknown(reporter, fieldName, staticId, equipmentType);
+ BuilderReports.reportStaticIdUnknown(reportNode, fieldName, staticId, equipmentType);
} else {
- Reporters.reportDifferentNetwork(reporter, EQUIPMENT_FIELD_NAME, staticId, equipmentType);
+ BuilderReports.reportDifferentNetwork(reportNode, EQUIPMENT_FIELD_NAME, staticId, equipmentType);
}
return false;
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderEquipmentsList.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderEquipmentsList.java
index f69cbbe6d..53d3bb6eb 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderEquipmentsList.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderEquipmentsList.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.builders;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.iidm.network.Identifiable;
import com.powsybl.iidm.network.IdentifiableType;
@@ -57,21 +57,21 @@ public void addEquipments(Iterable staticIds, Function equipm
});
}
- public boolean checkEquipmentData(Reporter reporter) {
+ public boolean checkEquipmentData(ReportNode reportNode) {
boolean emptyList = equipments.isEmpty();
if (missingEquipmentIds.isEmpty() && emptyList) {
- Reporters.reportFieldNotSet(reporter, fieldName);
+ BuilderReports.reportFieldNotSet(reportNode, fieldName);
return false;
} else if (!missingIdsHasDynamicIds) {
missingEquipmentIds.forEach(missingId ->
- Reporters.reportStaticIdUnknown(reporter, fieldName, missingId, equipmentType));
+ BuilderReports.reportStaticIdUnknown(reportNode, fieldName, missingId, equipmentType));
if (emptyList) {
- Reporters.reportEmptyList(reporter, fieldName);
+ BuilderReports.reportEmptyList(reportNode, fieldName);
}
return !emptyList;
} else {
missingEquipmentIds.forEach(missingId ->
- Reporters.reportUnknownStaticIdHandling(reporter, fieldName, missingId, equipmentType));
+ BuilderReports.reportUnknownStaticIdHandling(reportNode, fieldName, missingId, equipmentType));
return true;
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderReports.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderReports.java
new file mode 100644
index 000000000..19f6791c4
--- /dev/null
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/BuilderReports.java
@@ -0,0 +1,124 @@
+/**
+ * Copyright (c) 2023, RTE (http://www.rte-france.com/)
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ * SPDX-License-Identifier: MPL-2.0
+ */
+package com.powsybl.dynawaltz.builders;
+
+import com.powsybl.commons.report.ReportNode;
+import com.powsybl.commons.report.TypedValue;
+import com.powsybl.iidm.network.IdentifiableType;
+
+/**
+ * @author Laurent Issertial {@literal }
+ */
+public final class BuilderReports {
+
+ private static final String FIELD_NAME = "fieldName";
+
+ private BuilderReports() {
+ }
+
+ public static void reportLibNotFound(ReportNode reportNode, String builderName, String lib) {
+ reportNode.newReportNode()
+ .withMessageTemplate("libNotFound", "Library ${lib} not found for ${builderName}")
+ .withUntypedValue("builderName", builderName)
+ .withUntypedValue("lib", lib)
+ .withSeverity(TypedValue.INFO_SEVERITY)
+ .add();
+ }
+
+ public static void reportModelInstantiation(ReportNode reportNode, String dynamicId) {
+ reportNode.newReportNode()
+ .withMessageTemplate("modelInstantiation", "Model ${dynamicId} instantiation successful")
+ .withUntypedValue("dynamicId", dynamicId)
+ .withSeverity(TypedValue.TRACE_SEVERITY)
+ .add();
+ }
+
+ public static void reportModelInstantiationFailure(ReportNode reportNode, String dynamicId) {
+ reportNode.newReportNode()
+ .withMessageTemplate("modelInstantiation", "Model ${dynamicId} cannot be instantiated")
+ .withUntypedValue("dynamicId", dynamicId)
+ .withSeverity(TypedValue.WARN_SEVERITY)
+ .add();
+ }
+
+ public static void reportFieldReplacement(ReportNode reportNode, String fieldName, String replacementName, String replacement) {
+ reportNode.newReportNode()
+ .withMessageTemplate("fieldReplacement", "'${fieldName}' field is not set, ${replacementName} ${replacement} will be used instead")
+ .withUntypedValue(FIELD_NAME, fieldName)
+ .withUntypedValue("replacementName", replacementName)
+ .withUntypedValue("replacement", replacement)
+ .withSeverity(TypedValue.TRACE_SEVERITY)
+ .add();
+ }
+
+ public static void reportFieldNotSet(ReportNode reportNode, String fieldName) {
+ reportNode.newReportNode()
+ .withMessageTemplate("fieldNotSet", "'${fieldName}' field is not set")
+ .withUntypedValue(FIELD_NAME, fieldName)
+ .withSeverity(TypedValue.WARN_SEVERITY)
+ .add();
+ }
+
+ public static void reportStaticIdUnknown(ReportNode reportNode, String fieldName, String staticId, String equipmentType) {
+ reportNode.newReportNode()
+ .withMessageTemplate("unknownStaticIdToDynamic", "'${fieldName}' field value '${staticId}' not found for equipment type(s) ${equipmentType}")
+ .withUntypedValue("equipmentType", equipmentType)
+ .withUntypedValue(FIELD_NAME, fieldName)
+ .withUntypedValue("staticId", staticId)
+ .withSeverity(TypedValue.WARN_SEVERITY)
+ .add();
+ }
+
+ public static void reportDifferentNetwork(ReportNode reportNode, String fieldName, String staticId, String equipmentType) {
+ reportNode.newReportNode()
+ .withMessageTemplate("wrongNetwork", "'${fieldName}' field value ${equipmentType} ${staticId} does not belong to the builder network")
+ .withUntypedValue("equipmentType", equipmentType)
+ .withUntypedValue(FIELD_NAME, fieldName)
+ .withUntypedValue("staticId", staticId)
+ .withSeverity(TypedValue.WARN_SEVERITY)
+ .add();
+ }
+
+ public static void reportUnknownStaticIdHandling(ReportNode reportNode, String fieldName, String staticId, String equipmentType) {
+ reportNode.newReportNode()
+ .withMessageTemplate("staticIdUnknown", "'${fieldName}' field value '${staticId}' not found for equipment type(s) ${equipmentType}, id will be used as pure dynamic model id")
+ .withUntypedValue("equipmentType", equipmentType)
+ .withUntypedValue(FIELD_NAME, fieldName).withUntypedValue("staticId", staticId)
+ .withSeverity(TypedValue.INFO_SEVERITY)
+ .add();
+ }
+
+ public static void reportCrossThreshold(ReportNode reportNode, String fieldName, double fieldValue, String threshold) {
+ reportNode.newReportNode()
+ .withMessageTemplate("crossThreshold", "${fieldName} should be ${threshold} (${fieldValue})")
+ .withUntypedValue(FIELD_NAME, fieldName)
+ .withUntypedValue("fieldValue", fieldValue)
+ .withUntypedValue("threshold", threshold)
+ .withSeverity(TypedValue.WARN_SEVERITY).add();
+ }
+
+ public static void reportEmptyList(ReportNode reportNode, String fieldName) {
+ reportNode.newReportNode()
+ .withMessageTemplate("emptyList", "'${fieldName}' list is empty")
+ .withUntypedValue(FIELD_NAME, fieldName)
+ .withSeverity(TypedValue.WARN_SEVERITY)
+ .add();
+ }
+
+ public static void reportFieldSetWithWrongEquipment(ReportNode reportNode, String fieldName, IdentifiableType equipmentType, String staticId) {
+ reportFieldSetWithWrongEquipment(reportNode, fieldName, equipmentType.toString() + " " + staticId);
+ }
+
+ public static void reportFieldSetWithWrongEquipment(ReportNode reportNode, String fieldName, String equipment) {
+ reportNode.newReportNode()
+ .withMessageTemplate("fieldSetWithWrongEquipment", "'${fieldName}' field is set but ${equipment} does not possess this option")
+ .withUntypedValue(FIELD_NAME, fieldName).withUntypedValue("equipment", equipment).withSeverity(TypedValue.WARN_SEVERITY)
+ .add();
+ }
+
+}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/EventBuilderConfig.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/EventBuilderConfig.java
index 56c78381d..9f095b4c9 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/EventBuilderConfig.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/EventBuilderConfig.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.builders;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynamicsimulation.EventModel;
import com.powsybl.iidm.network.Network;
@@ -18,7 +18,7 @@ public class EventBuilderConfig {
@FunctionalInterface
public interface EventModelBuilderConstructor {
- ModelBuilder createBuilder(Network network, Reporter reporter);
+ ModelBuilder createBuilder(Network network, ReportNode reportNode);
}
private final EventModelBuilderConstructor builderConstructor;
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/Reporters.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/Reporters.java
deleted file mode 100644
index 3e8ac3941..000000000
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/builders/Reporters.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * Copyright (c) 2023, RTE (http://www.rte-france.com/)
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- * SPDX-License-Identifier: MPL-2.0
- */
-package com.powsybl.dynawaltz.builders;
-
-import com.powsybl.commons.reporter.Report;
-import com.powsybl.commons.reporter.Reporter;
-import com.powsybl.commons.reporter.TypedValue;
-import com.powsybl.iidm.network.IdentifiableType;
-
-/**
- * @author Laurent Issertial {@literal }
- */
-public final class Reporters {
-
- private static final String FIELD_NAME = "fieldName";
-
- private Reporters() {
- }
-
- public static void reportLibNotFound(Reporter reporter, String builderName, String lib) {
- reporter.report(Report.builder()
- .withKey("libNotFound")
- .withDefaultMessage("Library ${lib} not found for ${builderName}")
- .withValue("builderName", builderName)
- .withValue("lib", lib)
- .withSeverity(TypedValue.INFO_SEVERITY)
- .build());
- }
-
- public static void reportModelInstantiation(Reporter reporter, String dynamicId) {
- reporter.report(Report.builder()
- .withKey("modelInstantiation")
- .withDefaultMessage("Model ${dynamicId} instantiation successful")
- .withValue("dynamicId", dynamicId)
- .withSeverity(TypedValue.TRACE_SEVERITY)
- .build());
- }
-
- public static void reportModelInstantiationFailure(Reporter reporter, String dynamicId) {
- reporter.report(Report.builder()
- .withKey("modelInstantiation")
- .withDefaultMessage("Model ${dynamicId} cannot be instantiated")
- .withValue("dynamicId", dynamicId)
- .withSeverity(TypedValue.WARN_SEVERITY)
- .build());
- }
-
- public static void reportFieldReplacement(Reporter reporter, String fieldName, String replacementName, String replacement) {
- reporter.report(Report.builder()
- .withKey("fieldReplacement")
- .withDefaultMessage("'${fieldName}' field is not set, ${replacementName} ${replacement} will be used instead")
- .withValue(FIELD_NAME, fieldName)
- .withValue("replacementName", replacementName)
- .withValue("replacement", replacement)
- .withSeverity(TypedValue.TRACE_SEVERITY)
- .build());
- }
-
- public static void reportFieldNotSet(Reporter reporter, String fieldName) {
- reporter.report(Report.builder()
- .withKey("fieldNotSet")
- .withDefaultMessage("'${fieldName}' field is not set")
- .withValue(FIELD_NAME, fieldName)
- .withSeverity(TypedValue.WARN_SEVERITY)
- .build());
- }
-
- public static void reportStaticIdUnknown(Reporter reporter, String fieldName, String staticId, String equipmentType) {
- reporter.report(Report.builder()
- .withKey("unknownStaticIdToDynamic")
- .withDefaultMessage("'${fieldName}' field value '${staticId}' not found for equipment type(s) ${equipmentType}")
- .withValue("equipmentType", equipmentType)
- .withValue(FIELD_NAME, fieldName)
- .withValue("staticId", staticId)
- .withSeverity(TypedValue.WARN_SEVERITY)
- .build());
- }
-
- public static void reportDifferentNetwork(Reporter reporter, String fieldName, String staticId, String equipmentType) {
- reporter.report(Report.builder()
- .withKey("wrongNetwork")
- .withDefaultMessage("'${fieldName}' field value ${equipmentType} ${staticId} does not belong to the builder network")
- .withValue("equipmentType", equipmentType)
- .withValue(FIELD_NAME, fieldName)
- .withValue("staticId", staticId)
- .withSeverity(TypedValue.WARN_SEVERITY)
- .build());
- }
-
- public static void reportUnknownStaticIdHandling(Reporter reporter, String fieldName, String staticId, String equipmentType) {
- reporter.report(Report.builder()
- .withKey("staticIdUnknown")
- .withDefaultMessage("'${fieldName}' field value '${staticId}' not found for equipment type(s) ${equipmentType}, id will be used as pure dynamic model id")
- .withValue("equipmentType", equipmentType)
- .withValue(FIELD_NAME, fieldName).withValue("staticId", staticId)
- .withSeverity(TypedValue.INFO_SEVERITY)
- .build());
- }
-
- public static void reportCrossThreshold(Reporter reporter, String fieldName, double fieldValue, String threshold) {
- reporter.report(Report.builder()
- .withKey("crossThreshold")
- .withDefaultMessage("${fieldName} should be ${threshold} (${fieldValue})")
- .withValue(FIELD_NAME, fieldName)
- .withValue("fieldValue", fieldValue)
- .withValue("threshold", threshold)
- .withSeverity(TypedValue.WARN_SEVERITY).build());
- }
-
- public static void reportEmptyList(Reporter reporter, String fieldName) {
- reporter.report(Report.builder()
- .withKey("emptyList")
- .withDefaultMessage("'${fieldName}' list is empty")
- .withValue(FIELD_NAME, fieldName)
- .withSeverity(TypedValue.WARN_SEVERITY)
- .build());
- }
-
- public static void reportFieldSetWithWrongEquipment(Reporter reporter, String fieldName, IdentifiableType equipmentType, String staticId) {
- reportFieldSetWithWrongEquipment(reporter, fieldName, equipmentType.toString() + " " + staticId);
- }
-
- public static void reportFieldSetWithWrongEquipment(Reporter reporter, String fieldName, String equipment) {
- reporter.report(Report.builder()
- .withKey("fieldSetWithWrongEquipment")
- .withDefaultMessage("'${fieldName}' field is set but ${equipment} does not possess this option")
- .withValue(FIELD_NAME, fieldName).withValue("equipment", equipment).withSeverity(TypedValue.WARN_SEVERITY)
- .build());
- }
-
-}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/AbstractAutomationSystemModelBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/AbstractAutomationSystemModelBuilder.java
index b33ae3736..53a691109 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/AbstractAutomationSystemModelBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/AbstractAutomationSystemModelBuilder.java
@@ -7,12 +7,12 @@
*/
package com.powsybl.dynawaltz.models.automationsystems;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynamicsimulation.DynamicModel;
import com.powsybl.dynawaltz.builders.AbstractDynamicModelBuilder;
import com.powsybl.dynawaltz.builders.ModelBuilder;
import com.powsybl.dynawaltz.builders.ModelConfig;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Objects;
@@ -26,8 +26,8 @@ public abstract class AbstractAutomationSystemModelBuilder getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected TapChangerAutomationSystemBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected TapChangerAutomationSystemBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
load = new BuilderEquipment<>(IdentifiableType.LOAD);
}
@@ -70,7 +70,7 @@ public TapChangerAutomationSystemBuilder side(TransformerSide side) {
@Override
protected void checkData() {
super.checkData();
- isInstantiable &= load.checkEquipmentData(reporter);
+ isInstantiable &= load.checkEquipmentData(reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/TapChangerBlockingAutomationSystem.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/TapChangerBlockingAutomationSystem.java
index 42c5586ca..c6db675c3 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/TapChangerBlockingAutomationSystem.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/TapChangerBlockingAutomationSystem.java
@@ -86,7 +86,7 @@ public void createMacroConnections(MacroConnectionsAdder adder) {
}
} else {
isConnected = false;
- DynawaltzReports.reportEmptyListAutomaton(adder.getReporter(), this.getName(), getDynamicModelId(), TapChangerModel.class.getSimpleName());
+ DynawaltzReports.reportEmptyListAutomaton(adder.getReportNode(), this.getName(), getDynamicModelId(), TapChangerModel.class.getSimpleName());
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/TapChangerBlockingAutomationSystemBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/TapChangerBlockingAutomationSystemBuilder.java
index 85c698864..1147038a9 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/TapChangerBlockingAutomationSystemBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/TapChangerBlockingAutomationSystemBuilder.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.models.automationsystems;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.*;
import com.powsybl.iidm.network.*;
@@ -30,32 +30,32 @@ public class TapChangerBlockingAutomationSystemBuilder extends AbstractAutomatio
private final BuilderIdListEquipmentList> uMeasurementPoints;
public static TapChangerBlockingAutomationSystemBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static TapChangerBlockingAutomationSystemBuilder of(Network network, Reporter reporter) {
- return new TapChangerBlockingAutomationSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static TapChangerBlockingAutomationSystemBuilder of(Network network, ReportNode reportNode) {
+ return new TapChangerBlockingAutomationSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static TapChangerBlockingAutomationSystemBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static TapChangerBlockingAutomationSystemBuilder of(Network network, String lib, Reporter reporter) {
+ public static TapChangerBlockingAutomationSystemBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, TapChangerBlockingAutomationSystemBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, TapChangerBlockingAutomationSystemBuilder.class.getSimpleName(), lib);
return null;
}
- return new TapChangerBlockingAutomationSystemBuilder(network, modelConfig, reporter);
+ return new TapChangerBlockingAutomationSystemBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected TapChangerBlockingAutomationSystemBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected TapChangerBlockingAutomationSystemBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
tapChangerEquipments = new BuilderEquipmentsList<>(TAP_CHANGER_TYPE, TRANSFORMER_FIELD, true);
uMeasurementPoints = new BuilderIdListEquipmentList<>(MEASUREMENT_POINT_TYPE, U_MEASUREMENTS_FIELD);
}
@@ -93,8 +93,8 @@ public TapChangerBlockingAutomationSystemBuilder uMeasurements(Collection generator;
public static UnderVoltageAutomationSystemBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static UnderVoltageAutomationSystemBuilder of(Network network, Reporter reporter) {
- return new UnderVoltageAutomationSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static UnderVoltageAutomationSystemBuilder of(Network network, ReportNode reportNode) {
+ return new UnderVoltageAutomationSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static UnderVoltageAutomationSystemBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static UnderVoltageAutomationSystemBuilder of(Network network, String lib, Reporter reporter) {
+ public static UnderVoltageAutomationSystemBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, UnderVoltageAutomationSystemBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, UnderVoltageAutomationSystemBuilder.class.getSimpleName(), lib);
return null;
}
- return new UnderVoltageAutomationSystemBuilder(network, MODEL_CONFIGS.getModelConfig(lib), reporter);
+ return new UnderVoltageAutomationSystemBuilder(network, MODEL_CONFIGS.getModelConfig(lib), reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected UnderVoltageAutomationSystemBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected UnderVoltageAutomationSystemBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
generator = new BuilderEquipment<>(IdentifiableType.GENERATOR, "generator");
}
@@ -67,7 +67,7 @@ public UnderVoltageAutomationSystemBuilder generator(String staticId) {
@Override
protected void checkData() {
super.checkData();
- isInstantiable &= generator.checkEquipmentData(reporter);
+ isInstantiable &= generator.checkEquipmentData(reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/AbstractOverloadManagementSystemBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/AbstractOverloadManagementSystemBuilder.java
index 3df825d9c..3e58043fc 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/AbstractOverloadManagementSystemBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/AbstractOverloadManagementSystemBuilder.java
@@ -7,10 +7,10 @@
*/
package com.powsybl.dynawaltz.models.automationsystems.overloadmanagments;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.BuilderEquipment;
import com.powsybl.dynawaltz.builders.ModelConfig;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.dynawaltz.models.automationsystems.AbstractAutomationSystemModelBuilder;
import com.powsybl.iidm.network.Branch;
import com.powsybl.iidm.network.Network;
@@ -27,8 +27,8 @@ public abstract class AbstractOverloadManagementSystemBuilder> controlledEquipment;
- protected AbstractOverloadManagementSystemBuilder(Network network, ModelConfig modelConfig, Reporter reporter, BuilderEquipment> iMeasurement, BuilderEquipment> controlledEquipment) {
- super(network, modelConfig, reporter);
+ protected AbstractOverloadManagementSystemBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode, BuilderEquipment> iMeasurement, BuilderEquipment> controlledEquipment) {
+ super(network, modelConfig, reportNode);
this.iMeasurement = iMeasurement;
this.controlledEquipment = controlledEquipment;
}
@@ -41,10 +41,10 @@ public T controlledBranch(String staticId) {
@Override
protected void checkData() {
super.checkData();
- isInstantiable &= controlledEquipment.checkEquipmentData(reporter);
- isInstantiable &= iMeasurement.checkEquipmentData(reporter);
+ isInstantiable &= controlledEquipment.checkEquipmentData(reportNode);
+ isInstantiable &= iMeasurement.checkEquipmentData(reportNode);
if (iMeasurementSide == null) {
- Reporters.reportFieldNotSet(reporter, "iMeasurementSide");
+ BuilderReports.reportFieldNotSet(reportNode, "iMeasurementSide");
isInstantiable = false;
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/DynamicOverloadManagementSystemBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/DynamicOverloadManagementSystemBuilder.java
index 28e7f6d09..ea0bdd6ee 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/DynamicOverloadManagementSystemBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/DynamicOverloadManagementSystemBuilder.java
@@ -7,12 +7,12 @@
*/
package com.powsybl.dynawaltz.models.automationsystems.overloadmanagments;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.BuilderEquipment;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import com.powsybl.iidm.network.TwoSides;
@@ -27,32 +27,32 @@ public class DynamicOverloadManagementSystemBuilder extends AbstractOverloadMana
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static DynamicOverloadManagementSystemBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static DynamicOverloadManagementSystemBuilder of(Network network, Reporter reporter) {
- return new DynamicOverloadManagementSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static DynamicOverloadManagementSystemBuilder of(Network network, ReportNode reportNode) {
+ return new DynamicOverloadManagementSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static DynamicOverloadManagementSystemBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static DynamicOverloadManagementSystemBuilder of(Network network, String lib, Reporter reporter) {
+ public static DynamicOverloadManagementSystemBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, DynamicOverloadManagementSystemBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, DynamicOverloadManagementSystemBuilder.class.getSimpleName(), lib);
return null;
}
- return new DynamicOverloadManagementSystemBuilder(network, modelConfig, reporter);
+ return new DynamicOverloadManagementSystemBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected DynamicOverloadManagementSystemBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter, new BuilderEquipment<>(BRANCH_TYPE, "iMeasurement"),
+ protected DynamicOverloadManagementSystemBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode, new BuilderEquipment<>(BRANCH_TYPE, "iMeasurement"),
new BuilderEquipment<>(BRANCH_TYPE, "controlledBranch"));
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/DynamicTwoLevelsOverloadManagementSystemBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/DynamicTwoLevelsOverloadManagementSystemBuilder.java
index 47c384fac..f3650abe4 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/DynamicTwoLevelsOverloadManagementSystemBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/overloadmanagments/DynamicTwoLevelsOverloadManagementSystemBuilder.java
@@ -7,12 +7,12 @@
*/
package com.powsybl.dynawaltz.models.automationsystems.overloadmanagments;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.BuilderEquipment;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Branch;
import com.powsybl.iidm.network.Network;
import com.powsybl.iidm.network.TwoSides;
@@ -31,32 +31,32 @@ public class DynamicTwoLevelsOverloadManagementSystemBuilder extends AbstractOve
protected TwoSides iMeasurement2Side;
public static DynamicTwoLevelsOverloadManagementSystemBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static DynamicTwoLevelsOverloadManagementSystemBuilder of(Network network, Reporter reporter) {
- return new DynamicTwoLevelsOverloadManagementSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static DynamicTwoLevelsOverloadManagementSystemBuilder of(Network network, ReportNode reportNode) {
+ return new DynamicTwoLevelsOverloadManagementSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static DynamicTwoLevelsOverloadManagementSystemBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static DynamicTwoLevelsOverloadManagementSystemBuilder of(Network network, String lib, Reporter reporter) {
+ public static DynamicTwoLevelsOverloadManagementSystemBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, DynamicTwoLevelsOverloadManagementSystemBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, DynamicTwoLevelsOverloadManagementSystemBuilder.class.getSimpleName(), lib);
return null;
}
- return new DynamicTwoLevelsOverloadManagementSystemBuilder(network, modelConfig, reporter);
+ return new DynamicTwoLevelsOverloadManagementSystemBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected DynamicTwoLevelsOverloadManagementSystemBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter, new BuilderEquipment<>(BRANCH_TYPE, "iMeasurement1"),
+ protected DynamicTwoLevelsOverloadManagementSystemBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode, new BuilderEquipment<>(BRANCH_TYPE, "iMeasurement1"),
new BuilderEquipment<>(BRANCH_TYPE, "controlledBranch1"));
iMeasurement2 = new BuilderEquipment<>(BRANCH_TYPE, "iMeasurement2");
}
@@ -84,9 +84,9 @@ public DynamicTwoLevelsOverloadManagementSystemBuilder iMeasurement2Side(TwoSide
@Override
protected void checkData() {
super.checkData();
- isInstantiable &= iMeasurement2.checkEquipmentData(reporter);
+ isInstantiable &= iMeasurement2.checkEquipmentData(reportNode);
if (iMeasurement2Side == null) {
- Reporters.reportFieldNotSet(reporter, "iMeasurement2Side");
+ BuilderReports.reportFieldNotSet(reportNode, "iMeasurement2Side");
isInstantiable = false;
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/AbstractPhaseShifterModelBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/AbstractPhaseShifterModelBuilder.java
index 47f20e7a7..f2a8ade9d 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/AbstractPhaseShifterModelBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/AbstractPhaseShifterModelBuilder.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.models.automationsystems.phaseshifters;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.BuilderEquipment;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.models.automationsystems.AbstractAutomationSystemModelBuilder;
@@ -22,8 +22,8 @@ abstract class AbstractPhaseShifterModelBuilder transformer;
- protected AbstractPhaseShifterModelBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected AbstractPhaseShifterModelBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
transformer = new BuilderEquipment<>(IdentifiableType.TWO_WINDINGS_TRANSFORMER, "transformer");
}
@@ -35,6 +35,6 @@ public T transformer(String staticId) {
@Override
protected void checkData() {
super.checkData();
- isInstantiable &= transformer.checkEquipmentData(reporter);
+ isInstantiable &= transformer.checkEquipmentData(reportNode);
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/PhaseShifterIAutomationSystemBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/PhaseShifterIAutomationSystemBuilder.java
index 0d9dcaa22..c8e0cb55d 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/PhaseShifterIAutomationSystemBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/PhaseShifterIAutomationSystemBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.automationsystems.phaseshifters;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class PhaseShifterIAutomationSystemBuilder extends AbstractPhaseShifterMo
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static PhaseShifterIAutomationSystemBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static PhaseShifterIAutomationSystemBuilder of(Network network, Reporter reporter) {
- return new PhaseShifterIAutomationSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static PhaseShifterIAutomationSystemBuilder of(Network network, ReportNode reportNode) {
+ return new PhaseShifterIAutomationSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static PhaseShifterIAutomationSystemBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static PhaseShifterIAutomationSystemBuilder of(Network network, String lib, Reporter reporter) {
+ public static PhaseShifterIAutomationSystemBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, PhaseShifterIAutomationSystemBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, PhaseShifterIAutomationSystemBuilder.class.getSimpleName(), lib);
return null;
}
- return new PhaseShifterIAutomationSystemBuilder(network, modelConfig, reporter);
+ return new PhaseShifterIAutomationSystemBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected PhaseShifterIAutomationSystemBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected PhaseShifterIAutomationSystemBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/PhaseShifterPAutomationSystemBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/PhaseShifterPAutomationSystemBuilder.java
index 08661ef81..341b80859 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/PhaseShifterPAutomationSystemBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/automationsystems/phaseshifters/PhaseShifterPAutomationSystemBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.automationsystems.phaseshifters;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class PhaseShifterPAutomationSystemBuilder extends AbstractPhaseShifterMo
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static PhaseShifterPAutomationSystemBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static PhaseShifterPAutomationSystemBuilder of(Network network, Reporter reporter) {
- return new PhaseShifterPAutomationSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static PhaseShifterPAutomationSystemBuilder of(Network network, ReportNode reportNode) {
+ return new PhaseShifterPAutomationSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static PhaseShifterPAutomationSystemBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static PhaseShifterPAutomationSystemBuilder of(Network network, String lib, Reporter reporter) {
+ public static PhaseShifterPAutomationSystemBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, PhaseShifterPAutomationSystemBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, PhaseShifterPAutomationSystemBuilder.class.getSimpleName(), lib);
return null;
}
- return new PhaseShifterPAutomationSystemBuilder(network, modelConfig, reporter);
+ return new PhaseShifterPAutomationSystemBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected PhaseShifterPAutomationSystemBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected PhaseShifterPAutomationSystemBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/AbstractBusBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/AbstractBusBuilder.java
index 83b8f5651..6f6880fba 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/AbstractBusBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/AbstractBusBuilder.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.models.buses;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.AbstractEquipmentModelBuilder;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.iidm.network.Bus;
@@ -19,8 +19,8 @@
*/
public abstract class AbstractBusBuilder> extends AbstractEquipmentModelBuilder {
- protected AbstractBusBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, IdentifiableType.BUS, reporter);
+ protected AbstractBusBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, IdentifiableType.BUS, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/InfiniteBusBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/InfiniteBusBuilder.java
index f55f0eb60..bf050fb8e 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/InfiniteBusBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/InfiniteBusBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.buses;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class InfiniteBusBuilder extends AbstractBusBuilder {
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static InfiniteBusBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static InfiniteBusBuilder of(Network network, Reporter reporter) {
- return new InfiniteBusBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static InfiniteBusBuilder of(Network network, ReportNode reportNode) {
+ return new InfiniteBusBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static InfiniteBusBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static InfiniteBusBuilder of(Network network, String lib, Reporter reporter) {
+ public static InfiniteBusBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, InfiniteBusBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, InfiniteBusBuilder.class.getSimpleName(), lib);
return null;
}
- return new InfiniteBusBuilder(network, modelConfig, reporter);
+ return new InfiniteBusBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected InfiniteBusBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected InfiniteBusBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/StandardBusBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/StandardBusBuilder.java
index 953b5205b..271c4d7b0 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/StandardBusBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/buses/StandardBusBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.buses;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class StandardBusBuilder extends AbstractBusBuilder {
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static StandardBusBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static StandardBusBuilder of(Network network, Reporter reporter) {
- return new StandardBusBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static StandardBusBuilder of(Network network, ReportNode reportNode) {
+ return new StandardBusBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static StandardBusBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static StandardBusBuilder of(Network network, String lib, Reporter reporter) {
+ public static StandardBusBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, StandardBusBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, StandardBusBuilder.class.getSimpleName(), lib);
return null;
}
- return new StandardBusBuilder(network, modelConfig, reporter);
+ return new StandardBusBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected StandardBusBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected StandardBusBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/AbstractEventModelBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/AbstractEventModelBuilder.java
index 246016683..e9a528bc2 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/AbstractEventModelBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/AbstractEventModelBuilder.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.models.events;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynamicsimulation.EventModel;
import com.powsybl.dynawaltz.builders.*;
import com.powsybl.iidm.network.Identifiable;
@@ -23,8 +23,8 @@ abstract class AbstractEventModelBuilder, R extends Ab
protected String staticId;
protected Double startTime;
- protected AbstractEventModelBuilder(Network network, BuilderEquipment builderEquipment, Reporter reporter) {
- super(network, reporter);
+ protected AbstractEventModelBuilder(Network network, BuilderEquipment builderEquipment, ReportNode reportNode) {
+ super(network, reportNode);
this.builderEquipment = builderEquipment;
this.eventId = generateDefaultEventId();
}
@@ -42,9 +42,9 @@ public R startTime(double startTime) {
@Override
protected void checkData() {
- isInstantiable &= builderEquipment.checkEquipmentData(reporter);
+ isInstantiable &= builderEquipment.checkEquipmentData(reportNode);
if (startTime == null) {
- Reporters.reportFieldNotSet(reporter, "startTime");
+ BuilderReports.reportFieldNotSet(reportNode, "startTime");
isInstantiable = false;
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/EventActivePowerVariationBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/EventActivePowerVariationBuilder.java
index d52e041be..026c175d7 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/EventActivePowerVariationBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/EventActivePowerVariationBuilder.java
@@ -7,9 +7,9 @@
*/
package com.powsybl.dynawaltz.models.events;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.BuilderEquipment;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Injection;
import com.powsybl.iidm.network.Network;
@@ -23,15 +23,15 @@ public class EventActivePowerVariationBuilder extends AbstractEventModelBuilder<
protected Double deltaP;
public static EventActivePowerVariationBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static EventActivePowerVariationBuilder of(Network network, Reporter reporter) {
- return new EventActivePowerVariationBuilder(network, reporter);
+ public static EventActivePowerVariationBuilder of(Network network, ReportNode reportNode) {
+ return new EventActivePowerVariationBuilder(network, reportNode);
}
- EventActivePowerVariationBuilder(Network network, Reporter reporter) {
- super(network, new BuilderEquipment<>("GENERATOR/LOAD"), reporter);
+ EventActivePowerVariationBuilder(Network network, ReportNode reportNode) {
+ super(network, new BuilderEquipment<>("GENERATOR/LOAD"), reportNode);
}
public EventActivePowerVariationBuilder deltaP(double deltaP) {
@@ -43,7 +43,7 @@ public EventActivePowerVariationBuilder deltaP(double deltaP) {
protected void checkData() {
super.checkData();
if (deltaP == null) {
- Reporters.reportFieldNotSet(reporter, "deltaP");
+ BuilderReports.reportFieldNotSet(reportNode, "deltaP");
isInstantiable = false;
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/EventDisconnectionBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/EventDisconnectionBuilder.java
index df12f43ca..b54f65c5e 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/EventDisconnectionBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/EventDisconnectionBuilder.java
@@ -7,9 +7,9 @@
*/
package com.powsybl.dynawaltz.models.events;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.BuilderEquipment;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.*;
import java.util.EnumSet;
@@ -34,15 +34,15 @@ private enum DisconnectionType {
protected TwoSides disconnectSide = null;
public static EventDisconnectionBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static EventDisconnectionBuilder of(Network network, Reporter reporter) {
- return new EventDisconnectionBuilder(network, reporter);
+ public static EventDisconnectionBuilder of(Network network, ReportNode reportNode) {
+ return new EventDisconnectionBuilder(network, reportNode);
}
- EventDisconnectionBuilder(Network network, Reporter reporter) {
- super(network, new BuilderEquipment<>("Disconnectable equipment"), reporter);
+ EventDisconnectionBuilder(Network network, ReportNode reportNode) {
+ super(network, new BuilderEquipment<>("Disconnectable equipment"), reportNode);
}
public EventDisconnectionBuilder disconnectOnly(TwoSides side) {
@@ -76,11 +76,11 @@ protected void checkData() {
if (builderEquipment.hasEquipment()) {
setDisconnectionType(builderEquipment.getEquipment().getType());
if (disconnectionType == DisconnectionType.NONE) {
- Reporters.reportStaticIdUnknown(reporter, "staticId", builderEquipment.getStaticId(), "Disconnectable equipment");
+ BuilderReports.reportStaticIdUnknown(reportNode, "staticId", builderEquipment.getStaticId(), "Disconnectable equipment");
isInstantiable = false;
}
if (DisconnectionType.INJECTION == disconnectionType && disconnectSide != null) {
- Reporters.reportFieldSetWithWrongEquipment(reporter, "disconnectOnly", builderEquipment.getEquipment().getType(), builderEquipment.getStaticId());
+ BuilderReports.reportFieldSetWithWrongEquipment(reportNode, "disconnectOnly", builderEquipment.getEquipment().getType(), builderEquipment.getStaticId());
isInstantiable = false;
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/NodeFaultEventBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/NodeFaultEventBuilder.java
index 3ca8611e0..5bc39f4b9 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/NodeFaultEventBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/events/NodeFaultEventBuilder.java
@@ -7,9 +7,9 @@
*/
package com.powsybl.dynawaltz.models.events;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.BuilderEquipment;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Bus;
import com.powsybl.iidm.network.IdentifiableType;
import com.powsybl.iidm.network.Network;
@@ -26,15 +26,15 @@ public class NodeFaultEventBuilder extends AbstractEventModelBuilder(IdentifiableType.BUS), reporter);
+ NodeFaultEventBuilder(Network network, ReportNode reportNode) {
+ super(network, new BuilderEquipment<>(IdentifiableType.BUS), reportNode);
}
public NodeFaultEventBuilder faultTime(double faultTime) {
@@ -65,15 +65,15 @@ protected String getTag() {
protected void checkData() {
super.checkData();
if (faultTime <= 0) {
- Reporters.reportCrossThreshold(reporter, "faultTime", faultTime, "strictly positive");
+ BuilderReports.reportCrossThreshold(reportNode, "faultTime", faultTime, "strictly positive");
isInstantiable = false;
}
if (rPu < 0) {
- Reporters.reportCrossThreshold(reporter, "rPu", rPu, "positive");
+ BuilderReports.reportCrossThreshold(reportNode, "rPu", rPu, "positive");
isInstantiable = false;
}
if (xPu < 0) {
- Reporters.reportCrossThreshold(reporter, "xPu", xPu, "positive");
+ BuilderReports.reportCrossThreshold(reportNode, "xPu", xPu, "positive");
isInstantiable = false;
}
}
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/AbstractGeneratorBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/AbstractGeneratorBuilder.java
index f4c69a856..404386ff5 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/AbstractGeneratorBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/AbstractGeneratorBuilder.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.models.generators;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.AbstractEquipmentModelBuilder;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.iidm.network.Generator;
@@ -19,8 +19,8 @@
*/
public abstract class AbstractGeneratorBuilder> extends AbstractEquipmentModelBuilder {
- protected AbstractGeneratorBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, IdentifiableType.GENERATOR, reporter);
+ protected AbstractGeneratorBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, IdentifiableType.GENERATOR, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/GeneratorFictitiousBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/GeneratorFictitiousBuilder.java
index 94e03fe57..9023abdac 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/GeneratorFictitiousBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/GeneratorFictitiousBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.generators;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class GeneratorFictitiousBuilder extends AbstractGeneratorBuilder getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected GeneratorFictitiousBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected GeneratorFictitiousBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/GridFormingConverterBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/GridFormingConverterBuilder.java
index a36ee055e..eb6f27ea5 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/GridFormingConverterBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/GridFormingConverterBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.generators;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class GridFormingConverterBuilder extends AbstractGeneratorBuilder getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected GridFormingConverterBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected GridFormingConverterBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/SynchronizedGeneratorBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/SynchronizedGeneratorBuilder.java
index 182dad610..91284f660 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/SynchronizedGeneratorBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/SynchronizedGeneratorBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.generators;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class SynchronizedGeneratorBuilder extends AbstractGeneratorBuilder getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected SynchronizedGeneratorBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected SynchronizedGeneratorBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/SynchronousGeneratorBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/SynchronousGeneratorBuilder.java
index 0bb9d122b..0918c9a1e 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/SynchronousGeneratorBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/SynchronousGeneratorBuilder.java
@@ -8,11 +8,11 @@
package com.powsybl.dynawaltz.models.generators;
import com.powsybl.commons.PowsyblException;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -26,32 +26,32 @@ public class SynchronousGeneratorBuilder extends AbstractGeneratorBuilder getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected SynchronousGeneratorBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected SynchronousGeneratorBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
protected EnumGeneratorComponent getGeneratorComponent() {
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/WeccBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/WeccBuilder.java
index 58ef65203..884582a43 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/WeccBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/generators/WeccBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.generators;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class WeccBuilder extends AbstractGeneratorBuilder {
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static WeccBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static WeccBuilder of(Network network, Reporter reporter) {
- return new WeccBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static WeccBuilder of(Network network, ReportNode reportNode) {
+ return new WeccBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static WeccBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static WeccBuilder of(Network network, String lib, Reporter reporter) {
+ public static WeccBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, WeccBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, WeccBuilder.class.getSimpleName(), lib);
return null;
}
- return new WeccBuilder(network, modelConfig, reporter);
+ return new WeccBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected WeccBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected WeccBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/AbstractHvdcBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/AbstractHvdcBuilder.java
index 121819f84..cc5516997 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/AbstractHvdcBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/AbstractHvdcBuilder.java
@@ -7,10 +7,10 @@
*/
package com.powsybl.dynawaltz.models.hvdc;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.AbstractEquipmentModelBuilder;
import com.powsybl.dynawaltz.builders.ModelConfig;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.*;
/**
@@ -20,12 +20,12 @@ public abstract class AbstractHvdcBuilder {
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static HvdcPBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static HvdcPBuilder of(Network network, Reporter reporter) {
- return new HvdcPBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static HvdcPBuilder of(Network network, ReportNode reportNode) {
+ return new HvdcPBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static HvdcPBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static HvdcPBuilder of(Network network, String lib, Reporter reporter) {
+ public static HvdcPBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, HvdcPBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, HvdcPBuilder.class.getSimpleName(), lib);
return null;
}
- return new HvdcPBuilder(network, modelConfig, reporter);
+ return new HvdcPBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected HvdcPBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, IdentifiableType.HVDC_LINE, reporter);
+ protected HvdcPBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, IdentifiableType.HVDC_LINE, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/HvdcVscBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/HvdcVscBuilder.java
index ee8fdad6e..33d34382e 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/HvdcVscBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/hvdc/HvdcVscBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.hvdc;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.HvdcConverterStation;
import com.powsybl.iidm.network.HvdcLine;
import com.powsybl.iidm.network.IdentifiableType;
@@ -28,32 +28,32 @@ public class HvdcVscBuilder extends AbstractHvdcBuilder {
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static HvdcVscBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static HvdcVscBuilder of(Network network, Reporter reporter) {
- return new HvdcVscBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static HvdcVscBuilder of(Network network, ReportNode reportNode) {
+ return new HvdcVscBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static HvdcVscBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static HvdcVscBuilder of(Network network, String lib, Reporter reporter) {
+ public static HvdcVscBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, HvdcVscBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, HvdcVscBuilder.class.getSimpleName(), lib);
return null;
}
- return new HvdcVscBuilder(network, modelConfig, reporter);
+ return new HvdcVscBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected HvdcVscBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, "VSC " + IdentifiableType.HVDC_LINE, reporter);
+ protected HvdcVscBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, "VSC " + IdentifiableType.HVDC_LINE, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/lines/LineBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/lines/LineBuilder.java
index 652fa3248..3247d3ec8 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/lines/LineBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/lines/LineBuilder.java
@@ -7,12 +7,12 @@
*/
package com.powsybl.dynawaltz.models.lines;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.AbstractEquipmentModelBuilder;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.IdentifiableType;
import com.powsybl.iidm.network.Line;
import com.powsybl.iidm.network.Network;
@@ -28,32 +28,32 @@ public class LineBuilder extends AbstractEquipmentModelBuilder getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected LineBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, IdentifiableType.LINE, reporter);
+ protected LineBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, IdentifiableType.LINE, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/AbstractLoadModelBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/AbstractLoadModelBuilder.java
index 30d11a3c6..057442dd9 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/AbstractLoadModelBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/AbstractLoadModelBuilder.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.models.loads;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.AbstractEquipmentModelBuilder;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.iidm.network.IdentifiableType;
@@ -19,8 +19,8 @@
*/
public abstract class AbstractLoadModelBuilder> extends AbstractEquipmentModelBuilder {
- protected AbstractLoadModelBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, IdentifiableType.LOAD, reporter);
+ protected AbstractLoadModelBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, IdentifiableType.LOAD, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/BaseLoadBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/BaseLoadBuilder.java
index 0556d6a66..9dc771202 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/BaseLoadBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/BaseLoadBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.loads;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class BaseLoadBuilder extends AbstractLoadModelBuilder {
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static BaseLoadBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static BaseLoadBuilder of(Network network, Reporter reporter) {
- return new BaseLoadBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static BaseLoadBuilder of(Network network, ReportNode reportNode) {
+ return new BaseLoadBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static BaseLoadBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static BaseLoadBuilder of(Network network, String lib, Reporter reporter) {
+ public static BaseLoadBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, BaseLoadBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, BaseLoadBuilder.class.getSimpleName(), lib);
return null;
}
- return new BaseLoadBuilder(network, modelConfig, reporter);
+ return new BaseLoadBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected BaseLoadBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected BaseLoadBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadOneTransformerBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadOneTransformerBuilder.java
index 5f301e8e3..582d3b6d0 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadOneTransformerBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadOneTransformerBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.loads;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class LoadOneTransformerBuilder extends AbstractLoadModelBuilder getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected LoadOneTransformerBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected LoadOneTransformerBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadOneTransformerTapChangerBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadOneTransformerTapChangerBuilder.java
index 11145f24a..e89afd04d 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadOneTransformerTapChangerBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadOneTransformerTapChangerBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.loads;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class LoadOneTransformerTapChangerBuilder extends AbstractLoadModelBuilde
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static LoadOneTransformerTapChangerBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static LoadOneTransformerTapChangerBuilder of(Network network, Reporter reporter) {
- return new LoadOneTransformerTapChangerBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static LoadOneTransformerTapChangerBuilder of(Network network, ReportNode reportNode) {
+ return new LoadOneTransformerTapChangerBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static LoadOneTransformerTapChangerBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static LoadOneTransformerTapChangerBuilder of(Network network, String lib, Reporter reporter) {
+ public static LoadOneTransformerTapChangerBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, LoadOneTransformerTapChangerBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, LoadOneTransformerTapChangerBuilder.class.getSimpleName(), lib);
return null;
}
- return new LoadOneTransformerTapChangerBuilder(network, modelConfig, reporter);
+ return new LoadOneTransformerTapChangerBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected LoadOneTransformerTapChangerBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected LoadOneTransformerTapChangerBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadTwoTransformersBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadTwoTransformersBuilder.java
index d9a4faea1..fcfa723f6 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadTwoTransformersBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadTwoTransformersBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.loads;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class LoadTwoTransformersBuilder extends AbstractLoadModelBuilder getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected LoadTwoTransformersBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected LoadTwoTransformersBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadTwoTransformersTapChangersBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadTwoTransformersTapChangersBuilder.java
index 76c2e2b89..352591fdf 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadTwoTransformersTapChangersBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/loads/LoadTwoTransformersTapChangersBuilder.java
@@ -7,11 +7,11 @@
*/
package com.powsybl.dynawaltz.models.loads;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.Network;
import java.util.Set;
@@ -25,32 +25,32 @@ public class LoadTwoTransformersTapChangersBuilder extends AbstractLoadModelBuil
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static LoadTwoTransformersTapChangersBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static LoadTwoTransformersTapChangersBuilder of(Network network, Reporter reporter) {
- return new LoadTwoTransformersTapChangersBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static LoadTwoTransformersTapChangersBuilder of(Network network, ReportNode reportNode) {
+ return new LoadTwoTransformersTapChangersBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static LoadTwoTransformersTapChangersBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static LoadTwoTransformersTapChangersBuilder of(Network network, String lib, Reporter reporter) {
+ public static LoadTwoTransformersTapChangersBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, LoadTwoTransformersTapChangersBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, LoadTwoTransformersTapChangersBuilder.class.getSimpleName(), lib);
return null;
}
- return new LoadTwoTransformersTapChangersBuilder(network, modelConfig, reporter);
+ return new LoadTwoTransformersTapChangersBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected LoadTwoTransformersTapChangersBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, reporter);
+ protected LoadTwoTransformersTapChangersBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/macroconnections/MacroConnectionsAdder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/macroconnections/MacroConnectionsAdder.java
index 55c41e3f5..3d34b18bb 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/macroconnections/MacroConnectionsAdder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/macroconnections/MacroConnectionsAdder.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.models.macroconnections;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.models.BlackBoxModel;
import com.powsybl.dynawaltz.models.Model;
import com.powsybl.dynawaltz.models.VarConnection;
@@ -40,19 +40,19 @@ public interface PureDynamicModelGetter {
T getPureDynamicModel(String dynamicId, Class connectableClass, boolean throwException);
}
- private final Reporter reporter;
+ private final ReportNode reportNode;
private final DynamicModelGetter dynamicModelGetter;
private final PureDynamicModelGetter pureDynamicModelGetter;
private Consumer macroConnectAdder;
private BiConsumer> macroConnectorAdder;
public MacroConnectionsAdder(DynamicModelGetter dynamicModelGetter, PureDynamicModelGetter pureDynamicModelGetter, Consumer macroConnectAdder,
- BiConsumer> macroConnectorAdder, Reporter reporter) {
+ BiConsumer> macroConnectorAdder, ReportNode reportNode) {
this.dynamicModelGetter = dynamicModelGetter;
this.pureDynamicModelGetter = pureDynamicModelGetter;
this.macroConnectAdder = macroConnectAdder;
this.macroConnectorAdder = macroConnectorAdder;
- this.reporter = reporter;
+ this.reportNode = reportNode;
}
/**
@@ -226,7 +226,7 @@ public void setMacroConnectorAdder(BiConsumer getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected BaseStaticVarCompensatorBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, IdentifiableType.STATIC_VAR_COMPENSATOR, reporter);
+ protected BaseStaticVarCompensatorBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, IdentifiableType.STATIC_VAR_COMPENSATOR, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/transformers/TransformerFixedRatioBuilder.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/transformers/TransformerFixedRatioBuilder.java
index 09e7ba595..3f08e0fd4 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/transformers/TransformerFixedRatioBuilder.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/transformers/TransformerFixedRatioBuilder.java
@@ -7,12 +7,12 @@
*/
package com.powsybl.dynawaltz.models.transformers;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.AbstractEquipmentModelBuilder;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.ModelConfigs;
-import com.powsybl.dynawaltz.builders.Reporters;
+import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.iidm.network.IdentifiableType;
import com.powsybl.iidm.network.Network;
import com.powsybl.iidm.network.TwoWindingsTransformer;
@@ -28,32 +28,32 @@ public class TransformerFixedRatioBuilder extends AbstractEquipmentModelBuilder<
private static final ModelConfigs MODEL_CONFIGS = ModelConfigsHandler.getInstance().getModelConfigs(CATEGORY);
public static TransformerFixedRatioBuilder of(Network network) {
- return of(network, Reporter.NO_OP);
+ return of(network, ReportNode.NO_OP);
}
- public static TransformerFixedRatioBuilder of(Network network, Reporter reporter) {
- return new TransformerFixedRatioBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reporter);
+ public static TransformerFixedRatioBuilder of(Network network, ReportNode reportNode) {
+ return new TransformerFixedRatioBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}
public static TransformerFixedRatioBuilder of(Network network, String lib) {
- return of(network, lib, Reporter.NO_OP);
+ return of(network, lib, ReportNode.NO_OP);
}
- public static TransformerFixedRatioBuilder of(Network network, String lib, Reporter reporter) {
+ public static TransformerFixedRatioBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
if (modelConfig == null) {
- Reporters.reportLibNotFound(reporter, TransformerFixedRatioBuilder.class.getSimpleName(), lib);
+ BuilderReports.reportLibNotFound(reportNode, TransformerFixedRatioBuilder.class.getSimpleName(), lib);
return null;
}
- return new TransformerFixedRatioBuilder(network, modelConfig, reporter);
+ return new TransformerFixedRatioBuilder(network, modelConfig, reportNode);
}
public static Set getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
}
- protected TransformerFixedRatioBuilder(Network network, ModelConfig modelConfig, Reporter reporter) {
- super(network, modelConfig, IdentifiableType.TWO_WINDINGS_TRANSFORMER, reporter);
+ protected TransformerFixedRatioBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
+ super(network, modelConfig, IdentifiableType.TWO_WINDINGS_TRANSFORMER, reportNode);
}
@Override
diff --git a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/utils/BlackBoxSupplierUtils.java b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/utils/BlackBoxSupplierUtils.java
index eb0677ba6..277ef399c 100644
--- a/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/utils/BlackBoxSupplierUtils.java
+++ b/dynawaltz/src/main/java/com/powsybl/dynawaltz/models/utils/BlackBoxSupplierUtils.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.models.utils;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynamicsimulation.DynamicModelsSupplier;
import com.powsybl.dynamicsimulation.EventModelsSupplier;
import com.powsybl.dynawaltz.models.BlackBoxModel;
@@ -24,14 +24,14 @@ public final class BlackBoxSupplierUtils {
private BlackBoxSupplierUtils() {
}
- public static List getBlackBoxModelList(DynamicModelsSupplier dynamicModelsSupplier, Network network, Reporter reporter) {
+ public static List getBlackBoxModelList(DynamicModelsSupplier dynamicModelsSupplier, Network network, ReportNode reporter) {
return dynamicModelsSupplier.get(network, reporter).stream()
.filter(BlackBoxModel.class::isInstance)
.map(BlackBoxModel.class::cast)
.collect(Collectors.toList());
}
- public static List getBlackBoxModelList(EventModelsSupplier eventModelsSupplier, Network network, Reporter reporter) {
+ public static List getBlackBoxModelList(EventModelsSupplier eventModelsSupplier, Network network, ReportNode reporter) {
return eventModelsSupplier.get(network, reporter).stream()
.filter(BlackBoxModel.class::isInstance)
.map(BlackBoxModel.class::cast)
diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/DynaWaltzProviderTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/DynaWaltzProviderTest.java
index a2d7fd841..7f2a4ba5d 100644
--- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/DynaWaltzProviderTest.java
+++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/DynaWaltzProviderTest.java
@@ -7,7 +7,7 @@
package com.powsybl.dynawaltz;
import com.powsybl.commons.PowsyblException;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.commons.test.AbstractSerDeTest;
import com.powsybl.computation.ComputationManager;
import com.powsybl.computation.local.LocalCommandExecutor;
@@ -32,7 +32,7 @@
import java.util.Map;
import java.util.concurrent.ForkJoinPool;
-import static com.powsybl.commons.reporter.Reporter.NO_OP;
+import static com.powsybl.commons.report.ReportNode.NO_OP;
import static org.junit.jupiter.api.Assertions.*;
/**
@@ -52,7 +52,7 @@ public void setUp() throws IOException {
public static class CurvesSupplierMock implements CurvesSupplier {
@Override
- public List get(Network network, Reporter reporter) {
+ public List get(Network network, ReportNode reportNode) {
return Collections.singletonList(new DynaWaltzCurve("bus", "uPu"));
}
}
diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/ModelsSimplifierTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/ModelsSimplifierTest.java
index e52cb78cd..3155fa2eb 100644
--- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/ModelsSimplifierTest.java
+++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/ModelsSimplifierTest.java
@@ -9,7 +9,7 @@
import com.google.auto.service.AutoService;
import com.google.common.collect.Lists;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynamicsimulation.DynamicSimulationParameters;
import com.powsybl.dynawaltz.models.generators.AbstractGenerator;
import com.powsybl.dynawaltz.models.generators.GeneratorFictitiousBuilder;
@@ -68,7 +68,7 @@ void simplifyModels() {
@AutoService(ModelsSimplifier.class)
public static class ModelsSimplifierFilter implements ModelsSimplifier {
@Override
- public Stream simplifyModels(Stream models, Network network, DynaWaltzParameters dynaWaltzParameters, Reporter reporter) {
+ public Stream simplifyModels(Stream models, Network network, DynaWaltzParameters dynaWaltzParameters, ReportNode reportNode) {
return models.filter(m -> !m.getDynamicModelId().equalsIgnoreCase("BBM_LOAD"));
}
}
@@ -76,7 +76,7 @@ public Stream simplifyModels(Stream models, Networ
@AutoService(ModelsSimplifier.class)
public static class ModelsSimplifierSubstitution implements ModelsSimplifier {
@Override
- public Stream simplifyModels(Stream models, Network network, DynaWaltzParameters dynaWaltzParameters, Reporter reporter) {
+ public Stream simplifyModels(Stream models, Network network, DynaWaltzParameters dynaWaltzParameters, ReportNode reportNode) {
return models.map(m -> {
if ("BBM_GEN".equalsIgnoreCase(m.getDynamicModelId()) && m instanceof AbstractGenerator gen) {
return GeneratorFictitiousBuilder.of(network)
diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/models/BuilderEquipmentSetterTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/models/BuilderEquipmentSetterTest.java
index 7c0045607..95e61ee9f 100644
--- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/models/BuilderEquipmentSetterTest.java
+++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/models/BuilderEquipmentSetterTest.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.models;
-import com.powsybl.commons.reporter.ReporterModel;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.commons.test.TestUtil;
import com.powsybl.dynawaltz.models.lines.LineBuilder;
import com.powsybl.iidm.network.Line;
@@ -16,6 +16,7 @@
import com.powsybl.iidm.network.test.SvcTestCaseFactory;
import org.junit.jupiter.api.Test;
+import java.io.IOException;
import java.io.StringWriter;
import static org.junit.jupiter.api.Assertions.*;
@@ -26,20 +27,20 @@
class BuilderEquipmentSetterTest {
@Test
- void addEquipmentFromAnotherNetwork() {
+ void addEquipmentFromAnotherNetwork() throws IOException {
Network network = SvcTestCaseFactory.create();
Line ln1 = network.getLine("L1");
Network network2 = PhaseShifterTestCaseFactory.create();
Line ln2 = network2.getLine("L1");
- ReporterModel reporter = new ReporterModel("builderTests", "Builder tests");
+ ReportNode reportNode = ReportNode.newRootReportNode().withMessageTemplate("builderTests", "Builder tests").build();
BlackBoxModel bbm1 = LineBuilder.of(network)
.dynamicModelId("BBM_LINE_NETWORK_1")
.equipment(ln1)
.parameterSetId("sl")
.build();
- BlackBoxModel bbm2 = LineBuilder.of(network, reporter)
+ BlackBoxModel bbm2 = LineBuilder.of(network, reportNode)
.dynamicModelId("BBM_LINE_NETWORK_2")
.equipment(ln2)
.parameterSetId("sl")
@@ -48,7 +49,7 @@ void addEquipmentFromAnotherNetwork() {
assertNotNull(bbm1);
assertNull(bbm2);
StringWriter sw = new StringWriter();
- reporter.export(sw);
+ reportNode.print(sw);
assertEquals("""
+ Builder tests
'equipment' field value LINE L1 does not belong to the builder network
diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/AbstractDynamicModelXmlTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/AbstractDynamicModelXmlTest.java
index 035a4385e..390cd2d87 100644
--- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/AbstractDynamicModelXmlTest.java
+++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/AbstractDynamicModelXmlTest.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawaltz.xml;
-import com.powsybl.commons.reporter.ReporterModel;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.commons.test.AbstractSerDeTest;
import com.powsybl.commons.test.TestUtil;
import com.powsybl.dynamicsimulation.Curve;
@@ -35,7 +35,7 @@
import java.util.List;
import java.util.Objects;
-import static com.powsybl.commons.test.ComparisonUtils.compareTxt;
+import static com.powsybl.commons.test.ComparisonUtils.assertTxtEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
@@ -48,7 +48,7 @@ public abstract class AbstractDynamicModelXmlTest extends AbstractSerDeTest {
protected List eventModels = new ArrayList<>();
protected List curves = new ArrayList<>();
protected DynaWaltzContext context;
- protected ReporterModel reporter = new ReporterModel("testDyd", "Test DYD");
+ protected ReportNode reportNode = ReportNode.newRootReportNode().withMessageTemplate("testDyd", "Test DYD").build();
@BeforeEach
void setup() {
@@ -73,22 +73,22 @@ public void validate(String schemaDefinition, String expectedResourceName, Path
Schema schema = factory.newSchema(xsd);
Validator validator = schema.newValidator();
validator.validate(xml);
- compareTxt(expected, actual);
+ assertTxtEquals(expected, actual);
}
void setupDynawaltzContext() {
DynamicSimulationParameters parameters = DynamicSimulationParameters.load();
DynaWaltzParameters dynawoParameters = DynaWaltzParameters.load();
- context = new DynaWaltzContext(network, network.getVariantManager().getWorkingVariantId(), dynamicModels, eventModels, curves, parameters, dynawoParameters, reporter);
+ context = new DynaWaltzContext(network, network.getVariantManager().getWorkingVariantId(), dynamicModels, eventModels, curves, parameters, dynawoParameters, reportNode);
}
protected abstract void setupNetwork();
protected abstract void addDynamicModels();
- protected void checkReporter(String report) {
+ protected void checkReport(String report) throws IOException {
StringWriter sw = new StringWriter();
- reporter.export(sw);
+ reportNode.print(sw);
assertEquals(report, TestUtil.normalizeLineSeparator(sw.toString()));
}
}
diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/AbstractParametrizedDynamicModelXmlTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/AbstractParametrizedDynamicModelXmlTest.java
index c0a138037..4c4016698 100644
--- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/AbstractParametrizedDynamicModelXmlTest.java
+++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/AbstractParametrizedDynamicModelXmlTest.java
@@ -30,7 +30,7 @@
import java.util.List;
import java.util.Objects;
-import static com.powsybl.commons.test.ComparisonUtils.compareTxt;
+import static com.powsybl.commons.test.ComparisonUtils.assertTxtEquals;
/**
* @author Laurent Issertial {@literal }
@@ -52,7 +52,7 @@ public void validate(String schemaDefinition, String expectedResourceName, Path
Schema schema = factory.newSchema(xsd);
Validator validator = schema.newValidator();
validator.validate(xml);
- compareTxt(expected, actual);
+ assertTxtEquals(expected, actual);
}
void setupDynawaltzContext() {
diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/DynaWaltzTestUtil.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/DynaWaltzTestUtil.java
index 52f7048c4..b57d27a61 100644
--- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/DynaWaltzTestUtil.java
+++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/DynaWaltzTestUtil.java
@@ -37,7 +37,7 @@
import java.util.List;
import java.util.Objects;
-import static com.powsybl.commons.test.ComparisonUtils.compareTxt;
+import static com.powsybl.commons.test.ComparisonUtils.assertTxtEquals;
/**
* @author Marcos de Miguel {@literal }
@@ -161,7 +161,7 @@ public void validate(String schemaDefinition, String expectedResourceName, Path
Schema schema = factory.newSchema(xsd);
Validator validator = schema.newValidator();
validator.validate(xml);
- compareTxt(Objects.requireNonNull(getClass().getResourceAsStream("/" + expectedResourceName)), Files.newInputStream(xmlFile));
+ assertTxtEquals(Objects.requireNonNull(getClass().getResourceAsStream("/" + expectedResourceName)), Files.newInputStream(xmlFile));
}
private static Network createEurostagTutorialExample1WithMoreLoads() {
diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerAutomationSystemXmlTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerAutomationSystemXmlTest.java
index 690fef153..e167ba9bc 100644
--- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerAutomationSystemXmlTest.java
+++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerAutomationSystemXmlTest.java
@@ -45,10 +45,10 @@ void writeModel() throws SAXException, IOException, XMLStreamException {
DydXml.write(tmpDir, context);
ParametersXml.write(tmpDir, context);
validate("dyd.xsd", "tap_changer_empty_dyd.xml", tmpDir.resolve(DynaWaltzConstants.DYD_FILENAME));
- checkReporter("""
+ checkReport("""
+ Test DYD
- + Dynawaltz models processing
- TapChangerAutomaton BBM_TC equipment is not a LoadWithTransformers, the automation system will be skipped
+ + Dynawaltz models processing
+ TapChangerAutomaton BBM_TC equipment is not a LoadWithTransformers, the automation system will be skipped
""");
}
}
diff --git a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerBlockingAutomationSystemXmlTest.java b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerBlockingAutomationSystemXmlTest.java
index ed50db613..e10b80a9b 100644
--- a/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerBlockingAutomationSystemXmlTest.java
+++ b/dynawaltz/src/test/java/com/powsybl/dynawaltz/xml/EmptyTapChangerBlockingAutomationSystemXmlTest.java
@@ -57,11 +57,11 @@ void writeModel() throws SAXException, IOException, XMLStreamException {
DydXml.write(tmpDir, context);
ParametersXml.write(tmpDir, context);
validate("dyd.xsd", "tap_changer_blocking_empty_dyd.xml", tmpDir.resolve(DynaWaltzConstants.DYD_FILENAME));
- checkReporter("""
- + Test DYD
- + Dynawaltz models processing
- TapChangerAutomaton BBM_TC equipment is not a LoadWithTransformers, the automation system will be skipped
- None of TapChangerBlockingAutomaton BBM_TapChangerBlocking equipments are TapChangerModel, the automation system will be skipped
- """);
+ checkReport("""
+ + Test DYD
+ + Dynawaltz models processing
+ TapChangerAutomaton BBM_TC equipment is not a LoadWithTransformers, the automation system will be skipped
+ None of TapChangerBlockingAutomaton BBM_TapChangerBlocking equipments are TapChangerModel, the automation system will be skipped
+ """);
}
}
diff --git a/dynawo-dynamic-security-analysis/pom.xml b/dynawo-dynamic-security-analysis/pom.xml
index e92ef2b44..3251717f1 100644
--- a/dynawo-dynamic-security-analysis/pom.xml
+++ b/dynawo-dynamic-security-analysis/pom.xml
@@ -11,7 +11,7 @@
com.powsybl
powsybl-dynawo
- 2.4.0-SNAPSHOT
+ 2.5.0-SNAPSHOT
powsybl-dynawo-dynamic-security-analysis
@@ -26,7 +26,6 @@
com.powsybl
powsybl-dynamic-security-analysis
- 6.3.0-SNAPSHOT
${project.groupId}
diff --git a/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/DynawoDynamicSecurityAnalysisHandler.java b/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/DynawoDynamicSecurityAnalysisHandler.java
index d19e59086..ad3458d7f 100644
--- a/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/DynawoDynamicSecurityAnalysisHandler.java
+++ b/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/DynawoDynamicSecurityAnalysisHandler.java
@@ -8,7 +8,7 @@
package com.powsybl.dynawo.security;
import com.powsybl.commons.exceptions.UncheckedXmlStreamException;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.computation.AbstractExecutionHandler;
import com.powsybl.computation.Command;
import com.powsybl.computation.CommandExecution;
@@ -55,17 +55,17 @@ public final class DynawoDynamicSecurityAnalysisHandler extends AbstractExecutio
private final Network network;
private final LimitViolationFilter violationFilter;
private final List interceptors;
- private final Reporter reporter;
+ private final ReportNode reportNode;
public DynawoDynamicSecurityAnalysisHandler(SecurityAnalysisContext context, Command command,
LimitViolationFilter violationFilter, List interceptors,
- Reporter reporter) {
+ ReportNode reportNode) {
this.context = context;
this.network = context.getNetwork();
this.command = command;
this.violationFilter = violationFilter;
this.interceptors = interceptors;
- this.reporter = reporter;
+ this.reportNode = reportNode;
}
@Override
@@ -87,7 +87,7 @@ public SecurityAnalysisReport after(Path workingDir, ExecutionReport report) thr
if (Files.exists(outputNetworkFile)) {
NetworkResultsUpdater.update(context.getNetwork(), NetworkSerDe.read(outputNetworkFile), context.getDynaWaltzParameters().isMergeLoads());
}
- ContingencyResultsUtils.reportContingenciesTimelines(context.getContingencies(), workingDir.resolve(DYNAWO_TIMELINE_FOLDER), reporter);
+ ContingencyResultsUtils.reportContingenciesTimelines(context.getContingencies(), workingDir.resolve(DYNAWO_TIMELINE_FOLDER), reportNode);
return new SecurityAnalysisReport(
new SecurityAnalysisResult(
diff --git a/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/DynawoDynamicSecurityAnalysisProvider.java b/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/DynawoDynamicSecurityAnalysisProvider.java
index f62561a7c..2936f2f8e 100644
--- a/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/DynawoDynamicSecurityAnalysisProvider.java
+++ b/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/DynawoDynamicSecurityAnalysisProvider.java
@@ -8,8 +8,9 @@
package com.powsybl.dynawo.security;
import com.google.auto.service.AutoService;
+import com.powsybl.action.Action;
import com.powsybl.commons.config.PlatformConfig;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.computation.Command;
import com.powsybl.computation.ComputationManager;
import com.powsybl.computation.ExecutionEnvironment;
@@ -28,7 +29,6 @@
import com.powsybl.security.LimitViolationDetector;
import com.powsybl.security.LimitViolationFilter;
import com.powsybl.security.SecurityAnalysisReport;
-import com.powsybl.security.action.Action;
import com.powsybl.security.dynamic.DynamicSecurityAnalysisParameters;
import com.powsybl.security.dynamic.DynamicSecurityAnalysisProvider;
import com.powsybl.security.interceptors.SecurityAnalysisInterceptor;
@@ -79,14 +79,14 @@ public CompletableFuture run(Network network,
List operatorStrategies,
List actions,
List monitors,
- Reporter reporter) {
+ ReportNode reportNode) {
if (detector != null) {
LOGGER.error("LimitViolationDetector is not used in Dynaflow implementation.");
}
if (monitors != null && !monitors.isEmpty()) {
LOGGER.error("Monitoring is not possible with Dynaflow implementation. There will not be supplementary information about monitored equipment.");
}
- if (reporter != Reporter.NO_OP) {
+ if (reportNode != ReportNode.NO_OP) {
LOGGER.warn("Reporters are not used in Dynaflow implementation");
}
if (operatorStrategies != null && !operatorStrategies.isEmpty()) {
@@ -106,19 +106,19 @@ public CompletableFuture run(Network network,
Objects.requireNonNull(contingenciesProvider);
interceptors.forEach(Objects::requireNonNull);
- Reporter dsaReporter = Reports.createDynamicSecurityAnalysisReporter(reporter, network.getId());
+ ReportNode dsaReportNode = Reports.createDynamicSecurityAnalysisReportNode(reportNode, network.getId());
network.getVariantManager().setWorkingVariant(workingVariantId);
ExecutionEnvironment execEnv = new ExecutionEnvironment(Collections.emptyMap(), WORKING_DIR_PREFIX, config.isDebug());
DynawoUtil.requireDynaMinVersion(execEnv, computationManager, getVersionCommand(config), DynawoAlgorithmsConfig.DYNAWALTZ_LAUNCHER_PROGRAM_NAME, false);
List contingencies = contingenciesProvider.getContingencies(network);
SecurityAnalysisContext context = new SecurityAnalysisContext(network, workingVariantId,
- BlackBoxSupplierUtils.getBlackBoxModelList(dynamicModelsSupplier, network, dsaReporter),
- BlackBoxSupplierUtils.getBlackBoxModelList(eventModelsSupplier, network, dsaReporter),
+ BlackBoxSupplierUtils.getBlackBoxModelList(dynamicModelsSupplier, network, dsaReportNode),
+ BlackBoxSupplierUtils.getBlackBoxModelList(eventModelsSupplier, network, dsaReportNode),
parameters,
DynaWaltzParameters.load(parameters.getDynamicSimulationParameters()),
contingencies);
- return computationManager.execute(execEnv, new DynawoDynamicSecurityAnalysisHandler(context, getCommand(config), filter, interceptors, dsaReporter));
+ return computationManager.execute(execEnv, new DynawoDynamicSecurityAnalysisHandler(context, getCommand(config), filter, interceptors, dsaReportNode));
}
// TODO choose another name ? (needed for models supplier)
diff --git a/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/Reports.java b/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/Reports.java
index d4bdee7db..f3feda809 100644
--- a/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/Reports.java
+++ b/dynawo-dynamic-security-analysis/src/main/java/com/powsybl/dynawo/security/Reports.java
@@ -7,7 +7,7 @@
*/
package com.powsybl.dynawo.security;
-import com.powsybl.commons.reporter.Reporter;
+import com.powsybl.commons.report.ReportNode;
/**
* @author Laurent Issertial {@literal }
@@ -17,9 +17,10 @@ public final class Reports {
private Reports() {
}
- public static Reporter createDynamicSecurityAnalysisReporter(Reporter reporter, String networkId) {
- return reporter.createSubReporter("dsa",
- "Dynawo dynamic security analysis on network '${networkId}'",
- "networkId", networkId);
+ public static ReportNode createDynamicSecurityAnalysisReportNode(ReportNode reportNode, String networkId) {
+ return reportNode.newReportNode()
+ .withMessageTemplate("dsa", "Dynawo dynamic security analysis on network '${networkId}'")
+ .withUntypedValue("networkId", networkId)
+ .add();
}
}
diff --git a/dynawo-dynamic-security-analysis/src/test/resources/DisconnectLineGenerator.xml b/dynawo-dynamic-security-analysis/src/test/resources/DisconnectLineGenerator.xml
index 0a1e6d7ed..c62da5520 100644
--- a/dynawo-dynamic-security-analysis/src/test/resources/DisconnectLineGenerator.xml
+++ b/dynawo-dynamic-security-analysis/src/test/resources/DisconnectLineGenerator.xml
@@ -5,9 +5,9 @@
-
+
-
+
diff --git a/dynawo-integration-tests/pom.xml b/dynawo-integration-tests/pom.xml
index 3fc98c908..d5652ccc8 100644
--- a/dynawo-integration-tests/pom.xml
+++ b/dynawo-integration-tests/pom.xml
@@ -13,7 +13,7 @@
com.powsybl
powsybl-dynawo
- 2.4.0-SNAPSHOT
+ 2.5.0-SNAPSHOT
powsybl-dynawo-integration-tests
@@ -77,11 +77,5 @@
powsybl-iidm-test
test
-
- com.powsybl
- powsybl-dynawaltz-security-analysis
- 2.4.0-SNAPSHOT
- test
-
diff --git a/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynaFlowTest.java b/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynaFlowTest.java
index f7cd5367c..2400cc3c0 100644
--- a/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynaFlowTest.java
+++ b/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynaFlowTest.java
@@ -9,8 +9,7 @@
import com.google.common.io.ByteStreams;
import com.powsybl.commons.datasource.ResourceDataSource;
import com.powsybl.commons.datasource.ResourceSet;
-import com.powsybl.commons.reporter.Reporter;
-import com.powsybl.commons.reporter.ReporterModel;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.commons.test.ComparisonUtils;
import com.powsybl.commons.test.TestUtil;
import com.powsybl.contingency.Contingency;
@@ -78,8 +77,8 @@ void testLf() throws IOException {
.setPermanentLimit(200)
.add();
- ReporterModel reporter = new ReporterModel("root", "testLf root reporter");
- LoadFlowResult result = loadFlowProvider.run(network, computationManager, VariantManagerConstants.INITIAL_VARIANT_ID, loadFlowParameters, reporter)
+ ReportNode reportNode = ReportNode.newRootReportNode().withMessageTemplate("root", "testLf root report").build();
+ LoadFlowResult result = loadFlowProvider.run(network, computationManager, VariantManagerConstants.INITIAL_VARIANT_ID, loadFlowParameters, reportNode)
.join();
assertTrue(result.isOk());
@@ -89,7 +88,7 @@ void testLf() throws IOException {
assertEquals("B4", componentResult.getSlackBusId());
StringWriter sw = new StringWriter();
- reporter.export(sw);
+ reportNode.print(sw);
System.out.println(sw);
InputStream refStream = Objects.requireNonNull(getClass().getResourceAsStream("/loadflow_timeline_report.txt"));
String refLogExport = TestUtil.normalizeLineSeparator(new String(ByteStreams.toByteArray(refStream), StandardCharsets.UTF_8));
@@ -111,38 +110,38 @@ void testSaBb() throws IOException {
network.getVoltageLevelStream().forEach(vl -> vl.setLowVoltageLimit(vl.getNominalV() * 0.97));
// Launching a load flow before the security analysis is required
- ReporterModel reporterLf = new ReporterModel("root", "Root message");
- loadFlowProvider.run(network, computationManager, VariantManagerConstants.INITIAL_VARIANT_ID, loadFlowParameters, reporterLf).join();
+ ReportNode reportNodeLf = ReportNode.newRootReportNode().withMessageTemplate("root", "Root message").build();
+ loadFlowProvider.run(network, computationManager, VariantManagerConstants.INITIAL_VARIANT_ID, loadFlowParameters, reportNodeLf).join();
- StringWriter swReporterLf = new StringWriter();
- reporterLf.export(swReporterLf);
+ StringWriter swReportNodeLf = new StringWriter();
+ reportNodeLf.print(swReportNodeLf);
InputStream refStreamLf = Objects.requireNonNull(getClass().getResourceAsStream("/ieee14/security-analysis/timeline_report_lf.txt"));
String refLogExportLf = TestUtil.normalizeLineSeparator(new String(ByteStreams.toByteArray(refStreamLf), StandardCharsets.UTF_8));
- String logExportLf = TestUtil.normalizeLineSeparator(swReporterLf.toString());
+ String logExportLf = TestUtil.normalizeLineSeparator(swReportNodeLf.toString());
assertEquals(refLogExportLf, logExportLf);
List contingencies = network.getLineStream()
.map(l -> Contingency.line(l.getId()))
.toList();
- ReporterModel reporter = new ReporterModel("root", "Root message");
+ ReportNode reportNode = ReportNode.newRootReportNode().withMessageTemplate("root", "Root message").build();
SecurityAnalysisResult result = securityAnalysisProvider.run(network, VariantManagerConstants.INITIAL_VARIANT_ID, new DefaultLimitViolationDetector(),
new LimitViolationFilter(), computationManager, securityAnalysisParameters, n -> contingencies, Collections.emptyList(),
- Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), reporter)
+ Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), reportNode)
.join()
.getResult();
- StringWriter swReporterAs = new StringWriter();
- reporter.export(swReporterAs);
- InputStream refStreamReporterAs = Objects.requireNonNull(getClass().getResourceAsStream("/ieee14/security-analysis/timeline_report_as.txt"));
- String refLogExportAs = TestUtil.normalizeLineSeparator(new String(ByteStreams.toByteArray(refStreamReporterAs), StandardCharsets.UTF_8));
- String logExportAs = TestUtil.normalizeLineSeparator(swReporterAs.toString());
+ StringWriter swReportAs = new StringWriter();
+ reportNode.print(swReportAs);
+ InputStream refStreamReportAs = Objects.requireNonNull(getClass().getResourceAsStream("/ieee14/security-analysis/timeline_report_as.txt"));
+ String refLogExportAs = TestUtil.normalizeLineSeparator(new String(ByteStreams.toByteArray(refStreamReportAs), StandardCharsets.UTF_8));
+ String logExportAs = TestUtil.normalizeLineSeparator(swReportAs.toString());
assertEquals(refLogExportAs, logExportAs);
StringWriter serializedResult = new StringWriter();
SecurityAnalysisResultSerializer.write(result, serializedResult);
InputStream expected = Objects.requireNonNull(getClass().getResourceAsStream("/ieee14/security-analysis/sa_bb_results.json"));
- ComparisonUtils.compareTxt(expected, serializedResult.toString());
+ ComparisonUtils.assertTxtEquals(expected, serializedResult.toString());
}
@Test
@@ -154,13 +153,13 @@ void testSaNb() throws IOException {
.toList();
SecurityAnalysisResult result = securityAnalysisProvider.run(network, VariantManagerConstants.INITIAL_VARIANT_ID, new DefaultLimitViolationDetector(),
new LimitViolationFilter(), computationManager, securityAnalysisParameters, n -> contingencies, Collections.emptyList(),
- Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Reporter.NO_OP)
+ Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), ReportNode.NO_OP)
.join()
.getResult();
StringWriter serializedResult = new StringWriter();
SecurityAnalysisResultSerializer.write(result, serializedResult);
InputStream expected = Objects.requireNonNull(getClass().getResourceAsStream("/ieee14/security-analysis/sa_nb_results.json"));
- ComparisonUtils.compareTxt(expected, serializedResult.toString());
+ ComparisonUtils.assertTxtEquals(expected, serializedResult.toString());
}
}
diff --git a/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynaWaltzTest.java b/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynaWaltzTest.java
index e341a812f..88362c577 100644
--- a/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynaWaltzTest.java
+++ b/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynaWaltzTest.java
@@ -29,7 +29,7 @@
import java.util.List;
import java.util.stream.Stream;
-import static com.powsybl.commons.reporter.Reporter.NO_OP;
+import static com.powsybl.commons.report.ReportNode.NO_OP;
import static org.junit.jupiter.api.Assertions.*;
/**
diff --git a/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynawoDynamicSecurityAnalysisTest.java b/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynawoDynamicSecurityAnalysisTest.java
index 86f1eb311..41bb40970 100644
--- a/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynawoDynamicSecurityAnalysisTest.java
+++ b/dynawo-integration-tests/src/test/java/com/powsybl/dynawo/it/DynawoDynamicSecurityAnalysisTest.java
@@ -9,7 +9,7 @@
import com.google.common.io.ByteStreams;
import com.powsybl.commons.datasource.ResourceDataSource;
import com.powsybl.commons.datasource.ResourceSet;
-import com.powsybl.commons.reporter.ReporterModel;
+import com.powsybl.commons.report.ReportNode;
import com.powsybl.commons.test.ComparisonUtils;
import com.powsybl.commons.test.TestUtil;
import com.powsybl.contingency.Contingency;
@@ -86,7 +86,9 @@ void testIeee14() throws IOException {
.setSolverType(DynaWaltzParameters.SolverType.IDA)
.setDefaultDumpFileParameters();
- ReporterModel reporter = new ReporterModel("root", "Root message");
+ ReportNode reporter = ReportNode.newRootReportNode()
+ .withMessageTemplate("root", "Root message")
+ .build();
List contingencies = List.of(Contingency.load("_LOAD__11_EC"));
@@ -99,7 +101,7 @@ VariantManagerConstants.INITIAL_VARIANT_ID, new DefaultLimitViolationDetector(),
.getResult();
StringWriter swReporterAs = new StringWriter();
- reporter.export(swReporterAs);
+ reporter.print(swReporterAs);
InputStream refStreamReporterAs = Objects.requireNonNull(getClass().getResourceAsStream("/ieee14/dynamic-security-analysis/timeline_report.txt"));
String refLogExportAs = TestUtil.normalizeLineSeparator(new String(ByteStreams.toByteArray(refStreamReporterAs), StandardCharsets.UTF_8));
String logExportAs = TestUtil.normalizeLineSeparator(swReporterAs.toString());
@@ -108,6 +110,6 @@ VariantManagerConstants.INITIAL_VARIANT_ID, new DefaultLimitViolationDetector(),
StringWriter serializedResult = new StringWriter();
SecurityAnalysisResultSerializer.write(result, serializedResult);
InputStream expected = Objects.requireNonNull(getClass().getResourceAsStream("/ieee14/dynamic-security-analysis/results.json"));
- ComparisonUtils.compareTxt(expected, serializedResult.toString());
+ ComparisonUtils.assertTxtEquals(expected, serializedResult.toString());
}
}
diff --git a/dynawo-integration-tests/src/test/resources/ieee14/dynamic-security-analysis/results.json b/dynawo-integration-tests/src/test/resources/ieee14/dynamic-security-analysis/results.json
index ddbcc9ee3..569f08673 100644
--- a/dynawo-integration-tests/src/test/resources/ieee14/dynamic-security-analysis/results.json
+++ b/dynawo-integration-tests/src/test/resources/ieee14/dynamic-security-analysis/results.json
@@ -1,5 +1,5 @@
{
- "version" : "1.5",
+ "version" : "1.6",
"preContingencyResult" : {
"status" : "CONVERGED",
"limitViolationsResult" : {
diff --git a/dynawo-integration-tests/src/test/resources/ieee14/dynamic-security-analysis/timeline_report.txt b/dynawo-integration-tests/src/test/resources/ieee14/dynamic-security-analysis/timeline_report.txt
index b2641ec9e..d5d5def84 100644
--- a/dynawo-integration-tests/src/test/resources/ieee14/dynamic-security-analysis/timeline_report.txt
+++ b/dynawo-integration-tests/src/test/resources/ieee14/dynamic-security-analysis/timeline_report.txt
@@ -1,52 +1,52 @@
+ Root message
- + Dynawo dynamic security analysis on network 'ieee14bus'
- + Groovy Dynamic Models Supplier
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD__10_EC will be used instead
- Model _LOAD__10_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD__11_EC will be used instead
- Model _LOAD__11_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD__12_EC will be used instead
- Model _LOAD__12_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD__13_EC will be used instead
- Model _LOAD__13_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD__14_EC will be used instead
- Model _LOAD__14_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD___2_EC will be used instead
- Model _LOAD___2_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD___3_EC will be used instead
- Model _LOAD___3_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD___9_EC will be used instead
- Model _LOAD___9_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD___4_EC will be used instead
- Model _LOAD___4_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD___6_EC will be used instead
- Model _LOAD___6_EC instantiation successful
- + DSL model builder for LoadAlphaBeta
- 'dynamicModelId' field is not set, staticId _LOAD___5_EC will be used instead
- Model _LOAD___5_EC instantiation successful
- + DSL model builder for GeneratorSynchronousFourWindingsProportionalRegulations
- 'dynamicModelId' field is not set, staticId _GEN____1_SM will be used instead
- Model _GEN____1_SM instantiation successful
- + DSL model builder for GeneratorSynchronousFourWindingsProportionalRegulations
- 'dynamicModelId' field is not set, staticId _GEN____2_SM will be used instead
- Model _GEN____2_SM instantiation successful
- + DSL model builder for GeneratorSynchronousFourWindingsProportionalRegulations
- 'dynamicModelId' field is not set, staticId _GEN____3_SM will be used instead
- Model _GEN____3_SM instantiation successful
- + DSL model builder for GeneratorSynchronousThreeWindingsProportionalRegulations
- 'dynamicModelId' field is not set, staticId _GEN____6_SM will be used instead
- Model _GEN____6_SM instantiation successful
- + DSL model builder for GeneratorSynchronousThreeWindingsProportionalRegulations
- 'dynamicModelId' field is not set, staticId _GEN____8_SM will be used instead
- Model _GEN____8_SM instantiation successful
- + Contingency '_LOAD__11_EC'
+ + Dynawo dynamic security analysis on network 'ieee14bus'
+ + Groovy Dynamic Models Supplier
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD__10_EC will be used instead
+ Model _LOAD__10_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD__11_EC will be used instead
+ Model _LOAD__11_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD__12_EC will be used instead
+ Model _LOAD__12_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD__13_EC will be used instead
+ Model _LOAD__13_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD__14_EC will be used instead
+ Model _LOAD__14_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD___2_EC will be used instead
+ Model _LOAD___2_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD___3_EC will be used instead
+ Model _LOAD___3_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD___9_EC will be used instead
+ Model _LOAD___9_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD___4_EC will be used instead
+ Model _LOAD___4_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD___6_EC will be used instead
+ Model _LOAD___6_EC instantiation successful
+ + DSL model builder for LoadAlphaBeta
+ 'dynamicModelId' field is not set, staticId _LOAD___5_EC will be used instead
+ Model _LOAD___5_EC instantiation successful
+ + DSL model builder for GeneratorSynchronousFourWindingsProportionalRegulations
+ 'dynamicModelId' field is not set, staticId _GEN____1_SM will be used instead
+ Model _GEN____1_SM instantiation successful
+ + DSL model builder for GeneratorSynchronousFourWindingsProportionalRegulations
+ 'dynamicModelId' field is not set, staticId _GEN____2_SM will be used instead
+ Model _GEN____2_SM instantiation successful
+ + DSL model builder for GeneratorSynchronousFourWindingsProportionalRegulations
+ 'dynamicModelId' field is not set, staticId _GEN____3_SM will be used instead
+ Model _GEN____3_SM instantiation successful
+ + DSL model builder for GeneratorSynchronousThreeWindingsProportionalRegulations
+ 'dynamicModelId' field is not set, staticId _GEN____6_SM will be used instead
+ Model _GEN____6_SM instantiation successful
+ + DSL model builder for GeneratorSynchronousThreeWindingsProportionalRegulations
+ 'dynamicModelId' field is not set, staticId _GEN____8_SM will be used instead
+ Model _GEN____8_SM instantiation successful
+ Contingency '_LOAD__11_EC'
diff --git a/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/sa_bb_results.json b/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/sa_bb_results.json
index db3e87b8a..0e85e73f6 100644
--- a/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/sa_bb_results.json
+++ b/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/sa_bb_results.json
@@ -1,5 +1,5 @@
{
- "version" : "1.5",
+ "version" : "1.6",
"preContingencyResult" : {
"status" : "CONVERGED",
"limitViolationsResult" : {
diff --git a/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/sa_nb_results.json b/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/sa_nb_results.json
index 3c0045eff..85df92ea3 100644
--- a/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/sa_nb_results.json
+++ b/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/sa_nb_results.json
@@ -1,5 +1,5 @@
{
- "version" : "1.5",
+ "version" : "1.6",
"preContingencyResult" : {
"status" : "CONVERGED",
"limitViolationsResult" : {
diff --git a/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/timeline_report_as.txt b/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/timeline_report_as.txt
index 75b44fcd7..6a21ee2a2 100644
--- a/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/timeline_report_as.txt
+++ b/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/timeline_report_as.txt
@@ -1,37 +1,37 @@
+ Root message
- + Dynaflow security analysis on network 'ieee14bus'
- + Contingency '_BUS___10-BUS___11-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS___10-BUS___11-1_AC'
- + Contingency '_BUS___12-BUS___13-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS___12-BUS___13-1_AC'
- + Contingency '_BUS___13-BUS___14-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS___13-BUS___14-1_AC'
- + Contingency '_BUS____1-BUS____2-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____1-BUS____2-1_AC'
- + Contingency '_BUS____1-BUS____5-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____1-BUS____5-1_AC'
- + Contingency '_BUS____2-BUS____3-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____2-BUS____3-1_AC'
- + Contingency '_BUS____2-BUS____4-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____2-BUS____4-1_AC'
- + Contingency '_BUS____2-BUS____5-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____2-BUS____5-1_AC'
- + Contingency '_BUS____3-BUS____4-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____3-BUS____4-1_AC'
- + Contingency '_BUS____4-BUS____5-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____4-BUS____5-1_AC'
- + Contingency '_BUS____6-BUS___11-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____6-BUS___11-1_AC'
- + Contingency '_BUS____6-BUS___12-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____6-BUS___12-1_AC'
- + Contingency '_BUS____6-BUS___13-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____6-BUS___13-1_AC'
- + Contingency '_BUS____7-BUS____8-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____7-BUS____8-1_AC'
- [t=10.0] GENERATOR : disconnecting on equipment '_GEN____8_SM'
- + Contingency '_BUS____7-BUS____9-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____7-BUS____9-1_AC'
- + Contingency '_BUS____9-BUS___10-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____9-BUS___10-1_AC'
- + Contingency '_BUS____9-BUS___14-1_AC'
- [t=10.0] LINE : opening both sides on equipment '_BUS____9-BUS___14-1_AC'
+ + Dynaflow security analysis on network 'ieee14bus'
+ + Contingency '_BUS___10-BUS___11-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS___10-BUS___11-1_AC'
+ + Contingency '_BUS___12-BUS___13-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS___12-BUS___13-1_AC'
+ + Contingency '_BUS___13-BUS___14-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS___13-BUS___14-1_AC'
+ + Contingency '_BUS____1-BUS____2-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____1-BUS____2-1_AC'
+ + Contingency '_BUS____1-BUS____5-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____1-BUS____5-1_AC'
+ + Contingency '_BUS____2-BUS____3-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____2-BUS____3-1_AC'
+ + Contingency '_BUS____2-BUS____4-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____2-BUS____4-1_AC'
+ + Contingency '_BUS____2-BUS____5-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____2-BUS____5-1_AC'
+ + Contingency '_BUS____3-BUS____4-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____3-BUS____4-1_AC'
+ + Contingency '_BUS____4-BUS____5-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____4-BUS____5-1_AC'
+ + Contingency '_BUS____6-BUS___11-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____6-BUS___11-1_AC'
+ + Contingency '_BUS____6-BUS___12-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____6-BUS___12-1_AC'
+ + Contingency '_BUS____6-BUS___13-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____6-BUS___13-1_AC'
+ + Contingency '_BUS____7-BUS____8-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____7-BUS____8-1_AC'
+ [t=10.0] GENERATOR : disconnecting on equipment '_GEN____8_SM'
+ + Contingency '_BUS____7-BUS____9-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____7-BUS____9-1_AC'
+ + Contingency '_BUS____9-BUS___10-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____9-BUS___10-1_AC'
+ + Contingency '_BUS____9-BUS___14-1_AC'
+ [t=10.0] LINE : opening both sides on equipment '_BUS____9-BUS___14-1_AC'
diff --git a/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/timeline_report_lf.txt b/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/timeline_report_lf.txt
index a39965d5c..266e76f93 100644
--- a/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/timeline_report_lf.txt
+++ b/dynawo-integration-tests/src/test/resources/ieee14/security-analysis/timeline_report_lf.txt
@@ -1,2 +1,2 @@
+ Root message
- + Dynaflow loadflow on network 'ieee14bus'
+ Dynaflow loadflow on network 'ieee14bus'
diff --git a/dynawo-integration-tests/src/test/resources/loadflow_timeline_report.txt b/dynawo-integration-tests/src/test/resources/loadflow_timeline_report.txt
index 6e91453e0..4f193192e 100644
--- a/dynawo-integration-tests/src/test/resources/loadflow_timeline_report.txt
+++ b/dynawo-integration-tests/src/test/resources/loadflow_timeline_report.txt
@@ -1,5 +1,5 @@
-+ testLf root reporter
- + Dynaflow loadflow on network 'ieee14cdf-solved'
- [t=90.0] Overload 60 : opening line on equipment 'L6-13-1'
- [t=90.0] LINE : opening both sides on equipment 'L6-13-1'
- [t=90.0] Overload 60 : opening line on equipment 'L6-13-1'
++ testLf root report
+ + Dynaflow loadflow on network 'ieee14cdf-solved'
+ [t=90.0] Overload 60 : opening line on equipment 'L6-13-1'
+ [t=90.0] LINE : opening both sides on equipment 'L6-13-1'
+ [t=90.0] Overload 60 : opening line on equipment 'L6-13-1'
diff --git a/pom.xml b/pom.xml
index 3ec778c88..d3ff6ebd1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
powsybl-dynawo
- 2.4.0-SNAPSHOT
+ 2.5.0-SNAPSHOT
pom
powsybl dynawo
@@ -57,7 +57,7 @@
17
- 6.3.0-SNAPSHOT
+ 6.4.0-SNAPSHOT
4.0.14
../distribution/target/site/jacoco-aggregate/jacoco.xml,