diff --git a/src/main/java/com/powsybl/openloadflow/ac/outerloop/AcActivePowerDistributionOuterLoop.java b/src/main/java/com/powsybl/openloadflow/ac/outerloop/AcActivePowerDistributionOuterLoop.java index 8e602ceed4..43abbd88a7 100644 --- a/src/main/java/com/powsybl/openloadflow/ac/outerloop/AcActivePowerDistributionOuterLoop.java +++ b/src/main/java/com/powsybl/openloadflow/ac/outerloop/AcActivePowerDistributionOuterLoop.java @@ -19,8 +19,4 @@ * @author Valentin Mouradian {@literal } */ public interface AcActivePowerDistributionOuterLoop extends ActivePowerDistributionOuterLoop { - @Override - default double getSlackBusActivePowerMismatch(AcOuterLoopContext context) { - return context.getLastSolverResult().getSlackBusActivePowerMismatch(); - } } diff --git a/src/main/java/com/powsybl/openloadflow/ac/outerloop/AcAreaInterchangeControlOuterLoop.java b/src/main/java/com/powsybl/openloadflow/ac/outerloop/AcAreaInterchangeControlOuterLoop.java index 7e2c533173..3b466535eb 100644 --- a/src/main/java/com/powsybl/openloadflow/ac/outerloop/AcAreaInterchangeControlOuterLoop.java +++ b/src/main/java/com/powsybl/openloadflow/ac/outerloop/AcAreaInterchangeControlOuterLoop.java @@ -37,4 +37,9 @@ public String getName() { return NAME; } + @Override + public double getSlackBusActivePowerMismatch(AcOuterLoopContext context) { + return context.getLastSolverResult().getSlackBusActivePowerMismatch(); + } + } diff --git a/src/main/java/com/powsybl/openloadflow/ac/outerloop/DistributedSlackOuterLoop.java b/src/main/java/com/powsybl/openloadflow/ac/outerloop/DistributedSlackOuterLoop.java index 67c1d57b43..997ef7d3d3 100644 --- a/src/main/java/com/powsybl/openloadflow/ac/outerloop/DistributedSlackOuterLoop.java +++ b/src/main/java/com/powsybl/openloadflow/ac/outerloop/DistributedSlackOuterLoop.java @@ -93,6 +93,11 @@ public OuterLoopResult check(AcOuterLoopContext context, ReportNode reportNode) } } + @Override + public double getSlackBusActivePowerMismatch(AcOuterLoopContext context) { + return context.getLastSolverResult().getSlackBusActivePowerMismatch(); + } + @Override public OpenLoadFlowParameters.SlackDistributionFailureBehavior getSlackDistributionFailureBehavior(AcOuterLoopContext context) { OpenLoadFlowParameters.SlackDistributionFailureBehavior slackDistributionFailureBehavior = context.getLoadFlowContext().getParameters().getSlackDistributionFailureBehavior();