-
Notifications
You must be signed in to change notification settings - Fork 11
Split AIC remaining slack mismatch into several distributions, one per area #1283
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
Open
vmouradian
wants to merge
17
commits into
main
Choose a base branch
from
bugfix/aic-remaining-slack
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+255
−67
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: vmouradian <[email protected]>
Signed-off-by: vmouradian <[email protected]>
m-guibert
reviewed
Oct 16, 2025
...main/java/com/powsybl/openloadflow/lf/outerloop/AbstractAreaInterchangeControlOuterLoop.java
Outdated
Show resolved
Hide resolved
...main/java/com/powsybl/openloadflow/lf/outerloop/AbstractAreaInterchangeControlOuterLoop.java
Outdated
Show resolved
Hide resolved
…orts/logs Signed-off-by: vmouradian <[email protected]>
Signed-off-by: vmouradian <[email protected]>
Signed-off-by: vmouradian <[email protected]>
Signed-off-by: vmouradian <[email protected]>
Signed-off-by: vmouradian <[email protected]>
Signed-off-by: vmouradian <[email protected]>
m-guibert
reviewed
Oct 31, 2025
...main/java/com/powsybl/openloadflow/lf/outerloop/AbstractAreaInterchangeControlOuterLoop.java
Outdated
Show resolved
Hide resolved
Member
|
the 3 sonar issues should be resolvable |
Signed-off-by: vmouradian <[email protected]>
Signed-off-by: vmouradian <[email protected]>
Signed-off-by: vmouradian <[email protected]>
m-guibert
reviewed
Nov 26, 2025
...main/java/com/powsybl/openloadflow/lf/outerloop/AbstractAreaInterchangeControlOuterLoop.java
Outdated
Show resolved
Hide resolved
...main/java/com/powsybl/openloadflow/lf/outerloop/AbstractAreaInterchangeControlOuterLoop.java
Outdated
Show resolved
Hide resolved
...main/java/com/powsybl/openloadflow/lf/outerloop/AbstractAreaInterchangeControlOuterLoop.java
Outdated
Show resolved
Hide resolved
...main/java/com/powsybl/openloadflow/lf/outerloop/AbstractAreaInterchangeControlOuterLoop.java
Outdated
Show resolved
Hide resolved
Signed-off-by: vmouradian <[email protected]>
|
m-guibert
approved these changes
Nov 27, 2025
jeandemanged
approved these changes
Nov 27, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Bug fix
Context
During AIC outerloop active power is distributed over each area until the mismatch (interchange mismatch + slack of the area) is below 'areaInterchangePMaxMismatch'.
When all areas match this condition, it can happen that the slack remaining on the slack bus is above 'slackBusPMaxMismatch'.
This slack mismatch is then distributed over all areas -> the way that this distribution is done is the bugfix here.
What is the current behavior?
The mismatch is distributed in one activePowerDistribution run on all buses.
This causes a bug. Due to the reset at the begining of the distribution.
Generators are reset to their initial state at the begining, then the mismatch is distributed equally over all generators.
This means all the interchange mismatch distribution is undone and just the slack lislatch is distributed.
This adds a lot of iterations utill the AIC is complete and even leads to reach the iteration limit making the LF fail.
What is the new behavior (if this is a feature change)?
The distributed individually on each area with a dedicated ActivePowerDistribution run, so the previous distributions are kept.
To attribute the participation of each area this logic has been added :
This distribution will affect each area's interchange and will not necessarily make it closer to its target.
The distribution factor of each area will be computed in a way that minimises chances of having areas increase their interchange mismatch up to more than areaInterchangePMaxMismatch in absolute value.
So the factor is proportional to the "margin" that the area can distribute while keeping
-areaInterchangePMaxMismatch < area_total_mismatch < areaInterchangePMaxMismatch.
It is computed like this:
factor = sign(slack_bus_mismatch) * area_total_mismatch + areaInterchangePMaxMismatch
Then factors are normalized to have sum of factors equal to 1.
The distribution is done starting by the areas with the higher factor to the lowest.
In case the power to distribute for an area is under P_RESIDUE_EPS, then P_RESIDUE_EPS is distributed.
The distribution stops when the remaining mismatch to distribute is under P_RESIDUE_EPS.
Does this PR introduce a breaking change or deprecate an API?