pypowsybl.network.Network.get_voltage_levels#

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

Get a dataframe of voltage levels.

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

  • attributes (Optional[List[str]]) – 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 (Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]) – the data to be selected, as named arguments.

Returns:

A dataframe of voltage levels.

Return type:

DataFrame

Notes

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

  • substation_id: at which substation the voltage level belongs

  • nominal_v: The nominal voltage

  • high_voltage_limit: the high voltage limit

  • low_voltage_limit: the low voltage limit

  • fictitious (optional): True if the voltage level is part of the model and not of the actual network

  • topology_kind (optional): the voltage level topology kind (NODE_BREAKER or BUS_BREAKER)

This dataframe is indexed by the id of the voltage levels

Examples

net = pp.network.create_four_substations_node_breaker_network()
net.get_voltage_levels()

will output something like:

substation_id

nominal_v

high_voltage_limit

low_voltage_limit

id

S1VL1

S1

225.0

240.0

220.0

S1VL2

S1

400.0

440.0

390.0

S2VL1

S2

400.0

440.0

390.0

S3VL1

S3

400.0

440.0

390.0

S4VL1

S4

400.0

440.0

390.0

net = pp.network.create_four_substations_node_breaker_network()
net.get_voltage_levels(all_attributes=True)

will output something like:

substation_id

nominal_v

high_voltage_limit

low_voltage_limit

id

S1VL1

S1

225.0

240.0

220.0

S1VL2

S1

400.0

440.0

390.0

S2VL1

S2

400.0

440.0

390.0

S3VL1

S3

400.0

440.0

390.0

S4VL1

S4

400.0

440.0

390.0

net = pp.network.create_four_substations_node_breaker_network()
net.get_voltage_levels(attributes=['substation_id','nominal_v'])

will output something like:

substation_id

nominal_v

id

S1VL1

S1

225.0

S1VL2

S1

400.0

S2VL1

S2

400.0

S3VL1

S3

400.0

S4VL1

S4

400.0