powsybl-open-loadflow
powsybl-open-loadflow copied to clipboard
Compute generator remaining margin depending on change direction
Describe the current behavior
In active power distribution, when compution participation factor of a generator with PROPORTIONAL_TO_GENERATION_REMAINING_MARGIN. The participation factor is proportional to max(0, maxP - targetP), even if the distribution should reduce targetP.
Describe the expected behavior
Use max(0, maxP - targetP) if the mismatch to distribute is positive, and max(0, targetP - minP) if mismatch is negative.
Describe the motivation
Customer request. (+ is more consistent)
Extra Information
No response