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

Incoherence between documentation and code on IIDM Branch

Open Tristan-WorkGH opened this issue 9 months ago • 0 comments

The interface com.powsybl.iidm.network.Branch javadoc don't match the code of Branch (and all 3 implementations Line, TieLine and TwoWindingsTransformer):

  • it say that x and r are properties of a branch, but the getters aren't declared in it but in com.powsybl.iidm.network.LineCharacteristics for Line+TieLine and directly in TwoWindingsTransformer
  • it say that b1, b2, g1 and g2 are also commons properties but it's only declared in LineCharacteristics but not in TwoWindingsTransformer where we have instead b and g.

So

  1. is x & r really common properties of branches? If yes can it be declared in Branch interface instead because we have otherwise to cast/instanceof on subtypes to access the getters...
  2. the documentation need to be updated for other properties it seems.

PS: haven't found if its also write somewhere in the (html) documentation outside of javadoc.

Tristan-WorkGH avatar Jul 21 '25 10:07 Tristan-WorkGH