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 small reference flow values instead of strict zero #828

Merged
merged 6 commits into from
Aug 31, 2023

Conversation

geofjamg
Copy link
Member

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?

Bug fix

What is the current behavior?

When computing the post contingency reference flow of a line which is in series with another line which is itself the contingency, we would expected to post contingency active power flow to be zero. Instead we have a very small value.

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

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

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
@geofjamg
Copy link
Member Author

How to solve this? The way post contingency reference flows are calculated in a DC sensi analysis make it quite logic to not have strict zero values but a very small values (like 1e-13) because it is calculated from the pre-contingency reference flow substracted from contingency lost flow * sensi. So we cannot really end up to a perfect zero.
On the other end, for a user point of view (which is not supposed to be aware to how it is calculated), it does not really make sens to not have zero.
What about, as a post processing, filtering very small values of post contingency reference flows and replace it by zero?

@geofjamg geofjamg added the bug Something isn't working label Aug 13, 2023
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
@geofjamg geofjamg changed the title [WIP] Fix small reference flow values instead of strict zero Fix small reference flow values instead of strict zero Aug 14, 2023
geofjamg added a commit that referenced this pull request Aug 16, 2023
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
Signed-off-by: Anne Tilloy <anne.tilloy@rte-france.com>
@sonarcloud
Copy link

sonarcloud bot commented Aug 31, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@annetill annetill merged commit 54bd784 into main Aug 31, 2023
@annetill annetill deleted the small_ref_flow_instead_zero branch August 31, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR: next-release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants