pypowsybl
pypowsybl copied to clipboard
Dataframes of generic types of network elements (identifiables, injections, branches, terminals)
- Do you want to request a feature or report a bug?
Feature
- What is the current behavior?
When we want to get for example a list of all injections, we need to call multiple methods and concatenate the resulting dataframes. For example, it's pretty hard to get the list of all elements connected to a specific bus.
- What is the expected behavior?
Instead the API could provide native methods to get common information of a generic type:
-
get_identifiables
: all identifiables, with only their id -
get_injections
: all injections with voltage_level_id, bus_id -
get_branches
: all branches with voltage_level1_id, bus1_id, voltage_level2_id, bus2_id -
get_terminals
: the list of all terminals, described by their element_id, element_side, voltage_level_id, bus_id
In particular, the get_terminals
method provides a practical view to the users of those objects which are very important in the java implementation.
I would appreciate some opinion about this API evolution before merging the related PR (thanks @AnkurArohi for the thumbs up ^^ ), in particular about the "terminals" part: @annetill @geofjamg