From dc5abca7592bf048164149adb1dd37779687595c Mon Sep 17 00:00:00 2001 From: Ayoub LABIDI <117761394+ayolab@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:37:57 +0200 Subject: [PATCH] Report removed injections when removing voltage levels (#2984) Signed-off-by: Ayoub LABIDI (cherry picked from commit 6aaf2561e23f8553557541d0c6c524758d8a4c58) --- .../iidm/modification/topology/RemoveVoltageLevel.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/topology/RemoveVoltageLevel.java b/iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/topology/RemoveVoltageLevel.java index 0bfb9000bdc..9907c744353 100644 --- a/iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/topology/RemoveVoltageLevel.java +++ b/iidm/iidm-modification/src/main/java/com/powsybl/iidm/modification/topology/RemoveVoltageLevel.java @@ -17,8 +17,7 @@ import java.util.Objects; -import static com.powsybl.iidm.modification.util.ModificationReports.notFoundVoltageLevelReport; -import static com.powsybl.iidm.modification.util.ModificationReports.removedVoltageLevelReport; +import static com.powsybl.iidm.modification.util.ModificationReports.*; /** * @author Etienne Homer {@literal } @@ -52,7 +51,10 @@ public void apply(Network network, NamingStrategy namingStrategy, boolean throwE voltageLevel.getConnectables().forEach(connectable -> { if (connectable instanceof Injection) { + String connectableId = connectable.getId(); connectable.remove(); + removedConnectableReport(reportNode, connectableId); + LOGGER.info("Connectable {} removed", connectableId); } else { new RemoveFeederBayBuilder().withConnectableId(connectable.getId()).build().apply(network, throwException, computationManager, reportNode); }