powsybl/pypowsybl

Misleading tap_pos (ratio_tap_position1,2,3 and phase_tap_position1,2,3) values for trafo without tap controller

AnkurArohi opened this issue · 0 comments

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

  • What is the current behavior?

Currently in the trafos dataframe one can see for the trafos with no tap controller defined, the tap_pos , referring to the columns ratio_tap_position1,2 and phase_tap_position1,2 as default values (-99999), this leads to inconsistency in the interpretation of the dataframe.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    Simply check the df generated for trafos without any Ratio or phase tap controllers for any trafo ends

  • What is the expected behavior?

Instead of the default value one should post process the dataframe and fiölter out these default values, further replacing them with Nones.
Something like this


df_traf3w=powsybl_net.get_3_windings_transformers()

df_traf3w.query("ratio_tap_position1 == -99999").replace(-99999,None)

Obviously then we still need an update statement to update the dataframe I am not aware of a faster more performant alternative.

  • What is the motivation / use case for changing the behavior?

Data consistency

  • 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)