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

Fix PTDF sign instability #159

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

Fix PTDF sign instability #159

wants to merge 3 commits into from

Conversation

caioluke
Copy link
Member

@caioluke caioluke commented Sep 4, 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)

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Current PTDF values are not sign stable for contingency cases in flow decomposition.
When calculating them, we skip a method that fixes the function value because we apply the contigency modifications directly to the network.

What is the new behavior (if this is a feature change)?
PTDF signs for contingency cases are sign stable.

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

  • Yes
  • No

Signed-off-by: Caio Luke <caioluke97@gmail.com>
Copy link
Contributor

@OpenSuze OpenSuze 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 for your PR !

I have a lot of questions !

  1. Do you have any test to highlight this behavior ?
  2. Could you document the reason of the sign flipping in the documentation ?
  3. Is it an issue with any rescaler that are based on a terminal ?
  4. Could you refactor this code to avoid comments ?
  5. Could you provide something like an empty contingency to trigger the fixZeroFunctionReference instead of duplicating code ?
  6. Why are they not rescaling when there is no contingency ?
  7. Should this not be a PR in powsybl-open-loadflow ?

@caioluke
Copy link
Member Author

caioluke commented Sep 6, 2024

Thanks for your reply :)

I have a test case but the data is confidential... I will try to come up with a minimal case

Copy link

sonarcloud bot commented Sep 20, 2024

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