-
Notifications
You must be signed in to change notification settings - Fork 8
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 dispatchQ method #529
fix dispatchQ method #529
Conversation
src/main/java/com/powsybl/openloadflow/network/impl/AbstractLfBus.java
Outdated
Show resolved
Hide resolved
src/main/java/com/powsybl/openloadflow/network/impl/AbstractLfBus.java
Outdated
Show resolved
Hide resolved
Sorry by mistake it was closed |
I do not have the option to merge the request but I see all good Thanks. |
Thank you for the review ! |
Aha, I still have a point but it is probably seldom this case lets say even after many iterations the tobedispatchedq is not below the tolerance limit |
I think all the generators will be at the max or min q bound so the loop stops (the generator list will be empty). |
But then additional to the log the amount of tobedispatchedq should be then dispatched to the slack all of it ,naturally we need another Load Flow to confirm that the network is secured and stable but ideally at the end there should be no tobedispatchedQ left |
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 should try to improve the "integration test": it passed before the fix
src/test/java/com/powsybl/openloadflow/ac/AcLoadFlowEurostagTutorialExample1Test.java
Show resolved
Hide resolved
src/test/java/com/powsybl/openloadflow/ac/AcLoadFlowEurostagTutorialExample1Test.java
Show resolved
Hide resolved
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
@EtienneLt |
Kudos, SonarCloud Quality Gate passed! |
It seems that it is already implemented |
🏁🏁🏁🏁🏁😉 |
double residueQ = 0; | ||
double calculatedQ = qToDispatch / generatorsThatControlVoltage.size(); | ||
if (generatorsThatControlVoltage.isEmpty()) { |
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.
This check is not needed because it is done just before calling this method.
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.
This was my suggestion and was to ensure that through debug log User is aeare that there has indeed been no redistribution
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.
Plus we should always consider
Separation of concerns based implementation
Signed-off-by: Etienne LESOT etienne.lesot@rte-france.com
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the rest#526