pypowsybl.network.Network.get_branches#

Network.get_branches(all_attributes=False, attributes=None, **kwargs)[source]#

Get a dataframe of branches

Parameters:
  • all_attributes (bool) – flag for including all attributes in the dataframe, default is false

  • attributes (List[str] | None) – attributes to include in the dataframe. The 2 parameters are mutually exclusive. If no parameter is specified, the dataframe will include the default attributes.

  • kwargs (_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) –

Returns:

A dataframe of branches.

Return type:

DataFrame

Notes

The resulting dataframe, depending on the parameters, will include the following columns:

  • type: the type of the branch (line or 2 windings transformer)

  • voltage_level1_id: voltage level where the branch is connected, on side 1

  • node1 (optional): node where this branch is connected on side 1, in node-breaker voltage levels

  • bus_breaker_bus1_id (optional): bus of the bus-breaker view where this branch is connected, on side “1”

  • connected1: True if the side “1” of the branch is connected to a bus

  • bus1_id: bus where this branch is connected, on side 1

  • voltage_level2_id: voltage level where the branch is connected, on side 2

  • node2 (optional): node where this branch is connected on side 2, in node-breaker voltage levels

  • bus_breaker_bus2_id (optional): bus of the bus-breaker view where this branch is connected, on side “2”

  • connected2: True if the side “2” of the branch is connected to a bus

  • bus2_id: bus where this branch is connected, on side 2

  • p1: the active flow on the branch at its “1” side, NaN if no loadflow has been computed (in MW)

  • q1: the reactive flow on the branch at its “1” side, NaN if no loadflow has been computed (in MVAr)

  • i1: the current on the branch at its “1” side, NaN if no loadflow has been computed (in A)

  • p2: the active flow on the branch at its “2” side, NaN if no loadflow has been computed (in MW)

  • q2: the reactive flow on the branch at its “2” side, NaN if no loadflow has been computed (in MVAr)

  • i2: the current on the branch at its “2” side, NaN if no loadflow has been computed (in A)

  • selected_limits_group_1 (optional): Name of the selected operational limits group selected for side 1

  • selected_limits_group_2 (optional): Name of the selected operational limits group selected for side 2

This dataframe is indexed on the branch ID.