Skip to content

Commit

Permalink
Report removed injections when removing voltage levels (#2984)
Browse files Browse the repository at this point in the history
Signed-off-by: Ayoub LABIDI <ayoub.labidi@protonmail.com>
  • Loading branch information
ayolab authored Apr 25, 2024
1 parent 1c69900 commit 6aaf256
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <etienne.homer at rte-france.com>}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 6aaf256

Please sign in to comment.