Skip to content

Refactor connectivity break analysis to add connectivity loss impact of the contingencies #1192

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

Merged
merged 29 commits into from
Apr 7, 2025

Conversation

p-arvy
Copy link
Member

@p-arvy p-arvy commented Feb 18, 2025

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?

No, but the development is based on the collaborative work of #1169 , aiming to improve the performance of the fast DC SA.
Note that this PR does not directly improve the performance of the fast DC SA but lays the groundwork for it while also improving code quality.

What kind of change does this PR introduce?

The connectivity loss calculation is directly integrated in the class ConnectivityBreakAnalysis, allowing to:

  • Improve code quality;
  • Refactor the case distinction between contingencies that break connectivity or not in the class WoodburyDcSecurityAnalysis;
  • Align the results of the fast DC SA with those of an equivalent load flow (in which the contingencies were applied manually) in the case of a HVDC line without power after the application of a contingency.

Does this PR introduce a new Powsybl Action implying to be implemented in simulators or pypowsybl?

  • Yes, the corresponding issue is here
  • No

What is the current behavior?

Connectivity results are redundantly obtained in the WoodburyDcSecurityAnalysis class. When the LfContingency object is computed for each contingency (as the SA progresses), the ContingencyConnectivityLossImpact is calculated through a connectivity analysis.

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

The connectivity results (ContingencyConnectivityLossImpact) are integrated in the ConnectivityBreakAnalysis.

This approach allows the use of post-contingency connectivity to determine HVDC lines that end up without power, thus aligning the results of the fast DC SA with those of an equivalent load flow (where contingencies were applied manually).

Additionally, since ConnectivityAnalysisResult objects are used for both cases where a contingency either breaks connectivity or not, there is no longer a need to differentiate between these cases using separate method calls to compute the post-contingency state vector.

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:

@p-arvy p-arvy self-assigned this Feb 18, 2025
@p-arvy p-arvy changed the title [WIP] Refactor connectivity break analysis to add connectivity loss impact Refactor connectivity break analysis to add connectivity loss impact of the contingencies Mar 3, 2025
@p-arvy p-arvy requested a review from Hadrien-Godard March 3, 2025 17:27
Signed-off-by: Hadrien <[email protected]>
Signed-off-by: Hadrien <[email protected]>
Hadrien-Godard
Hadrien-Godard previously approved these changes Mar 5, 2025
Copy link
Collaborator

@vidaldid-rte vidaldid-rte left a comment

Choose a reason for hiding this comment

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

Promising refactoring.
I think their is however a bug with HVDC loss detection (see coments).
Some other comments.

p-arvy added 3 commits April 4, 2025 10:18
…-break-analysis

# Conflicts:
#	src/main/java/com/powsybl/openloadflow/sa/WoodburyDcSecurityAnalysis.java
#	src/test/java/com/powsybl/openloadflow/sa/OpenSecurityAnalysisTest.java
Signed-off-by: p-arvy <[email protected]>
Signed-off-by: p-arvy <[email protected]>
@vidaldid-rte vidaldid-rte merged commit c0138fa into main Apr 7, 2025
8 checks passed
@vidaldid-rte vidaldid-rte deleted the connectivity-loss-in-connectivity-break-analysis branch April 7, 2025 10:17
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