pypowsybl.network.Network.get_boundary_lines¶
- Network.get_boundary_lines(all_attributes=False, attributes=None, **kwargs)[source]¶
Get a dataframe of boundary lines.
- 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 (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) – the data to be selected, as named arguments.
- Returns:
A dataframe of boundary lines.
- Return type:
DataFrame
Notes
The resulting dataframe, depending on the parameters, will include the following columns:
r: The resistance of the boundary line (Ohm)
x: The reactance of the boundary line (Ohm)
g: the conductance of boundary line (in Siemens)
b: the susceptance of boundary line (in Siemens)
p0: The active power setpoint
q0: The reactive power setpoint
p: active flow on the boundary line,
NaNif no loadflow has been computed (in MW)q: the reactive flow on the boundary line,
NaNif no loadflow has been computed (in MVAr)i: The current on the boundary line,
NaNif no loadflow has been computed (in A)boundary_p (optional): active flow on the boundary line at boundary bus side,
NaNif no loadflow has been computed (in MW)boundary_q (optional): reactive flow on the boundary line at boundary bus side,
NaNif no loadflow has been computed (in MW)boundary_i (optional): current on the boundary line at boundary bus side,
NaNif no loadflow has been computed (in A)boundary_v_mag (optional): voltage magnitude of the boundary bus,
NaNif no loadflow has been computed (in kV)boundary_v_angle (optional): voltage angle of the boundary bus,
NaNif no loadflow has been computed (in degree)voltage_level_id: at which substation the boundary line is connected
bus_id: bus where this line is connected
bus_breaker_bus_id (optional): bus of the bus-breaker view where this line is connected
node (optional): node where this line is connected, in node-breaker voltage levels
connected:
Trueif the boundary line is connected to a busfictitious (optional):
Trueif the boundary line is part of the model and not of the actual networkpairing_key: the pairing key associated to the boundary line, to be used for creating tie lines.
ucte_xnode_code: deprecated for pairing_key.
paired: if the boundary line is paired with a tie line
tie_line_id: the ID of the tie line if the boundary line is paired
This dataframe is indexed by the id of the boundary lines
Examples
net = pp.network.create_boundary_lines_network() net.get_boundary_lines()
will output something like:
r
x
g
b
p0
q0
p
q
i
voltage_level_id
bus_id
connected
id
BL
10.0
1.0
0.0001
0.00001
50.0
30.0
NaN
NaN
NaN
VL
VL_0
True
net = pp.network.create_boundary_lines_network() net.get_boundary_lines(all_attributes=True)
will output something like:
r
x
g
b
p0
q0
p
q
i
voltage_level_id
bus_id
connected
id
BL
10.0
1.0
0.0001
0.00001
50.0
30.0
NaN
NaN
NaN
VL
VL_0
True
net = pp.network.create_boundary_lines_network() net.get_boundary_lines(attributes=['p','q','i','voltage_level_id','bus_id','connected'])
will output something like:
p
q
i
voltage_level_id
bus_id
connected
id
BL
NaN
NaN
NaN
VL
VL_0
True
Note
This note applies only if you are using the per-unit mode in your network (i.e., network.per_unit=True).
If two boundary lines are paired in a tie-line and have different nominal voltages, the per-unit values for boundary_i and boundary_v_mag will differ between the two boundary lines.
Currently, PowSyBl network model does not support the concept of nominal voltage for the boundary fictitious bus. Therefore, the nominal voltage at the boundary line network side is used for per-unit calculations. While this is generally not an issue, this produces counterintuitive results in the case of boundary lines of different nominal voltages.