powsybl-open-loadflow
powsybl-open-loadflow copied to clipboard
Security Analysis: Fix Generator initialTargetP in OperatorStrategies
Please check if the PR fulfills these requirements
- [x] The commit message follows our guidelines
- [x] Tests for the changes have been added (for bug fixes / features)
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
If there is a single operator strategy for a contingency, the operator strategy simulation is done using initialTargetP of the basecase state instead of the post-contingency state. Note: No issue if there are multiple operator strategies for a continency, in this case all operator strategies simulations are done using initialTargetP of the post-contingency state, as it should be. But there is a bug in the case of a single unique operator strategy for the contingency.
What is the new behavior (if this is a feature change)? Operator strategies correctly start from the good starting point always.
Does this PR introduce a breaking change or deprecate an API?
- [x] No
Other information:
Fix of https://github.com/powsybl/powsybl-open-loadflow/pull/1041