powsybl-core icon indicating copy to clipboard operation
powsybl-core copied to clipboard

Refactoring of Boundaries implementations

Open sebalaig opened this issue 3 years ago • 0 comments

  • Do you want to request a feature or report a bug? Refactoring

  • What is the current behavior? 2 problems:

  1. 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.
  1. HalfLine Boundary can be instanciated earlier in TieLine's constructor without calling attach
  • 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 and getA 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)

sebalaig avatar Apr 16 '21 14:04 sebalaig