pypowsybl.network.Network.get_generators¶
- Network.get_generators(all_attributes=False, attributes=None, **kwargs)[source]¶
Get a dataframe of generators.
- 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:
the generators dataframe.
- Return type:
DataFrame
Notes
The resulting dataframe, depending on the parameters, will include the following columns:
energy_source: the energy source used to fuel the generator
target_p: the target active value for the generator (in MW)
max_p: the maximum active value for the generator (MW)
min_p: the minimum active value for the generator (MW)
max_q: the maximum reactive value for the generator only if reactive_limits_kind is MIN_MAX (MVar)
min_q: the minimum reactive value for the generator only if reactive_limits_kind is MIN_MAX (MVar)
max_q_at_target_p (optional): the maximum reactive value for the generator for the target p specified (MVar)
min_q_at_target_p (optional): the minimum reactive value for the generator for the target p specified (MVar)
max_q_at_p (optional): the maximum reactive value for the generator at current p (MVar)
min_q_at_p (optional): the minimum reactive value for the generator at current p (MVar)
rated_s: The rated nominal power (MVA)
reactive_limits_kind: type of the reactive limit of the generator (can be MIN_MAX, CURVE or NONE)
target_v: the target voltage magnitude value for the generator (in kV)
- equivalent_local_target_v (optional): a local target voltage value expected to be consistent with the remote target voltage (in kV)
(to be used by simulators that deactivate the remote voltage algorithms, or by dynamic simulators that use this voltage as a starting value)
target_q: the target reactive value for the generator (in MVAr)
voltage_regulator_on:
Trueif the generator regulates voltageregulated_element_id: the ID of the network element where voltage is regulated
regulated_bus_id: the ID of the bus from bus view where voltage is regulated
regulated_bus_breaker_bus_id: the ID of the bus from bus/breaker view where voltage is regulated
p: the actual active production of the generator (
NaNif no loadflow has been computed)q: the actual reactive production of the generator (
NaNif no loadflow has been computed)i: the current on the generator,
NaNif no loadflow has been computed (in A)voltage_level_id: at which substation this generator is connected
bus_id: bus where this generator is connected
bus_breaker_bus_id (optional): bus of the bus-breaker view where this generator is connected
node (optional): node where this generator is connected, in node-breaker voltage levels
condenser (optional):
Trueif the generator is a condenserconnected:
Trueif the generator is connected to a busfictitious (optional):
Trueif the generator is part of the model and not of the actual network
This dataframe is indexed on the generator ID.
Examples
net = pp.network.create_ieee14() net.get_generators()
will output something like:
energy_source
target_p
max_p
min_p
target_v
target_q
voltage_regulator_on
p
q
voltage_level_id
bus_id
id
B1-G
OTHER
232.4
9999.0
-9999.0
1.060
-16.9
True
NaN
NaN
VL1
VL1_0
B2-G
OTHER
40.0
9999.0
-9999.0
1.045
42.4
True
NaN
NaN
VL2
VL2_0
B3-G
OTHER
0.0
9999.0
-9999.0
1.010
23.4
True
NaN
NaN
VL3
VL3_0
B6-G
OTHER
0.0
9999.0
-9999.0
1.070
12.2
True
NaN
NaN
VL6
VL6_0
B8-G
OTHER
0.0
9999.0
-9999.0
1.090
17.4
True
NaN
NaN
VL8
VL8_0
net = pp.network.create_ieee14() net.get_generators(all_attributes=True)
will output something like:
energy_source
target_p
max_p
min_p
target_v
target_q
voltage_regulator_on
p
q
voltage_level_id
bus_id
id
B1-G
OTHER
232.4
9999.0
-9999.0
1.060
-16.9
True
NaN
NaN
VL1
VL1_0
B2-G
OTHER
40.0
9999.0
-9999.0
1.045
42.4
True
NaN
NaN
VL2
VL2_0
B3-G
OTHER
0.0
9999.0
-9999.0
1.010
23.4
True
NaN
NaN
VL3
VL3_0
B6-G
OTHER
0.0
9999.0
-9999.0
1.070
12.2
True
NaN
NaN
VL6
VL6_0
B8-G
OTHER
0.0
9999.0
-9999.0
1.090
17.4
True
NaN
NaN
VL8
VL8_0
net = pp.network.create_ieee14() net.get_generators(attributes=['energy_source','target_p','max_p','min_p','p','voltage_level_id','bus_id'])
will output something like:
energy_source
target_p
max_p
min_p
p
voltage_level_id
bus_id
id
B1-G
OTHER
232.4
9999.0
-9999.0
NaN
VL1
VL1_0
B2-G
OTHER
40.0
9999.0
-9999.0
NaN
VL2
VL2_0
B3-G
OTHER
0.0
9999.0
-9999.0
NaN
VL3
VL3_0
B6-G
OTHER
0.0
9999.0
-9999.0
NaN
VL6
VL6_0
B8-G
OTHER
0.0
9999.0
-9999.0
NaN
VL8
VL8_0
Warning
The “generator convention” is used for the “input” columns (target_p, max_p, min_p, target_v and target_q) while the “load convention” is used for the ouput columns (p and q).
Most of the time, this means that p and target_p will have opposite sign. This also entails that p can be lower than min_p. Actually, the relation: \(\\text{min_p} <= -p <= \\text{max_p}\) should hold.