pypowsybl.network.revert_create_line_on_line#

revert_create_line_on_line(network, deprecated_line_to_be_merged1_id=None, deprecated_line_to_be_merged2_id=None, deprecated_line_to_be_deleted=None, deprecated_merged_line_id=None, deprecated_merged_line_name=None, df=None, raise_exception=True, reporter=None, report_node=None, **kwargs)[source]#

This method reverses the action done in the create_line_on_line method. It replaces 3 existing lines (with the same voltage level as the one on their side) with a new line, and eventually removes the existing voltage levels (tee point and tapped voltage level), if they contain no equipments anymore, except bus or bus bar section.

Parameters:
  • network (Network) – the network

  • df (DataFrame | None) –

    attributes as a dataframe, it should contain:

    • line_to_be_merged1_id: The id of the first line connected to the tee point.

    • line_to_be_merged2_id: The id of the second line connected to the tee point.

    • line_to_be_deleted: The tee point line that will be deleted

    • merged_line_id: The id of the new line from the two lines to be merged

    • merged_line_name: The name of the new line from the two lines to be merged (default to line id)

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

  • reporter (ReportNode | None) – deprecated, use report_node instead

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

  • deprecated_line_to_be_merged1_id (str | None) – this argument is deprecated, use the dataframe instead

  • deprecated_line_to_be_merged2_id (str | None) – this argument is deprecated, use the dataframe instead

  • deprecated_line_to_be_deleted (str | None) – this argument is deprecated, use the dataframe instead

  • deprecated_merged_line_id (str | None) – this argument is deprecated, use the dataframe instead

  • deprecated_merged_line_name (str | None) – this argument is deprecated, use the dataframe instead

  • **kwargs (str) – attributes as keyword arguments

Return type:

None