-
Notifications
You must be signed in to change notification settings - Fork 7
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
add limit to pst range for sensi changes #758
Conversation
...ommunity/farao/search_tree_rao/linear_optimisation/algorithms/fillers/CoreProblemFiller.java
Outdated
Show resolved
Hide resolved
...ommunity/farao/search_tree_rao/linear_optimisation/algorithms/fillers/CoreProblemFiller.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Thomas Bouquet <63302082+bqth29@users.noreply.github.com>
Co-authored-by: Thomas Bouquet <63302082+bqth29@users.noreply.github.com>
...misation/rao-api/src/main/java/com/farao_community/farao/rao_api/RaoParametersConstants.java
Outdated
Show resolved
Hide resolved
...main/java/com/farao_community/farao/rao_api/json/JsonRangeActionsOptimizationParameters.java
Outdated
Show resolved
Hide resolved
...in/java/com/farao_community/farao/rao_api/parameters/RangeActionsOptimizationParameters.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/farao_community/farao/search_tree_rao/commons/parameters/TreeParameters.java
Outdated
Show resolved
Hide resolved
public boolean getCapPstVariation() { | ||
return capPstVariation; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you really need a public getter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use it in 2 different test packages, that is why i made it public. But i do not understand why is this an issue as there are other public getters in the same class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we usually avoid exposing methods that are not needed in the main part of the code. this makes the design of the classes cleaner.
If you need to test the value, consider another way, or at least making the getter private package. If it's not possible, then you can keep the getter, it's not a big issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use this method in Leaf.java
which doesn't belong to the same package so i left it public (as getStopCriterion
, getLeavesInParallel
etc. that are used in SearchTree.java
)
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
The Rao currently assumes that the impact of a PST on a CNEC is linear. But in AC mode, this approximation is not true.
Therefore, the MIP can choose a solution which is in fact worse than the previous iteration. Currently, when this happens the MIP stops and keeps the best iteration (the last one).
What is the new behavior?
This PR allows the MIP to continue even though it found a worse solution. It keeps in mind the best solution and continue until it reaches max_iteration.
Moreover, we diminish the pst relative variation at each iteration to avoid the MIP to behave as seen on the left picture below.
The factor 2/3 has been chosen to allow, if needed, the PST to come back to its initial tap. Here is an example of the new behavior:
The PST has 32 taps (-16 to +16). In initial state, its tap position is -16. After the 1st iteration, its tap position is +16 and the MIP has worsen the result. It will run 2nd iteration but for this iteration the PST can only go from tap -5.3 (tap 16 - 32 taps * 2/3) to tap +16. And for the next iterations, its admissible range will shrink to : previous iteration tap +- 32 taps * (2/3)^current iteration number.