Skip to content

Commit

Permalink
use new contingency params creation
Browse files Browse the repository at this point in the history
Signed-off-by: vmouradian <[email protected]>
  • Loading branch information
vmouradian committed Jan 6, 2025
1 parent 6bddff5 commit f7060d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit f7060d1

Please sign in to comment.