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

DC Load Flow reference bus and multi slack support #1118

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

Conversation

vmouradian
Copy link
Member

@vmouradian vmouradian commented Nov 7, 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?

Handles multi slack for DC load flow
Fixes #1117

What kind of change does this PR introduce?

Feature and bugfix

What is the current behavior?

see #1117

What is the new behavior (if this is a feature change)?
DC Load Flow properly account for the selected reference bus - also important for the DC Values Voltage Initializer before the Newton-Raphson.
Only first slack bus has p balance equation deactivated.
For other slack buses the corresponding value in target vector is updated : (finalTarget = targetP + totalSlack/nbSlackBuses)

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

  • No

Signed-off-by: vmouradian <[email protected]>
@vmouradian vmouradian changed the title Feature : DC multi slack support Feature #1117 : DC multi slack support Nov 7, 2024
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.

I would be nice also to explain multi slack handling in documentation.
In DC we can take shortcuts because it is a lossless model. In AC it is a different story.

@jeandemanged jeandemanged changed the title Feature #1117 : DC multi slack support DC Load Flow multi slack support Nov 8, 2024
@geofjamg
Copy link
Member

geofjamg commented Nov 8, 2024

I would be nice also to explain multi slack handling in documentation. In DC we can take shortcuts because it is a lossless model. In AC it is a different story.

So what is the purpose of this feature? In AC, the only aim was to allow convergence for very specific model (large and very imbalanced that was diverging at first NR). But in DC with just a simple linear system solving what could be the point?

@jeandemanged
Copy link
Member

I would be nice also to explain multi slack handling in documentation. In DC we can take shortcuts because it is a lossless model. In AC it is a different story.

So what is the purpose of this feature? In AC, the only aim was to allow convergence for very specific model (large and very imbalanced that was diverging at first NR). But in DC with just a simple linear system solving what could be the point?

This is useful and needed solely when a DC voltage init is used before AC NR, we need to produce angles consistent with what the AC NR is trying to solve. Note that here is also solved an issue about angle reference.

@geofjamg
Copy link
Member

geofjamg commented Nov 8, 2024

I would be nice also to explain multi slack handling in documentation. In DC we can take shortcuts because it is a lossless model. In AC it is a different story.

So what is the purpose of this feature? In AC, the only aim was to allow convergence for very specific model (large and very imbalanced that was diverging at first NR). But in DC with just a simple linear system solving what could be the point?

This is useful and needed solely when a DC voltage init is used before AC NR, we need to produce angles consistent with what the AC NR is trying to solve. Note that here is also solved an issue about angle reference.

Ok it makes sense. Thanks.

@jeandemanged jeandemanged added December 2024 release bug Something isn't working labels Nov 8, 2024
@jeandemanged jeandemanged changed the title DC Load Flow multi slack support DC Load Flow reference bus and multi slack support Nov 12, 2024
Signed-off-by: vmouradian <[email protected]>
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.

ty

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we imagine parametrizing the tests in AcMultipleSlackBusesTests rather than having a whole class DcMultipleSlackBusesTest that implements the same cases ? (To do so maybe a condition can be added in the test to differentiate asserts values between AC and DC)
By doing so, when adding new tests in the future, we would be sure to implement them in both AC and DC mode.

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 agree, here a proposal for this : 2b39a11, what do you think ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you ! It is good for me. #1116 has been merged so the values can be changed for the corresponding test.

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 updated the values in a6ab981

vmouradian and others added 5 commits November 14, 2024 15:42
Signed-off-by: vmouradian <[email protected]>
# Conflicts:
#	src/test/java/com/powsybl/openloadflow/ac/MultipleSlackBusesTest.java
Copy link

sonarcloud bot commented Nov 22, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working December 2024 release
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

Bug: Multi-slack not handled in DC but can happen if used for AC voltage init
4 participants