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

Refactor separation of post contingency calculations in Woodbury DC Security Analysis #1125

Merged

Conversation

p-arvy
Copy link
Member

@p-arvy p-arvy commented Nov 20, 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?

No.

What kind of change does this PR introduce?

The distinction between post contingency result computation is refactored in Woodbury DC Security Analysis.

What is the current behavior?

In current behavior, code is duplicated. The only difference between the two calculations is the method used to calculate post contingency states (conditionned by post contingency connectivity result).

What is the new behavior (if this is a feature change)?
The code is mutualized.

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:

Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
@p-arvy p-arvy changed the title [WIP] Refactor connectivity separation in Woodbury DC Security Analysis [WIP] Refactor separation of post contingency calculations in Woodbury DC Security Analysis Nov 20, 2024
@p-arvy p-arvy requested a review from vidaldid-rte November 20, 2024 16:57
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.

This is much better ! Thanks. Can you remove the WIP ?

@p-arvy p-arvy changed the title [WIP] Refactor separation of post contingency calculations in Woodbury DC Security Analysis Refactor separation of post contingency calculations in Woodbury DC Security Analysis Nov 21, 2024
@p-arvy
Copy link
Member Author

p-arvy commented Nov 21, 2024

This is much better ! Thanks. Can you remove the WIP ?

Thank you for the review. Done.

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.

As discussed with the team I would find it easier to read if the BiConsumer postContingencyResultAdder was instead defined as a method (because here we start reading runSimulations with this thing out of the calling context.
But OK to merge since this solves the issue of duplicated code.

Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: p-arvy <pierre.arvy@artelys.com>
@p-arvy
Copy link
Member Author

p-arvy commented Nov 25, 2024

As discussed with the team I would find it easier to read if the BiConsumer postContingencyResultAdder was instead defined as a method (because here we start reading runSimulations with this thing out of the calling context. But OK to merge since this solves the issue of duplicated code.

Okay, thanks for the comment. I moved the BiConsumer postContingencyResultAdder into a method to simplify reading. This should also help to better manage the computation logic when we'll add actions.

@vidaldid-rte vidaldid-rte merged commit 578f263 into main Nov 26, 2024
7 checks passed
@vidaldid-rte vidaldid-rte deleted the refactor-connectivity-break-distinction-in-woodbury-dc-sa branch November 26, 2024 11:54
vidaldid-rte pushed a commit that referenced this pull request Dec 11, 2024
…ecurity Analysis (#1125)

Signed-off-by: p-arvy <pierre.arvy@artelys.com>
Signed-off-by: Didier Vidal <didier.vidal_externe@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants