pypowsybl.network.Network.create_switches#

Network.create_switches(df=None, **kwargs)[source]#

Creates switches.

Parameters:
Return type:

None

Notes

Data may be provided as a dataframe or as keyword arguments. In the latter case, all arguments must have the same length.

Valid attributes are:

  • id: the identifier of the new switch

  • voltage_level_id: the voltage level where the new switch will be connected. The voltage level must already exist.

  • bus1_id: the bus where the new switch will be connected on side 1, if the voltage level has a bus-breaker topology kind.

  • bus2_id: the bus where the new switch will be connected on side 2, if the voltage level has a bus-breaker topology kind.

  • node1: the node where the new switch will be connected on side 1, if the voltage level has a node-breaker topology kind.

  • node2: the node where the new switch will be connected on side 2, if the voltage level has a node-breaker topology kind.

  • name: an optional human-readable name

  • kind: the kind of switch (BREAKER, DISCONNECTOR, LOAD_BREAK_SWITCH)

  • open: true if the switch is open, default false

  • retained: true if the switch should be retained in bus-breaker topology, default false

  • fictitious: true if the switch is fictitious, default false

Examples

Using keyword arguments:

# In a bus-breaker voltage level, between configured buses B1 and B2
network.create_switches(id='BREAKER-1', voltage_level_id='VL1', bus1_id='B1', bus2_id='B2',
                        kind='BREAKER', open=False)

# In a node-breaker voltage level, between nodes 5 and 7
network.create_switches(id='BREAKER-1', voltage_level_id='VL1', node1=5, node2=7,
                        kind='BREAKER', open=False)