Variables
PowerModelsDistribution.variable_mc_branch_current
— MethodPowerModelsDistribution.variable_mc_branch_current
— MethodPowerModelsDistribution.variable_mc_branch_current
— MethodPowerModelsDistribution.variable_mc_branch_current_imaginary
— Methodvariable: ci[l,i,j]
for (l,i,j)
in arcs
PowerModelsDistribution.variable_mc_branch_current_real
— Methodvariable: cr[l,i,j]
for (l,i,j)
in arcs
PowerModelsDistribution.variable_mc_branch_current_series_imaginary
— Methodvariable: csi[l]
for l
in branch
PowerModelsDistribution.variable_mc_branch_current_series_real
— Methodvariable: csr[l]
for l
in branch
PowerModelsDistribution.variable_mc_branch_flow_ne_reactive
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_branch_power
— MethodPowerModelsDistribution.variable_mc_branch_power
— Methodbranch flow variables, delegated back to PowerModels
PowerModelsDistribution.variable_mc_branch_power
— Methodvariable_mc_branch_power(pm::FBSUBFPowerModel; nw::Int=nw_id_default, bounded::Bool=true, report::Bool=true)
Branch flow variables similar to LPUBFDiagModel
PowerModelsDistribution.variable_mc_branch_power
— MethodPowerModelsDistribution.variable_mc_branch_power_imaginary
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_branch_power_imaginary
— Methodvariable: q[l,i,j]
for (l,i,j)
in arcs
PowerModelsDistribution.variable_mc_branch_power_real
— MethodPowerModelsDistribution.variable_mc_branch_power_real
— Methodvariable: p[l,i,j]
for (l,i,j)
in arcs
PowerModelsDistribution.variable_mc_bus_voltage
— MethodPowerModelsDistribution.variable_mc_bus_voltage
— MethodPowerModelsDistribution.variable_mc_bus_voltage
— MethodPowerModelsDistribution.variable_mc_bus_voltage
— MethodPowerModelsDistribution.variable_mc_bus_voltage
— MethodPowerModelsDistribution.variable_mc_bus_voltage
— Methodnothing to do, these models do not have complex voltage variables
PowerModelsDistribution.variable_mc_bus_voltage
— Methodvariable_mc_bus_voltage(pm::FBSUBFPowerModel; nw=nw_id_default, bounded::Bool=true, kwargs...)
Voltage variables are defined in rectangular coordinates similar to ACRUPowerModel. An initial operating point is specified for linearization.
PowerModelsDistribution.variable_mc_bus_voltage
— Methodvariable_mc_bus_voltage(pm::FOTPUPowerModel; nw=nw_id_default, kwargs...)
Voltage variables are defined in polar coordinates similar to ACPUPowerModel. An initial operating point is specified for linearization.
PowerModelsDistribution.variable_mc_bus_voltage
— Methodvariable_mc_bus_voltage(pm::FOTRUPowerModel; nw=nw_id_default, kwargs...)
Voltage variables are defined in rectangular coordinates similar to ACRUPowerModel. An initial operating point is specified for linearization similar to FBSUBFPowerModel.
PowerModelsDistribution.variable_mc_bus_voltage
— MethodPowerModelsDistribution.variable_mc_bus_voltage_angle
— MethodPowerModelsDistribution.variable_mc_bus_voltage_imaginary
— MethodPowerModelsDistribution.variable_mc_bus_voltage_imaginary_on_off
— MethodPowerModelsDistribution.variable_mc_bus_voltage_indicator
— MethodCreate variables for bus status
PowerModelsDistribution.variable_mc_bus_voltage_magnitude_on_off
— Methodon/off voltage magnitude variable
PowerModelsDistribution.variable_mc_bus_voltage_magnitude_only
— MethodPowerModelsDistribution.variable_mc_bus_voltage_magnitude_sqr
— Methodvariable: w[i] >= 0
for i
in `buses
PowerModelsDistribution.variable_mc_bus_voltage_magnitude_sqr_on_off
— Methodvoltage variable magnitude squared (relaxed form)
PowerModelsDistribution.variable_mc_bus_voltage_on_off
— MethodPowerModelsDistribution.variable_mc_bus_voltage_on_off
— MethodPowerModelsDistribution.variable_mc_bus_voltage_on_off
— MethodPowerModelsDistribution.variable_mc_bus_voltage_on_off
— MethodCreate voltage variables for branch flow model
PowerModelsDistribution.variable_mc_bus_voltage_prod_hermitian
— MethodPowerModelsDistribution.variable_mc_bus_voltage_real
— MethodPowerModelsDistribution.variable_mc_bus_voltage_real_on_off
— MethodPowerModelsDistribution.variable_mc_capacitor_reactive_power
— Methodvariable_mc_capacitor_reactive_power(pm::AbstractUnbalancedPowerModel; nw::Int=nw_id_default)
Capacitor (with capcontrol) relaxed power variables for AbstractLPUBFModel (using McCormick envelopes)
PowerModelsDistribution.variable_mc_capacitor_switch_state
— Methodvariable_mc_capacitor_switch_state(pm::AbstractUnbalancedPowerModel, relax::Bool; nw::Int=nw_id_default, report::Bool=true)
Capacitor (with capcontrol) switch state (open/close) variables
PowerModelsDistribution.variable_mc_capcontrol
— Methodvariable_mc_capcontrol(pm::AbstractLPUBFModel; relax::Bool=false)
Capacitor switching and relaxed power variables.
PowerModelsDistribution.variable_mc_capcontrol
— Methodvariable_mc_capcontrol(pm::AbstractUnbalancedACPModel; relax::Bool=false)
Capacitor switching variables.
PowerModelsDistribution.variable_mc_capcontrol
— Methodvariable_mc_capcontrol(pm::AbstractUnbalancedACRModel; relax::Bool=false)
Capacitor switching variables.
PowerModelsDistribution.variable_mc_capcontrol
— Methodvariable_mc_capcontrol(pm::FBSUBFPowerModel; relax::Bool=false)
Capacitor switching variables.
PowerModelsDistribution.variable_mc_capcontrol
— Methodvariable_mc_capcontrol(pm::FOTRUPowerModel; relax::Bool=false)
Capacitor switching variables.
PowerModelsDistribution.variable_mc_gen_indicator
— MethodCreate variables for generator status
PowerModelsDistribution.variable_mc_generator_current
— MethodFor the matrix KCL formulation, the generator needs an explicit current variable.
PowerModelsDistribution.variable_mc_generator_current
— MethodPowerModelsDistribution.variable_mc_generator_current_imaginary
— Methodvariable: cig[j]
for j
in gen
PowerModelsDistribution.variable_mc_generator_current_real
— Methodvariable: crg[j]
for j
in gen
PowerModelsDistribution.variable_mc_generator_power
— Methodcreate variables for generators, delegate to PowerModels
PowerModelsDistribution.variable_mc_generator_power
— MethodFor the matrix KCL formulation, the generator needs an explicit current and power variable.
PowerModelsDistribution.variable_mc_generator_power_imaginary
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_generator_power_imaginary
— MethodPowerModelsDistribution.variable_mc_generator_power_imaginary_on_off
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_generator_power_imaginary_on_off
— MethodPowerModelsDistribution.variable_mc_generator_power_mx
— MethodFor the matrix KCL formulation, the generator needs an explicit power variable.
PowerModelsDistribution.variable_mc_generator_power_on_off
— MethodPowerModelsDistribution.variable_mc_generator_power_real
— MethodPowerModelsDistribution.variable_mc_generator_power_real_on_off
— MethodPowerModelsDistribution.variable_mc_load_current
— MethodAll loads need a current variable; for wye loads, this variable will be in the wye reference frame whilst for delta currents it will be in the delta reference frame.
PowerModelsDistribution.variable_mc_load_current
— MethodPowerModelsDistribution.variable_mc_load_current
— Methodvariable_mc_load_current(pm::FBSUBFPowerModel, load_ids::Vector{Int}; nw::Int=nw_id_default, bounded::Bool=true, report::Bool=true)
No loads require a current variable. Delta loads are zero-order approximations and wye loads are first-order approximations around the initial operating point.
PowerModelsDistribution.variable_mc_load_indicator
— MethodCreate variables for demand status
PowerModelsDistribution.variable_mc_load_power
— MethodThese variables reflect the power consumed by the load, NOT the power injected into the bus nodes; these variables only coincide for wye-connected loads with a grounded neutral.
PowerModelsDistribution.variable_mc_load_power
— MethodThe variable creation for the loads is rather complicated because Expressions are used wherever possible instead of explicit variables. Delta loads always need a current variable and auxilary power variable (X), and all other load model variables are then linear transformations of these (linear Expressions). Wye loads however, don't need any variables when the load is modelled as constant power or constant impedance. In all other cases (e.g. when a cone is used to constrain the power), variables need to be created.
PowerModelsDistribution.variable_mc_load_power
— MethodCreate a dictionary with values of type Any for the load. Depending on the load model, this can be a parameter or a NLexpression. These will be inserted into KCL.
PowerModelsDistribution.variable_mc_load_power
— MethodThe variable creation for the loads is rather complicated because Expressions are used wherever possible instead of explicit variables. All loads need a current variable; for wye loads, this variable will be in the wye reference frame whilst for delta currents it will be in the delta reference frame. All loads need variables for the off-diagonals of the nodal power variables. In some cases, the diagonals elements can be created as Expressions. Delta loads only need a current variable and auxilary power variable (X), and all other load model variables are then linear transformations of these (linear Expressions).
PowerModelsDistribution.variable_mc_load_power_bus
— MethodThe bus qualifier denotes that this is the power withdrawn at the bus; Only for grounded wye-connected loads, this is the same as the power consumed by the multi-phase load. The off-diagonals only need to be created for the matrix KCL formulation.
PowerModelsDistribution.variable_mc_load_power_delta_aux
— MethodCreates power matrix variable X for delta windings; this defines both the wye-side power Sy and the delta-side power Sd through the lin. transformations Sy = X.Td, Sd = Td.X with Td=[1 -1 0; 0 1 -1; -1 0 1]
See the paper by Zhao et al. for the first convex relaxation of delta transformations. @INPROCEEDINGS{zhaooptimal2017, author={C. Zhao, E. Dall'Anese and S. Low}, booktitle={IREP 2017 Bulk Power Systems Dynamics and Control Symposium}, title={{Optimal Power Flow in Multiphase Radial Networks with Delta Connections}}, year={2017}, month={}, url={https://www.nrel.gov/docs/fy18osti/67852.pdf} }
See upcoming paper for discussion of bounds. [reference added when accepted]
PowerModelsDistribution.variable_mc_load_power_delta_aux
— Methodvariable_mc_load_power_delta_aux(pm::FBSUBFPowerModel, load_ids::Vector{Int}; nw::Int=nw_id_default, eps::Real=0.1, bounded::Bool=true, report::Bool=true)
Auxiliary variables are not required since delta loads are zero-order approximations calculated using the initial operating point.
PowerModelsDistribution.variable_mc_oltc_transformer_tap
— MethodCreate tap variables.
PowerModelsDistribution.variable_mc_shunt_indicator
— MethodCreate variables for shunt status
PowerModelsDistribution.variable_mc_slack_bus_power
— Methodgenerates variables for both active
and reactive
slack at each bus
PowerModelsDistribution.variable_mc_slack_bus_power_imaginary
— MethodPowerModelsDistribution.variable_mc_slack_bus_power_real
— MethodPowerModelsDistribution.variable_mc_storage_current
— Methoddo nothing by default but some formulations require this
PowerModelsDistribution.variable_mc_storage_current
— Methoddo nothing by default but some formulations require this
PowerModelsDistribution.variable_mc_storage_indicator
— MethodCreate variables for storage status
PowerModelsDistribution.variable_mc_storage_power
— Methodvariables for modeling storage units, includes grid injection and internal variables
PowerModelsDistribution.variable_mc_storage_power_control_imaginary
— Methoda reactive power slack variable that enables the storage device to inject or consume reactive power at its connecting bus, subject to the injection limits of the device.
PowerModelsDistribution.variable_mc_storage_power_control_imaginary_on_off
— Methoda reactive power slack variable that enables the storage device to inject or consume reactive power at its connecting bus, subject to the injection limits of the device.
PowerModelsDistribution.variable_mc_storage_power_imaginary
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_storage_power_imaginary
— MethodPowerModelsDistribution.variable_mc_storage_power_imaginary_on_off
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_storage_power_imaginary_on_off
— MethodCreate variables for reactive
storage injection
PowerModelsDistribution.variable_mc_storage_power_mi
— MethodPowerModelsDistribution.variable_mc_storage_power_mi_on_off
— MethodPowerModelsDistribution.variable_mc_storage_power_on_off
— MethodCreate variables for active
and reactive
storage injection
PowerModelsDistribution.variable_mc_storage_power_real
— MethodPowerModelsDistribution.variable_mc_storage_power_real_on_off
— MethodCreate variables for active
storage injection
PowerModelsDistribution.variable_mc_switch_current
— MethodPowerModelsDistribution.variable_mc_switch_current
— MethodPowerModelsDistribution.variable_mc_switch_current_imaginary
— MethodPowerModelsDistribution.variable_mc_switch_current_real
— MethodPowerModelsDistribution.variable_mc_switch_power
— MethodPowerModelsDistribution.variable_mc_switch_power_imaginary
— MethodPowerModelsDistribution.variable_mc_switch_power_real
— MethodPowerModelsDistribution.variable_mc_switch_state
— Methodswitch state (open/close) variables
PowerModelsDistribution.variable_mc_transformer_current
— MethodPowerModelsDistribution.variable_mc_transformer_current_imaginary
— Methodvariable: ci[l,i,j]
for (l,i,j)
in arcs
PowerModelsDistribution.variable_mc_transformer_current_real
— Methodvariable: cr[l,i,j]
for (l,i,j)
in arcs
PowerModelsDistribution.variable_mc_transformer_power
— Methoddefines matrix transformer power variables for the unbalanced branch flow models
PowerModelsDistribution.variable_mc_transformer_power
— MethodCreates variables for both active
and reactive
power flow at each transformer.
PowerModelsDistribution.variable_mc_transformer_power
— MethodCreates variables for both active
and reactive
power flow at each transformer.
PowerModelsDistribution.variable_mc_transformer_power_imaginary
— Methodapo models ignore reactive power flows
PowerModelsDistribution.variable_mc_transformer_power_imaginary
— MethodCreate variables for the reactive power flowing into all transformer windings.
PowerModelsDistribution.variable_mc_transformer_power_real
— MethodCreate variables for the active power flowing into all transformer windings
PowerModelsDistribution.variable_mc_transformer_power_real
— MethodCreate variables for the active power flowing into all transformer windings.
PowerModelsDistribution.variable_mx_complex
— Methodvariable_mx_complex(
model::JuMP.Model,
indices::Array{T,1},
N::Dict{T,Vector{Int}},
M::Dict{T,Vector{Int}};
upper_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
lower_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
symm_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
name::Union{String, Tuple{String,String}}="",
prefix::String=""
)::Tuple where T
Shorthand to create two real matrix variables, where the first is the real part and the second the imaginary part.
If the name argument is a String, it will be suffixed with 're' and 'im'. It is possible to specify the names of the real and imaginary part directly as a Tuple as well (to achieve P and Q instead of Sre and Sim for example).
PowerModelsDistribution.variable_mx_complex_with_diag
— Methodvariable_mx_complex_with_diag(
model::JuMP.Model,
indices::Array{T,1},
N::Dict{T,Vector{Int}};
upper_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
lower_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
symm_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
diag_re::Dict{T,<:Vector{<:Any}}=Dict([(i, zeros(length(N[i]))) for i in indices]),
diag_im::Dict{T,<:Vector{<:Any}}=Dict([(i, zeros(length(N[i]))) for i in indices]),
name::Union{String, Tuple{String,String}}="",
prefix::String=""
)::Tuple where T
Same as variable_mx_complex
, but square and the diagonal of the matrix variables consists of the constants passed as the diagre and diagim argument. The diag argument is a dictionary of (index, 1d-array) pairs.
Useful for power matrices with specified diagonals (constant power wye loads).
PowerModelsDistribution.variable_mx_hermitian
— Methodvariable_mx_hermitian(
model::JuMP.Model,
indices::Array{T,1},
N::Dict{T,Vector{Int}};
upper_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
lower_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
symm_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
sqrt_upper_bound::Union{Missing, Dict{T,<:Vector{<:Real}}}=missing,
sqrt_lower_bound::Union{Missing, Dict{T,<:Vector{<:Real}}}=missing,
set_lower_bound_diag_to_zero::Bool=false,
imag_set_diag_to_zero::Bool=true,
name::Union{String,Tuple{String,String}}="",
prefix::String=""
)::Tuple where T
Returns a pair of symmetric and skew-symmetric matrix variables.
PowerModelsDistribution.variable_mx_real
— Methodvariable_mx_real(
model::JuMP.Model,
indices::Array{T,1},
N::Dict{T,Vector{Int}},
M::Dict{T,Vector{Int}};
upper_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
lower_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
name::String="",
prefix::String=""
) where T
This function creates a set of real matrix variables of size NxM, indexed over the elements of the indices argument. The upper and lower bounds have to be specified, and are dictionaries with the indices as keys and the matrix bounds as values. The name and prefix arguments will be combined into the base_name argument for JuMP; the prefix will typically be the network number nw. Instead of sequentially creating the matrix variables, the elements of the matrices are created sequentially for all matrices at once. I.e., we loop over the elements, and not over the indices. This is needed so that the variable names printed by JuMP are in line with the current design.
Returns a dictionary of (index, matrix variable) pairs
PowerModelsDistribution.variable_mx_real_skewsymmetric
— Methodvariable_mx_real_skewsymmetric(
model::JuMP.Model,
indices::Array{T,1},
N::Dict{T,Vector{Int}};
upper_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
lower_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
set_diag_to_zero::Bool=true,
name::String="",
prefix::String=""
)::Dict where T
Same as variable_mx_real
, but adds skew-symmetry structure.
PowerModelsDistribution.variable_mx_real_symmetric
— Methodvariable_mx_real_symmetric(
model::JuMP.Model,
indices::Array{T,1},
N::Dict{T,Vector{Int}};
upper_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
lower_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
name::String="",
prefix::String=""
)::Dict where T
Same as variable_mx_real
, but adds symmetry structure
PowerModelsDistribution.variable_mx_real_with_diag
— Methodvariable_mx_real_with_diag(
model::JuMP.Model,
indices::Array{T,1},
N::Dict{T,Vector{Int}};
upper_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
lower_bound::Union{Missing, Dict{T,<:Matrix{<:Real}}}=missing,
diag::Dict{T,<:Vector{<:Any}}=Dict([(i, fill(0, length(N[i]))) for i in indices]),
name::String="",
prefix::String=""
) where T
Same as variable_mx_real
, but has to be square and the diagonal of the matrix variables consists of the elements passed as the diag argument. The diag argument is a dictionary of (index, 1d-array) pairs. Useful for power matrices with specified diagonals (constant power wye loads). If not specified, the diagonal elements are set to zero.
PowerModelsDistribution.variable_storage_charge
— MethodPowerModelsDistribution.variable_storage_complementary_indicator
— MethodPowerModelsDistribution.variable_storage_discharge
— MethodPowerModelsDistribution.variable_storage_energy
— Method