Variables

PowerModelsDistribution.variable_mc_bus_voltageMethod
variable_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.

source
PowerModelsDistribution.variable_mc_bus_voltageMethod
variable_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.

source
PowerModelsDistribution.variable_mc_bus_voltageMethod
variable_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.

source
PowerModelsDistribution.variable_mc_load_currentMethod
variable_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.

source
PowerModelsDistribution.variable_mc_load_powerMethod

The 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.

source
PowerModelsDistribution.variable_mc_load_powerMethod

The 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).

source
PowerModelsDistribution.variable_mc_load_power_busMethod

The 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.

source
PowerModelsDistribution.variable_mc_load_power_delta_auxMethod

Creates 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]

source
PowerModelsDistribution.variable_mc_load_power_delta_auxMethod
variable_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.

source
PowerModelsDistribution.variable_mx_complexMethod
variable_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).

source
PowerModelsDistribution.variable_mx_complex_with_diagMethod
variable_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).

source
PowerModelsDistribution.variable_mx_hermitianMethod
variable_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.

source
PowerModelsDistribution.variable_mx_realMethod
variable_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

source
PowerModelsDistribution.variable_mx_real_skewsymmetricMethod
variable_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.

source
PowerModelsDistribution.variable_mx_real_symmetricMethod
variable_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

source
PowerModelsDistribution.variable_mx_real_with_diagMethod
variable_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.

source