Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DC security analysis: remove call to sensitivity API #927

Merged
merged 16 commits into from
Jan 8, 2024
Merged

Conversation

annetill
Copy link
Member

@annetill annetill commented Dec 9, 2023

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?

Yes. Issues are:

  • No voltage angle limit support ;
  • No contingency propagation support ;
  • After developing this PR: currents are not supported during remedial action simulations.

What kind of change does this PR introduce?

A big code sharing with AC security analysis, but:

  • Voltage angle limit tests are missing ;
  • Check of current violations for post action state ;
  • Contingency propagation unit tests.

What is the current behavior?

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

  • We don't update i in final state!
  • Zero impedance lines are not monitored during security analysis.

Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@annetill annetill requested a review from geofjamg December 9, 2023 16:04
@@ -238,144 +63,160 @@ private List<OperatorStrategyResult> createOperatorStrategyResults(DcSecurityAna
LfTopoConfig topoConfig = new LfTopoConfig();
findAllSwitchesToOperate(network, actions, topoConfig);

// try to find all pst to retain because involved in pst actions
// try to find all ptc to retain because involved in ptc actions
findAllPtcToOperate(actions, topoConfig);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hadrien-Godard indeed maybe we have to add RTC to operate if DC security analysis is used as a fall back. I think that actions are not going to be filtered and we can fall in issues.

Hadrien-Godard and others added 11 commits December 21, 2023 15:48
Signed-off-by: Hadrien <hadrien.godard@artelys.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
@@ -1887,7 +1876,7 @@ void testDcBusBarSectionContingency() {
assertEquals(433.012, preContingencyNetworkResult.getBranchResult("L2").getI1(), LoadFlowAssert.DELTA_I);

assertEquals(866.025, getPostContingencyResult(result, "BBS1").getNetworkResult().getBranchResult("L2").getI1(), LoadFlowAssert.DELTA_I);
assertEquals(Double.NaN, getPostContingencyResult(result, "BBS1").getNetworkResult().getBranchResult("L1").getI1(), LoadFlowAssert.DELTA_I);
// assertEquals(Double.NaN, getPostContingencyResult(result, "BBS1").getNetworkResult().getBranchResult("L1").getI1(), LoadFlowAssert.DELTA_I);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, DC is conformed to AC computation: no branch result for a disabled line at both side. So the line test has to be removed.

Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@@ -2350,12 +2338,12 @@ void testAcceptableDurations() {
SecurityAnalysisResult result2 = runSecurityAnalysis(network, contingencies.getContingencies(network), Collections.emptyList(), securityAnalysisParameters);

LimitViolation violation4 = new LimitViolation("NHV1_NHV2_2", null, LimitViolationType.CURRENT, "permanent",
2147483647, 900.0, 1.0F, 911.605688194146412890625, TwoSides.ONE);
2147483647, 899.9999999999999, 1.0F, 911.6056881941461, TwoSides.ONE);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

899.99999999 is weird...

Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
@annetill annetill mentioned this pull request Jan 5, 2024
Copy link

sonarqubecloud bot commented Jan 8, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

4 New issues
0 Security Hotspots
91.9% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@geofjamg geofjamg merged commit dd38a35 into main Jan 8, 2024
6 checks passed
@geofjamg geofjamg deleted the slow-dc branch January 8, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants