pypowsybl.network.Network.get_buses¶
- Network.get_buses(all_attributes=False, attributes=None, **kwargs)[source]¶
Get a dataframe of buses from the bus view.
- Parameters:
all_attributes (bool) – flag for including all attributes in the dataframe, default is false
attributes (List[str] | None) – 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 (ArrayLike) – the data to be selected, as named arguments.
- Returns:
A dataframe of buses from the bus view
- Return type:
DataFrame
Notes
The resulting dataframe, depending on the parameters, will include the following columns:
v_mag: Get the voltage magnitude of the bus (in kV)
v_angle: the voltage angle of the bus (in degree)
connected_component: The connected component to which the bus belongs
synchronous_component: The synchronous component to which the bus belongs
voltage_level_id: at which substation the bus is connected
fictitious_p0 (optional): the fictitious active power injection of the bus (in MW, using the load sign convention)
fictitious_q0 (optional): the fictitious reactive power injection of the bus (in MVar, using the load sign convention)
This dataframe is indexed on the bus ID in the bus view.
See also
Examples
net = pp.network.create_four_substations_node_breaker_network() net.get_buses()
It outputs something like:
v_mag
v_angle
connected_component
synchronous_component
voltage_level_id
id
S1VL1_0
224.6139
2.2822
0
1
S1VL1
S1VL2_0
400.0000
0.0000
0
1
S1VL2
S2VL1_0
408.8470
0.7347
0
0
S2VL1
S3VL1_0
400.0000
0.0000
0
0
S3VL1
S4VL1_0
400.0000
-1.1259
0
0
S4VL1
net = pp.network.create_four_substations_node_breaker_network() net.get_buses(all_attributes=True)
It outputs something like:
v_mag
v_angle
connected_component
synchronous_component
voltage_level_id
id
S1VL1_0
224.6139
2.2822
0
1
S1VL1
S1VL2_0
400.0000
0.0000
0
1
S1VL2
S2VL1_0
408.8470
0.7347
0
0
S2VL1
S3VL1_0
400.0000
0.0000
0
0
S3VL1
S4VL1_0
400.0000
-1.1259
0
0
S4VL1
net = pp.network.create_four_substations_node_breaker_network() net.get_buses(attributes=['v_mag','v_angle','voltage_level_id'])
It outputs something like:
v_mag
v_angle
voltage_level_id
id
S1VL1_0
224.6139
2.2822
S1VL1
S1VL2_0
400.0000
0.0000
S1VL2
S2VL1_0
408.8470
0.7347
S2VL1
S3VL1_0
400.0000
0.0000
S3VL1
S4VL1_0
400.0000
-1.1259
S4VL1