Problems

Solvers

PowerModelsDistribution.solve_mc_modelMethod
solve_mc_model(
    data::Dict{String,<:Any},
    model_type::Type,
    optimizer,
    build_mc::Function;
    ref_extensions::Vector{<:Function}=Function[],
    multinetwork::Bool=false,
    global_keys::Set{String}=Set{String}(),
    eng2math_extensions::Vector{<:Function}=Function[],
    eng2math_passthrough::Dict{String,<:Vector{<:String}}=Dict{String,Vector{String}}(),
    make_si::Bool=!get(data, "per_unit", false),
    make_si_extensions::Vector{<:Function}=Function[],
    dimensionalize_math_extensions::Dict{String,Dict{String,Vector{String}}}=Dict{String,Dict{String,Vector{String}}}(),
    kwargs...
)::Dict{String,Any}

Takes data in either the ENGINEERING or MATHEMATICAL model, a model type (e.g., ACRUPowerModel), and model builder function (e.g., build_mc_opf), and returns a solution in the original data model defined by data.

If make_si is false, data will remain in per-unit.

For an explanation of multinetwork and global_keys, see make_multinetwork

For an explanation of eng2math_extensions and eng2math_passthrough, see transform_data_model

For an explanation of make_pu_extensions, see make_per_unit!

For an explanation of ref_extensions, see instantiate_mc_model

For an explanation of map_math2eng_extensions, make_si, make_si_extensions, and dimensionalize_math_extensions, see solution_make_si

source
PowerModelsDistribution.solve_mc_modelMethod
solve_mc_model(
    file::String,
    model_type::Type,
    optimizer,
    build_mc::Function;
    dss2eng_extensions::Vector{<:Function}=Function[],
    multinetwork::Bool=false,
    global_keys::Set{String}=Set{String}(),
    kwargs...
)::Dict{String,Any}

Given a file::String, data will be parsed automatically from the file.

See solve_mc_model for detailed explanation of function arguments.

source

Builders

PowerModelsDistribution.build_pf_resultMethod
build_pf_result(
  pfd::PowerFlowData,
  Uv::Vector,
  status::PFTerminationStatus,
  its::Int,
  time::Real,
  stationarity::Real,
  verbose::Bool
)

Builds the result dict from the solution dict.

source

Model Instantiation

PowerModelsDistribution.instantiate_mc_modelFunction
instantiate_mc_model(
    data::Dict{String,<:Any},
    model_type::Type,
    build_method::Function;
    ref_extensions::Vector{<:Function}=Function[],
    multinetwork::Bool=false,
    global_keys::Set{String}=Set{String}(),
    eng2math_extensions::Vector{<:Function}=Function[],
    eng2math_passthrough::Dict{String,<:Vector{<:String}}=Dict{String,Vector{String}}(),
    make_pu_extensions::Vector{<:Function}=Function[],
    kwargs...
)

Takes data in either the ENGINEERING or MATHEMATICAL model, a model type (e.g., ACRUPowerModel), and model builder function (e.g., build_mc_opf), and returns an AbstractUnbalancedPowerModel structure.

For an explanation of multinetwork and global_keys, see make_multinetwork

For an explanation of eng2math_extensions and eng2math_passthrough, see transform_data_model

For an explanation of make_pu_extensions, see make_per_unit!

ref_extensions

Inside of the model structures, data can be quickly accessed via the ref function. By default, the only ref objects available are created by ref_add_core!, but users can add their own custom ref objects by passing functions via ref_extensions that have the signature:

ref_add!(ref::Dict{Symbol,Any}, data::Dict{String,Any})

See the Beginners Guide for an example.

source

Solution Helpers

PowerModelsDistribution.sol_data_model!Method
sol_data_model!(pm::AbstractUnbalancedACRModel, solution::Dict{String,<:Any})

solutionprocessor, see [`solvemcmodel`](@ref solvemc_model), to convert ACR variables back into polar representation (default data model voltage form)

source
PowerModelsDistribution.sol_data_model!Method
sol_data_model!(pm::AbstractUnbalancedWModels, solution::Dict{String,<:Any})

solutionprocessor, see [`solvemcmodel`](@ref solvemc_model), to convert W variables back into polar representation (default data model voltage form)

source
PowerModelsDistribution.sol_data_model!Method
sol_data_model!(pm::FBSUBFPowerModel, solution::Dict{String,<:Any})

solution_processor, to convert FBS variables back into polar representation (default data model voltage form)

source
PowerModelsDistribution.sol_data_model!Method
sol_data_model!(pm::FOTRUPowerModel, solution::Dict{String,<:Any})

solution_processor, to convert FOT rectangular variables back into polar representation (default data model voltage form)

source

DEPRECIATED Solver functions