pypowsybl.network.create_voltage_level_topology#

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

Creates the topology of a given symmetrical voltage level, containing a given number of busbar with a given number of sections.

Parameters:
  • network (Network) – the network in which the busbar sections are.

  • df (DataFrame | None) – Attributes as a dataframe.

  • raise_exception (bool) – whether an exception should be raised if a problem occurs. By default, true.

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

  • report_node (ReportNode | None) – an optional reporter to get functional logs.

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

Return type:

None

Notes

The voltage level must be created and in node/breaker or bus/breaker topology. In node/breaker topology, busbar sections will be created, as well as disconnectors or breakers between each section depending on the switch_kind list. In bus/breaker topology, a matrix of buses will be created containing section_count x aligned_buses_or_busbar_count buses. The buses on the same row of the matrix will be connected via a breaker.

The input dataframe expects these attributes: - voltage_level_id: the identifier of the voltage level where the topology should be created. - low_bus_or_busbar_index: the lowest bus or busbar index to be used. By default, 1 (no other buses or busbar sections). - aligned_buses_or_busbar_count: the total number of busbar or rows of buses to be created. - low_section_index: the lowest section index to be used. By default, 1. - bus_or_busbar_section_prefix_id: an optional prefix to put on the names of the created buses or busbar sections. By default, nothing. - switch_prefix_id: an optional prefix to put on the names of the created switches. By default, nothing. - switch_kinds: string or list containing the type of switch between each section. It should contain section_count - 1 switches and should look like that ‘BREAKER, DISCONNECTOR’ or [‘BREAKER’, ‘DISCONNECTOR’]. - section_count: optionally in node/breaker, required in bus/breaker, the number of sections to be created.

Examples:

pp.network.create_voltage_level_topology(network=network, raise_exception=True, id='VL',
                                         aligned_buses_or_busbar_count=3, switch_kinds='BREAKER, DISCONNECTOR')