powsybl-core
powsybl-core copied to clipboard
Refactoring of Boundaries implementations
-
Do you want to request a feature or report a bug? Refactoring
-
What is the current behavior? 2 problems:
- Boundaries implemented for DanglingLines and HalfLines are very similar and some code can be factorized :
- getP()
- getQ()
- getAngle()
- getV() The only difference between both implementations is the way the terminal is retrieved.
- HalfLine Boundary can be instanciated earlier in
TieLine
's constructor without callingattach
-
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem No
-
What is the expected behavior?
DanglingLine::getP
,getQ
,getV
andgetA
can be factorized.HalfLineBoundary::attach
is removed -
What is the motivation / use case for changing the behavior? Code simplification
-
Please tell us about your environment:
- PowSyBl Version: ...
- OS Version: ...
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, spectrum, etc)
(if a question doesn't apply, you can delete it)