Optimization Problems

Optimal Switching / Maximal Load Delivery (MLD)

PowerModelsONM.optimize_switchesFunction
optimize_switches(
    network::Dict{String,<:Any},
    solver;
    formulation::Type=PMD.LPUBFDiagPowerModel,
    algorithm::String="full-lookahead"
)::Dict{String,Any}
  • algorithm::String, if "rolling-horizon", iterates over all subnetworks in a multinetwork data structure network, in order, and solves the optimal switching / MLD problem sequentially, updating the next timestep with the new switch configurations and storage energies from the solved timestep. Otherwise, if "full-lookahead", will solve all time steps in a single optimization problem (default: "full-lookahead")
source
optimize_switches(
    subnetwork::Dict{String,<:Any},
    prob::Function,
    solver;
    formulation=PMD.LPUBFDiagPowerModel
)::Dict{String,Any}

Optimizes switch states for load shedding on a single subnetwork (not a multinetwork), using prob

Optionally, a PowerModelsDistribution formulation can be set independently, but is LinDist3Flow by default.

source
PowerModelsONM.solve_block_mldFunction
solve_block_mld(
    data::Dict{String,<:Any},
    model_type::Type,
    solver;
    kwargs...
)::Dict{String,Any}

Solves a multiconductor optimal switching (mixed-integer) problem using model_type and solver

Calls back to PowerModelsDistribution.solvemcmodel, and therefore will accept any valid kwargs for that function. See PowerModelsDistribution documentation for more details.

source
PowerModelsONM.solve_mn_block_mldFunction
solve_mn_block_mld(
    data::Dict{String,<:Any},
    model_type::Type,
    solver;
    kwargs...
)::Dict{String,Any}

Solves a multinetwork multiconductor optimal switching (mixed-integer) problem using model_type and solver

Calls back to PowerModelsDistribution.solvemcmodel, and therefore will accept any valid kwargs for that function. See PowerModelsDistribution documentation for more details.

source
PowerModelsONM.solve_traditional_mldFunction
solve_traditional_mld(
    data::Dict{String,<:Any},
    model_type::Type,
    solver;
    kwargs...
)::Dict{String,Any}

Solves a multiconductor traditional mld problem using model_type and solver

Calls back to PowerModelsDistribution.solvemcmodel, and therefore will accept any valid kwargs for that function. See PowerModelsDistribution documentation for more details.

source
PowerModelsONM.solve_mn_traditional_mldFunction
solve_mn_traditional_mld(
    data::Dict{String,<:Any},
    model_type::Type,
    solver;
    kwargs...
)::Dict{String,Any}

Solves a multinetwork multiconductor traditional mld problem using model_type and solver

Calls back to PowerModelsDistribution.solvemcmodel, and therefore will accept any valid kwargs for that function. See PowerModelsDistribution documentation for more details.

source

Optimal Dispatch

PowerModelsONM.optimize_dispatchFunction
optimize_dispatch(
    network::Dict{String,<:Any},
    formulation::Type,
    solver;
    switching_solutions::Union{Missing,Dict{String,<:Any}}=missing
)::Dict{String,Any}

Solve a multinetwork optimal power flow (solve_mn_mc_opf) using formulation and solver

source
PowerModelsONM.solve_mn_opfFunction
solve_mn_opf(
    data::Dict{String,<:Any},
    model_type::Type,
    solver;
    kwargs...
)::Dict{String,Any}

Solve multinetwork OPF with transformer tap and capacitor control

source

Fault stuides

PowerModelsONM.run_fault_studiesFunction
run_fault_studies(
    network::Dict{String,<:Any},
    solver;
    faults::Dict{String,<:Any}=Dict{String,Any}(),
    switching_solutions::Union{Missing,Dict{String,<:Any}}=missing,
    dispatch_solution::Union{Missing,Dict{String,<:Any}}=missing,
    distributed::Bool=false
)::Dict{String,Any}

Runs fault studies defined in ieee13faults.json. If no faults file is provided, it will automatically generate faults using `PowerModelsProtection.buildmcfaultstudy`.

It will convert storage to limited generators, since storage is not yet supported in IVRU models in PowerModelsProtection

Uses run_fault_study to solve the actual fault study.

solver will determine which instantiated solver is used, "nlp_solver" or "juniper_solver"

source
PowerModelsONM.run_fault_studyFunction
run_fault_study(
    subnetwork::Dict{String,<:Any},
    faults::Dict{String,<:Any},
    solver
)::Dict{String,Any}

Uses PowerModelsProtection.solve_mc_fault_study to solve multiple faults defined in faults, applied to subnetwork, i.e., not a multinetwork, using a nonlinear solver.

Requires the use of PowerModelsDistribution.IVRUPowerModel.

source

Stability Analysis

PowerModelsONM.run_stability_analysisFunction
run_stability_analysis(
    network::Dict{String,<:Any},
    inverters::Dict{String,<:Any},
    solver;
    formulation::Type=PMD.ACRUPowerModel,
    switching_solutions::Union{Missing,Dict{String,<:Any}}=missing,
    distributed::Bool=false
)::Dict{String,Bool}

Runs small signal stability analysis using PowerModelsStability and determines if each timestep configuration is stable

inverters is an already parsed inverters file using parse_inverters

The formulation can be specified with formulation, but note that it must result in "vm" and "va" variables in the solution, or else PowerModelsDistribution.sol_data_model! must support converting the voltage variables into polar coordinates.

solver for stability analysis (NLP OPF)

source
run_stability_analysis(
    subnetwork::Dict{String,<:Any},
    omega0::Real,
    rN::Int,
    solver;
    formulation::Type=PMD.ACPUPowerModel
)::Bool

Runs stability analysis on a single subnetwork (not a multinetwork) using a nonlinear solver.

source

Optimization solvers

PowerModelsONM.build_solver_instancesFunction
build_solver_instances(;
    nlp_solver::Union{Missing,JuMP.MOI.OptimizerWithAttributes}=missing,
    mip_solver::Union{Missing,JuMP.MOI.OptimizerWithAttributes}=missing,
    minlp_solver::Union{Missing,JuMP.MOI.OptimizerWithAttributes}=missing,
    misocp_solver::Union{Missing,JuMP.MOI.OptimizerWithAttributes}=missing,
    solver_options::Dict{String,<:Any}=Dict{String,Any}(),
    log_level::String="warn",
)::Dict{String,Any}

Returns solver instances as a Dict ready for use with JuMP Models, for NLP ("nlp_solver"), MIP ("mip_solver"), MINLP ("minlp_solver"), and (MI)SOC ("misocp_solver") problems.

  • nlp_solver (default: missing): If missing, will use Ipopt as NLP solver, or KNITRO if knitro=true
  • mip_solver (default: missing): If missing, will use Cbc as MIP solver, or Gurobi if gurobi==true
  • minlp_solver (default: missing): If missing, will use Juniper with nlp_solver and mip_solver, of KNITRO if knitro=true
  • misocp_solver (default: missing): If missing will use Juniper with mip_solver, or Gurobi if gurobi==true
  • solver_options (default: Dict{String,Any}())
  • log_level (default: "warn")
source