Professional Documents
Culture Documents
HelP_Functions
HelP_Functions
Busses are the nodes of the network that all other elements connect to.
INPUT:
OPTIONAL:
type (string, default "b") - Type of the bus. "n" - node, "b" - busbar, "m" -
muff
min_vm_pu (float, NAN) - Minimum bus voltage in p.u. - necessary for OPF
OUTPUT:
Creates a line element in net["line"] The line parameters are defined through the
standard type library.
INPUT:
from_bus (int) - ID of the bus on one side which the line will be connected
with
to_bus (int) - ID of the bus on the other side which the line will be
connected with
Pre-defined in standard_linetypes or
OPTIONAL:
geodata (array, default None, shape= (,2L)) - The linegeodata of the line.
The first row should be the coordinates of bus a and the last should be the
coordinates of bus b. The points in the middle represent the bending points
of the line
in_service (boolean, True) - True for in_service or False for out of service
OUTPUT:
create_load
Definition : create_load(net, bus, p_mw, q_mvar=0, const_z_percent=0, const_i
_percent=0, sn_mva=nan, name=None, scaling=1., index=None, in_service=Tru
e, type='wye', max_p_mw=nan, min_p_mw=nan, max_q_mvar=nan, min_q_mv
ar=nan, controllable=nan, **entries)
All loads are modelled in the consumer system, meaning load is positive and
generation is negative active power. Please pay attention to the correct signing of
the reactive power as well.
INPUT:
OPTIONAL:
OUTPUT:
EXAMPLE:
create_gen
Definition : create_gen(net, bus, p_mw, vm_pu=1., sn_mva=nan, name=None,
index=None, max_q_mvar=nan, min_q_mvar=nan, min_p_mw=nan, max_p_mw
=nan, min_vm_pu=nan, max_vm_pu=nan, scaling=1., type=None, slack=False,
controllable=nan, vn_kv=nan, xdss_pu=nan, rdss_ohm=nan, cos_phi=nan, pg_p
ercent=nan, power_station_trafo=nan, in_service=True, slack_weight=0.0,**ent
ries)
Generators are always modelled as voltage controlled PV nodes, which is why the
input parameter is active power and a voltage set point. If you want to model a
generator as PQ load with fixed reactive power and variable voltage, please use a
static generator instead.
INPUT:
p_mw (float, default 0) - The active power of the generator (positive for
generation!)
OPTIONAL:
scaling (float, 1.0) - scaling factor which for the active power of the
generator
controllable (bool, NaN) - True: p_mw, q_mvar and vm_pu limits are
enforced for this generator in OPF
False: p_mw and vm_pu setpoints are enforced and limits are ignored.
defaults to True if "controllable" column exists in DataFrame
cos_phi (float, NaN) - Rated cosine phi of the generator for short-circuit
calculation
in_service (bool, True) - True for in_service or False for out of service
OUTPUT:
create_sgen
Definition : create_sgen(net, bus, p_mw, q_mvar=0, sn_mva=nan, name=None
, index=None, scaling=1., type='wye', in_service=True, max_p_mw=nan, min_p
_mw=nan, max_q_mvar=nan, min_q_mvar=nan, controllable=nan, k=nan, rx=n
an, current_source=True, generator_type=None, max_ik_ka=nan, kappa=nan, lr
c_pu=nan, **entries)
Static generators are modelled as positive and constant PQ power. This element is
used to model generators with a constant active and reactive power feed-in. If you
want to model a voltage controlled generator, use the generator element instead.
gen, sgen and ext_grid in the grid are modelled in the generator system! If you
want to model the generation of power, you have to assign a positive active power
to the generator. Please pay attention to the correct signing of the reactive power
as well (positive for injection and negative for consumption).
INPUT:
p_mw (float) - The active power of the static generator (positive for
generation!)
OPTIONAL:
rx (float, NaN) - R/X ratio for short circuit impedance. Only relevant if type is
specified as motor so that sgen is treated as asynchronous motor. Relevant
for short-circuit calculation for all generator types
lrc_pu (float, nan) - locked rotor current in relation to the rated generator
current. Relevant if the generator_type is "async".
kappa (float, nan) - the factor for the calculation of the peak short-
circuit current, referred to the high-voltage side (provided by the
manufacturer). Relevant if the generator_type is
"async_doubly_fed".
If the superposition method is used (use_pre_fault_voltage=True), this
parameter is used to pass through the max. current limit of the machine in
p.u.
OUTPUT:
EXAMPLE:
ConstControl
Definition : ConstControl(net, element, variable, element_index, profile_name=N
one, data_source=None, scale_factor=1.0, in_service=True, recycle=True, order
=-1, level=-1, drop_same_existing_ctrl=False, matching_params=None, initial_ru
n=False, *, index=None, overwrite=False, **kwargs)
Class representing a generic time series controller for a specified element and
variable. Control strategy: "No Control" -> updates values of specified elements
according to timeseries input data. If ConstControl is used without timeseries input
data, it will reset the controlled values to the initial values, preserving the initial net
state. The timeseries values are written to net during time_step before the initial
powerflow run and before other controllers' control_step. It is possible to set
attributes of objects that are contained in a net table, e.g. attributes of other
controllers. This can be helpful e.g. if a voltage setpoint of a transformer tap
changer depends on the time step. An attribute of an object in the "object" column
of a table (e.g. net.controller["object"] -> net.controller.object.at[0, "vm_set_pu"]
can be set if the attribute is specified as "object.attribute" (e.g.
"object.vm_set_pu").
INPUT:
OPTIONAL:
scale_factor (real, 1.0) - Scaling factor for time series input values
Note
If multiple elements are represented with one controller, the data source must have
integer columns. At the moment, only the DFData format is tested for the multiple
const control.
run_timeseries
Definition : run_timeseries(net, time_steps=None, continue_on_divergence=Fals
e, verbose=True, check_controllers=True, *, run_control_fct=run_control, output
_writer_fct=_call_output_writer, max_iter=30, **kwargs)
Runs multiple PANDAPOWER AC power flows based on time series which are stored
in a DataSourceinside Controllers. Optionally other functions than the pp power
flow can be called by setting the run function in kwargs
INPUT:
OPTIONAL:
create_poly_cost
Definition : create_poly_cost(net, element, et, cp1_eur_per_mw, cp0_eur=0, cq
1_eur_per_mvar=0, cq0_eur=0, cp2_eur_per_mw2=0, cq2_eur_per_mvar2=0, i
ndex=None, check=True, *, preserve_dtypes=True, **entries)
Generator ("gen")
External Grid ("ext_grid")
Static Generator ("sgen")
Load ("load")
Dcline ("dcline")
Storage ("storage")
INPUT:
OPTIONAL:
index (int, index) - Force a specified ID if it is available. If None, the index one
higher than the highest already existing index is selected.
check (bool, True) - raises User Warning if costs already exist to this element.
OUTPUT:
The polynomial cost function is given by the linear and quadratic cost
coefficients.