Closed rolnico closed 3 months ago
This is another possible solution that would close https://github.com/powsybl/powsybl-core/pull/3069
Should the Tie Line and HVDC Line become Connectables ?
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
93.6% Coverage on New Code
0.0% Duplication on New Code
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem? No
What kind of change does this PR introduce? Bug fix + new Feature
What is the current behavior? If you use for example a ConnectableConnection on a non-existing connectable or on a TieLine (which is not a Connectable), the application of the NetworkModification will crash due to a null pointer exception. This is due to the fact that only Connectables are managed since Tie Lines and HVDC Lines do not have connect/disconnect methods.
What is the new behavior (if this is a feature change)? Tie Lines and HVDC Lines now have connect and disconnect methods implemented. Network modification for connection and disconnection now also work with Tie Lines and HVDC Lines.
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
If you had your own implementation for HVDC Lines, you now need to implement the following methods:
If you had your own implementation for Tie Lines, you now need to implement the following methods: