powsybl / powsybl-open-loadflow

An open source loadflow based on PowSyBl
Mozilla Public License 2.0
45 stars 7 forks source link

Behaviour of initialization on previous values #429

Open sylvlecl opened 2 years ago

sylvlecl commented 2 years ago

Ambiguous.

When using PREVIOUS_VALUES as initialization option, we may get an exception with following message:

Voltage magnitude is undefined for bus '****'

This can make that option hard to use, because it can happen even after a very minor topology change.

To be discussed: we might want to fill the holes when they occur ? Or maybe we could fall back on a DC values initialization ? Alternatively, maybe this issue must be left for the user to handle, through a try/catch for example, or ensuring that he uses that option only when he is sure to have results on all buses.

geofjamg commented 2 years ago

Similar issue than one described in #188

annetill commented 1 year ago

In case of any operator strategy in the security analysis, we have added this fall back (https://github.com/powsybl/powsybl-open-loadflow/blob/main/src/main/java/com/powsybl/openloadflow/network/util/PreviousValueVoltageInitializer.java). We can discuss now added this for the contingency state computation. @sylvlecl what do you think?