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

ContingencyLoadFlowParameters extension support in Security Analysis #1156

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

vmouradian
Copy link
Member

@vmouradian vmouradian commented Dec 17, 2024

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?

Final part of #1091

Since AIC can be activated only for a contingency, LfNetWorkLoader now needs to always converts the areas.

What is the new behavior (if this is a feature change)?
Uses the class ContingencyLoadFlowParameters created in #1139 in SA calculations

Final part of the work on #1091

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:

@vmouradian vmouradian self-assigned this Dec 17, 2024
@vmouradian vmouradian changed the title [WIP] Feature : SA : Use Contingency LoadFlow Parameters Extension [WIP] Feature : SA : Reconfigure slack distribution outer loops per contingency using an extension Dec 17, 2024
@vmouradian vmouradian changed the title [WIP] Feature : SA : Reconfigure slack distribution outer loops per contingency using an extension [WIP] Feature : SA : Reconfigure power distribution per contingency using an extension Dec 17, 2024
@vmouradian vmouradian requested a review from m-guibert December 18, 2024 09:54
@vmouradian vmouradian force-pushed the feature/refactor-outer-loops branch from 5d88652 to 1a417ae Compare December 18, 2024 15:13
Base automatically changed from feature/refactor-outer-loops to feature/contingency-parameters-extension December 18, 2024 15:14
@vmouradian vmouradian force-pushed the feature/use-contingency-parameters-extension branch from 69d7eff to b59bda3 Compare December 18, 2024 15:14
@vmouradian vmouradian changed the title [WIP] Feature : SA : Reconfigure power distribution per contingency using an extension [WIP] SA : Reconfigure power distribution per contingency using an extension Dec 18, 2024
@vmouradian vmouradian force-pushed the feature/use-contingency-parameters-extension branch from b59bda3 to 0f157c9 Compare December 18, 2024 16:16
@vmouradian vmouradian force-pushed the feature/contingency-parameters-extension branch from 69fe35c to 5a6aa8d Compare December 18, 2024 16:16
@vmouradian vmouradian force-pushed the feature/use-contingency-parameters-extension branch from 0f157c9 to 6229d23 Compare December 24, 2024 09:23
@vmouradian vmouradian force-pushed the feature/contingency-parameters-extension branch from 3b552cf to 2ed030b Compare January 6, 2025 16:55
@vmouradian vmouradian force-pushed the feature/use-contingency-parameters-extension branch from 6229d23 to 3cf9f83 Compare January 6, 2025 16:55
@vmouradian vmouradian force-pushed the feature/contingency-parameters-extension branch from 2ed030b to aefec28 Compare January 16, 2025 10:40
@vmouradian vmouradian force-pushed the feature/use-contingency-parameters-extension branch from 3cf9f83 to 2bdbabc Compare January 16, 2025 10:49
@vmouradian vmouradian changed the title [WIP] SA : Reconfigure power distribution per contingency using an extension [WIP] SA : Reconfigure power distribution per contingency using ContengencyLoadFlowParameters extension Jan 16, 2025
@jeandemanged jeandemanged changed the title [WIP] SA : Reconfigure power distribution per contingency using ContengencyLoadFlowParameters extension [WIP] SA: Reconfigure power distribution per contingency using ContingencyLoadFlowParameters extension Jan 16, 2025
Base automatically changed from feature/contingency-parameters-extension to main January 16, 2025 17:27
@vmouradian vmouradian force-pushed the feature/use-contingency-parameters-extension branch from 2bdbabc to 2b17067 Compare January 16, 2025 18:23
@vmouradian vmouradian changed the title [WIP] SA: Reconfigure power distribution per contingency using ContingencyLoadFlowParameters extension SA: Reconfigure power distribution per contingency using ContingencyLoadFlowParameters extension Jan 16, 2025
@vmouradian vmouradian requested review from m-guibert and removed request for m-guibert January 17, 2025 09:10
@jeandemanged jeandemanged changed the title SA: Reconfigure power distribution per contingency using ContingencyLoadFlowParameters extension ContingencyLoadFlowParameters extension support in Security Analysis Jan 22, 2025
Copy link
Member

@jeandemanged jeandemanged left a comment

Choose a reason for hiding this comment

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

Thank you, I did some cleanup: you forgot to use the AbstractSecurityAnalysis / AcSecurityAnalysis / DcSecurityAnalysis inheritance, making this simpler imho.

But there is some more work needed about outerloop reconfiguration, I wrote a suggestion, let me know what you think.

@vmouradian vmouradian force-pushed the feature/use-contingency-parameters-extension branch from 46fcfc0 to 9ad5082 Compare January 27, 2025 10:25
@vmouradian vmouradian changed the base branch from main to feature/dc-outerloop-name-param January 28, 2025 16:28
@vmouradian vmouradian changed the title ContingencyLoadFlowParameters extension support in Security Analysis [WIP] ContingencyLoadFlowParameters extension support in Security Analysis Jan 28, 2025
docs/security/parameters.md Show resolved Hide resolved

@Override
protected void applyContingencyParameters(AcLoadFlowParameters parameters, ContingencyLoadFlowParameters contingencyParameters, LoadFlowParameters loadFlowParameters, OpenLoadFlowParameters openLoadFlowParameters) {
AcOuterLoopConfig outerLoopConfig = AcOuterLoopConfig.findOuterLoopConfig()
Copy link
Member

Choose a reason for hiding this comment

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

a bit worried of calling AcOuterLoopConfig.findOuterLoopConfig() for each contingency, probably some caching has to be implemented (look for memoize in other powsybl places, e.g. in core)

Copy link
Member Author

Choose a reason for hiding this comment

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

I made a proposal in e45f710, tell me what you think


@Override
protected void applyContingencyParameters(DcLoadFlowParameters parameters, ContingencyLoadFlowParameters contingencyParameters, LoadFlowParameters loadFlowParameters, OpenLoadFlowParameters openLoadFlowParameters) {
DcOuterLoopConfig outerLoopConfig = DcOuterLoopConfig.findOuterLoopConfig()
Copy link
Member

Choose a reason for hiding this comment

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

same here, probably caching needed for DcOuterLoopConfig.findOuterLoopConfig()

@vidaldid-rte vidaldid-rte force-pushed the feature/dc-outerloop-name-param branch from 05ccafe to 310b99c Compare January 29, 2025 12:36
@vmouradian vmouradian force-pushed the feature/use-contingency-parameters-extension branch from 3f42c3a to b3017c9 Compare January 29, 2025 15:15
Base automatically changed from feature/dc-outerloop-name-param to main January 31, 2025 08:34
vmouradian and others added 20 commits January 31, 2025 10:02
…n to add)

Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
@vmouradian vmouradian force-pushed the feature/use-contingency-parameters-extension branch from b3017c9 to 2251959 Compare January 31, 2025 09:11
@vmouradian vmouradian changed the title [WIP] ContingencyLoadFlowParameters extension support in Security Analysis ContingencyLoadFlowParameters extension support in Security Analysis Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for review
Development

Successfully merging this pull request may close these issues.

3 participants