powsybl / pypowsybl

A PowSyBl and Python integration based on GraalVM native image
Mozilla Public License 2.0
54 stars 11 forks source link

Security Analysis module gives wrong loadflow results on PST outages #758

Open nicow-elia opened 4 months ago

nicow-elia commented 4 months ago

Describe the current behavior

Using DC loadflows, when outaging a PST through pypowsybl.security, the loadflow results are incorrect. Using net.remove_elements to remove the PST completely from the grid gives the correct post-outage loadflows, however the result in the security module are different. I am reasonably certain that the results using remove_elements are the correct ones as they match with our internal lodf based computation.

Describe the expected behavior

Loadflows p1_sec and p1_ref are equal up to floating point precision.

Describe the steps

Code to replicate available in this gist.

Environment

Relevant Log Output

image

Extra Information

No response

jeandemanged commented 1 week ago

Hi @nicow-elia ,

This should be fixed starting from PyPowSyBl 1.6.0, did you have the opportunity to re-check ?

Thanks for feedback