Open sylvlecl opened 3 years ago
Thanks a lot @sylvlecl for this well described issue. The code to solve this issue could be quite consequent as all the sensitivity analysis are performed on the bus view. We made this choice for performance issue as a first approach. But, you are right this kind of propagation is not well handled. I propose to solve this issue in two steps:
I agree with @annetill on how to handle this issue. This seems to me to be the right approach.
@sylvlecl helps us with a test case: https://github.com/powsybl/powsybl-open-loadflow/commit/cf20b9d5a1b6a6a7d82db697a343c8a5e2880d9d
Bug.
Sensitivity analysis is performed without keeping switches which are necessary for proper propagation of some contingencies.
TODO
Contingencies should correctly propagate in AC sensitivity analysis, opening all relevant switches, like in AC security analysis.
An issue seems to be that fast DC sensitivity analysis cannot handle, for now, that kind of contingencies. Therefore, for DC analysis, we could either:
throw if such a contingency is defined in inputs, with an explicative message
not propagate that kind of contingencies, but we should have a warning / doc about this
Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, spectrum, etc)
In version 0.7.0, propagated contingencies ended with an exception:
Since commit https://github.com/powsybl/powsybl-open-loadflow/commit/32b3b5fc15589af485d9b970e95dda5b1d2b8a82, there is no more exception, but the behaviour is not right: switches are just skipped, they stay closed whereas they should open.
It would make sense, at least for AC sensitivity analysis, to keep breakers in order to be able to properly propagate contingencies, like in AC security analysis.