pypowsybl.network.connect_voltage_level_on_line#

connect_voltage_level_on_line(network, df=None, raise_exception=True, reporter=None, report_node=None, **kwargs)[source]#

Cuts an existing line in two lines and connects an existing voltage level between them.

This method cuts an existing line in two lines and connect an existing voltage level between them. The voltage level should be added to the network just before calling this method, and should contain at least a configured bus in bus/breaker topology or a bus bar section in node/breaker topology.

Parameters:
  • network (Network) – the network

  • df (DataFrame | None) –

    attributes as a dataframe, it should contain:

    • bbs_or_bus_id: The ID of the configured bus or bus bar section to which the lines will be connected.

    • line_id: the ID ot the line on which the voltage level should be connected.

    • position_percent: when the existing line is cut, percent is equal to the ratio between the parameters of the first line

      and the parameters of the line that is cut multiplied by 100. 100 minus percent is equal to the ratio between the parameters of the second line and the parameters of the line that is cut multiplied by 100.

    • line1_id: when the initial line is cut, the line segment at side 1 will receive this ID (optional).

    • line1_name: when the initial line is cut, the line segment at side 1 will receive this name (optional).

    • line2_id: when the initial line is cut, the line segment at side 2 will receive this ID (optional).

    • line2_name: when the initial line is cut, the line segment at side 2 will receive this name (optional).

  • raise_exception (bool) – optionally, whether the calculation should throw exceptions. In any case, errors will be logged. Default is True.

  • reporter (ReportNode | None) – optionally, the reporter to be used to create an execution report, default is None (no report).

  • **kwargs (_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) – attributes as keyword arguments

  • report_node (ReportNode | None) –

  • **kwargs

Return type:

None