Optimization Problems
Optimal Switching / Maximal Load Delivery (MLD)
PowerModelsONM.optimize_switches — Functionoptimize_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 structurenetwork, 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")
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.
PowerModelsONM.solve_block_mld — Functionsolve_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.
PowerModelsONM.solve_mn_block_mld — Functionsolve_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.
PowerModelsONM.solve_traditional_mld — Functionsolve_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.
PowerModelsONM.solve_mn_traditional_mld — Functionsolve_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.
Optimal Dispatch
PowerModelsONM.optimize_dispatch — Functionoptimize_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
PowerModelsONM.solve_mn_opf — Functionsolve_mn_opf(
data::Dict{String,<:Any},
model_type::Type,
solver;
kwargs...
)::Dict{String,Any}Solve multinetwork OPF with transformer tap and capacitor control
Fault stuides
PowerModelsONM.run_fault_studies — Functionrun_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"
PowerModelsONM.run_fault_study — Functionrun_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.
Stability Analysis
PowerModelsONM.run_stability_analysis — Functionrun_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)
run_stability_analysis(
subnetwork::Dict{String,<:Any},
omega0::Real,
rN::Int,
solver;
formulation::Type=PMD.ACPUPowerModel
)::BoolRuns stability analysis on a single subnetwork (not a multinetwork) using a nonlinear solver.
Optimization solvers
PowerModelsONM.build_solver_instances — Functionbuild_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 ifknitro=truemip_solver(default:missing): If missing, will use Cbc as MIP solver, or Gurobi ifgurobi==trueminlp_solver(default:missing): If missing, will use Juniper withnlp_solverandmip_solver, of KNITRO ifknitro=truemisocp_solver(default:missing): If missing will use Juniper withmip_solver, or Gurobi ifgurobi==truesolver_options(default: Dict{String,Any}())log_level(default: "warn")