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 injections ignored on first slack bus when using multiple slacks #1160

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

Conversation

SylvestreSakti
Copy link
Contributor

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?
A previous PR (#1116) fixes injections that are ignored in slack buses when using multiple slacks. But actually, the problem is just partially solved because injections are still ignored when being in the first slack. This is due to the distribution equations.

What is the current behavior?
Example with 3 slack buses

Before the previous fix (#1116) we had these distribution equation between slacks :
slack_p2 - slack_p1 = 0
slack_p3 - slack_p1 = 0

After the previous fix (#1116) we had these distribution equation between slacks :
slack_p2 - slack_p1 = target_p2
slack_p3 - slack_p1 = target_p3

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

Now we have these distribution equation between slacks :
slack_p2 - slack_p1 = target_p2 - target_p1
slack_p3 - slack_p1 = target_p3 - target_p1

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

  • Yes
  • No

Other information:

void loadOnSlackBusTest(boolean ac) {
@ParameterizedTest(name = "ac : {0}, switchSlacks : {1}")
@MethodSource("allModelAndSwitchingTypes")
void loadOnSlackBusTest(boolean ac, boolean switchSlacks) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add another test that runs one (or more models) with one slack and without multiple and checks that the solution is close enough ? (bus injections, bus voltage, terminal flows...)

Copy link
Contributor Author

@SylvestreSakti SylvestreSakti Dec 20, 2024

Choose a reason for hiding this comment

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

Yes, done a few minutes ago, I'll add more asserts to check bus injections, bus voltages as you mentioned (in the test differentNbSlackbusesTest)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
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.

2 participants