diff --git a/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisTest.java b/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisTest.java index e3542ba873..c5ddec4d8f 100644 --- a/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisTest.java +++ b/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisTest.java @@ -4054,9 +4054,15 @@ void testContingencyParameters(boolean isDc) { .setBalanceType(LoadFlowParameters.BalanceType.PROPORTIONAL_TO_GENERATION_P_MAX); // Add contingency LF parameters to contingencies 1 and 3 - ContingencyLoadFlowParameters contLfParams1 = new ContingencyLoadFlowParameters(false, true, LoadFlowParameters.BalanceType.PROPORTIONAL_TO_LOAD); + ContingencyLoadFlowParameters contLfParams1 = new ContingencyLoadFlowParameters() + .setDistributedSlack(false) + .setAreaInterchangeControl(true) + .setBalanceType(LoadFlowParameters.BalanceType.PROPORTIONAL_TO_LOAD); cont1.addExtension(ContingencyLoadFlowParameters.class, contLfParams1); - ContingencyLoadFlowParameters contLfParams3 = new ContingencyLoadFlowParameters(true, false, LoadFlowParameters.BalanceType.PROPORTIONAL_TO_GENERATION_P); + ContingencyLoadFlowParameters contLfParams3 = new ContingencyLoadFlowParameters() + .setDistributedSlack(true) + .setAreaInterchangeControl(false) + .setBalanceType(LoadFlowParameters.BalanceType.PROPORTIONAL_TO_GENERATION_P); cont3.addExtension(ContingencyLoadFlowParameters.class, contLfParams3); // Run security analysis diff --git a/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisWithActionsTest.java b/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisWithActionsTest.java index 9ec37b0e90..92b2b1f6b5 100644 --- a/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisWithActionsTest.java +++ b/src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisWithActionsTest.java @@ -1680,7 +1680,12 @@ void testContingencyParameters(boolean isDc) { // create a contingency with ContingencyLoadFlowParameters extension Contingency contingency1 = new Contingency("load3", new LoadContingency("load3")); - ContingencyLoadFlowParameters contingencyParameters1 = new ContingencyLoadFlowParameters(false, true, LoadFlowParameters.BalanceType.PROPORTIONAL_TO_LOAD); + + ContingencyLoadFlowParameters contingencyParameters1 = new ContingencyLoadFlowParameters() + .setDistributedSlack(false) + .setAreaInterchangeControl(true) + .setBalanceType(LoadFlowParameters.BalanceType.PROPORTIONAL_TO_LOAD); + contingency1.addExtension(ContingencyLoadFlowParameters.class, contingencyParameters1); Action action1 = new GeneratorActionBuilder().withId("action1").withGeneratorId("gen3").withActivePowerRelativeValue(false).withActivePowerValue(45).build();