Network#
The Network class is the representation of a power network in pypowsybl, it provides methods to access and modify underlying network elements data.
Network creation#
Following methods may be used to create a new network instance:
Load a network from a file. |
|
Load a network from a string. |
|
Load a network from a binary buffer. |
|
Load a network from a list of binary buffers. |
|
Create an empty network. |
|
Create an instance of IEEE 9 bus network |
|
Create an instance of IEEE 14 bus network |
|
Create an instance of IEEE 30 bus network |
|
Create an instance of IEEE 57 bus network |
|
Create an instance of IEEE 118 bus network |
|
Create an instance of IEEE 300 bus network |
|
Create an instance of example 1 network of Eurostag tutorial |
|
Create an instance of example 1 network of Eurostag tutorial with Power limits |
|
Create an instance of powsybl "4 substations" test case. |
|
|
Create an instance of powsybl "4 substations" test case with ConnectablePosition and BusbarSectionPosition extensions. |
Create an instance of micro grid BE CGMES test case |
|
Create an instance of micro grid NL CGMES test case |
Network properties#
ID of this network |
|
Name of this network |
|
Format of the source where this network came from. |
|
Date of this network case, in UTC timezone. |
|
0 for a snapshot. |
|
The nominal power to per unit the network (kVA) |
|
The nominal power to per unit the network (kVA) |
Network elements access#
All network elements are accessible as dataframes, using the following getters.
Note
Once obtained, a dataframe has no more relation to the network it originated from. In particular, changing a dataframe will not change the underlying network. Also, in order to get up-to-date data, for example after a loadflow execution, you will need to call again the corresponding getter.
Get a dataframe of 2 windings transformers. |
|
Get a dataframe of 3 windings transformers. |
|
Get a dataframe of aliases of all network elements. |
|
Get a dataframe of areas. |
|
Get a dataframe of areas boundaries. |
|
Get a dataframe of areas voltage levels. |
|
Get a dataframe of batteries. |
|
Get a dataframe of branches |
|
Get a dataframe of busbar sections. |
|
Get a dataframe of buses from the bus view. |
|
Get a dataframe of buses from the bus/breaker view. |
|
Get a dataframe of dangling lines. |
|
Get a dataframe of generators. |
|
Get a dataframe of HVDC lines. |
|
Get a dataframe of identifiables |
|
Get a dataframe of injections |
|
Get a dataframe of LCC converter stations. |
|
Get a dataframe of lines data. |
|
Get a dataframe of loads. |
|
Get a dataframe of shunt compensators sections for linear model. |
|
Get a dataframe of shunt compensators sections for non linear model. |
|
Get the list of operational limits. |
|
Get a dataframe of phase tap changer steps. |
|
Create a phase tap changers:class:~pandas.DataFrame. |
|
Get a dataframe of ratio tap changer steps. |
|
Create a ratio tap changers:class:~pandas.DataFrame. |
|
Get a dataframe of reactive capability curve points. |
|
Get a dataframe of shunt compensators. |
|
Get a dataframe of static var compensators. |
|
Get substations |
|
Get a dataframe of switches. |
|
Get a dataframe of terminal |
|
Get a dataframe of voltage levels. |
|
Get a dataframe of VSC converter stations. |
|
Get a dataframe of tie lines. |
Bus/Breaker or Node/Breaker topology description of a given voltage level can be retrieved using the following getters:
Get the bus breaker description of the topology of a voltage level. |
|
Get the node breaker description of the topology of a voltage level. |
These getters return an object of the following classes:
Bus-breaker representation of the topology of a voltage level. |
|
Node-breaker representation of the topology of a voltage level. |
Network elements update#
Network elements can be modified using dataframes:
Update 2 windings transformers with data provided as a |
|
Update 3 windings transformers with data provided as a |
|
Update areas with data provided as a |
|
Update batteries with data provided as a |
|
Update buses with data provided as a dataframe or as named arguments. |
|
Update dangling lines with data provided as a |
|
Update generators with data provided as a |
|
Update HVDC lines with data provided as a |
|
Update VSC converter stations with data provided as a |
|
Update shunt compensators with data provided as a |
|
Update lines data with data provided as a |
|
Update loads with data provided as a |
|
Update non linear shunt compensators sections with data provided as a |
|
Update phase tap changers with data provided as a |
|
Update ratio tap changers with data provided as a |
|
Update shunt compensators with data provided as a |
|
Update static var compensators with data provided as a |
|
Update substations with data provided as a |
|
Update switches with data provided as a |
|
Update voltage levels with data provided as a |
|
Update VSC converter stations with data provided as a |
|
Get a dataframe of properties of all network elements. |
|
Add properties to network elements, provided as a |
|
Remove properties from a list of network elements |
|
Adds aliases to network elements. |
|
Removes aliases of network elements. |
Network elements creation and removal#
Network elements can be created or removed using the following methods:
Creates 2 windings transformers. |
|
Creates three-winding transformers. |
|
Create areas. |
|
Associate voltage levels to (existing) areas. |
|
Define boundaries of (existing) areas. |
|
Creates batteries. |
|
Creates bus bar sections. |
|
Creates buses in bus-breaker voltage levels. |
|
Creates reactive limits as "curves". |
|
Creates dangling lines. |
|
Creates generators. |
|
Creates HVDC lines. |
|
Creates internal connections. |
|
Creates LCC converter stations. |
|
Creates lines. |
|
Create loads. |
|
Creates reactive limits of type min/max. |
|
Creates operational limits. |
|
Create phase tap changers on transformers. |
|
Create ratio tap changers on transformers. |
|
Create shunt compensators. |
|
Creates static var compensators. |
|
Creates substations. |
|
Creates switches. |
|
Creates voltage levels. |
|
Creates VSC converter stations. |
|
Creates tie lines from two dangling lines. |
|
Removes elements from the network. |
|
Removes internal connections. |
Network variants management#
Network variants may be used to manage multiple states of the network efficiently.
The current working variant ID. |
|
Creates a copy of the source variant |
|
Changes the working variant. |
|
Removes a variant from the network. |
|
Get the list of existing variant IDs. |
Network elements extensions#
Get the list of available extensions. |
|
Get more information about extensions |
|
Get an extension as a |
|
create extensions of network elements with data provided as a |
|
Update extensions of network elements with data provided as a |
|
Removes network elements extensions, given the extension's name. |
Miscellaneous network functions#
Reduce to a smaller network according to the following parameters |
|
Merges networks into this one. |
|
Create a single line diagram from a voltage level or a substation. |
|
Create a single line diagram in SVG format from a voltage level or a substation and write to a file. |
|
Create a single line diagram from multiple substations |
|
|
Create a single line diagram in SVG format from a voltage level or a substation and write to a file. |
Create a network area diagram. |
|
Deprecated since version 1.1.0. |
|
Gathers the name of the displayed voltage levels of a network-area diagram in a list, according to the input voltage level(s) and the depth of the diagram. |
|
The network's validation level. |
|
Validate the network. |
|
Set the minimum validation level for the network. |
I/O#
Load a network from a file. |
|
Load a network from a string. |
|
Load a network from a binary buffer. |
|
Load a network from a list of binary buffers. |
|
Deprecated since version 1.1.0. |
|
Deprecated since version 1.1.0. |
|
Get list of supported import formats |
|
Supported import parameters for a given format. |
|
Get list of supported import post processors |
|
Get list of supported export formats |
|
Get supported export parameters infos for a given format |
|
Save a network to a file using the specified format. |
|
Save a network to a string using a specified format. |
|
Save a network to a binary buffer using a specified format. |
Advanced network modifications#
Creates a transformer and connects it to buses or busbar sections through standard feeder bays. |
|
Creates a line and connects it to buses or busbar sections through standard feeder bays. |
|
Creates a load, connects it to the network on a given bus or busbar section and creates the associated topology. |
|
Creates a battery, connects it to the network on a given bus or busbar section and creates the associated topology. |
|
Creates a dangling line, connects it to the network on a given bus or busbar section and creates the associated topology. |
|
Creates a generator, connects it to the network on a given bus or busbar section and creates the associated topology. |
|
Creates a shunt compensator, connects it to the network on a given bus or busbar section and creates the associated topology. |
|
Creates a static var compensator, connects it to the network on a given bus or busbar section and creates the associated topology. |
|
Creates a lcc converter station, connects it to the network on a given bus or busbar section and creates the associated topology. |
|
Creates a vsc converter station, connects it to the network on a given bus or busbar section and creates the associated topology. |
|
Connects an existing voltage level to an existing line through a tee point. |
|
This method reverses the action done in the create_line_on_line method. |
|
Cuts an existing line in two lines and connects an existing voltage level between them. |
|
This method reverses the action done in the connect_voltage_level_on_line method. |
|
This method transforms the action done in the create_line_on_line function into the action done in the connect_voltage_level_on_line. |
|
This method reverses the action done in the connect_voltage_level_on_line method. |
|
Creates the topology of a given symmetrical voltage level, containing a given number of busbar with a given number of sections. |
|
Creates a coupling device on the network between two busbar sections of a same voltage level. |
Utility functions#
Gets the order positions of every connectable of a given voltage level in a dataframe. |
|
Gets all the available order positions before a busbar section. |
|
Gets all the available order positions after a busbar section. |