Powermodels.jl SDP relaxation

Dears

I have a question regrading the Powermodels.jl package. Does it support the SDP relaxation? I have seen that it was mentioned in the documentation that it is supported (SDPWRMPowerModel). However, it didn’t work even though I have used SDP solvers like SeDuMi and SCS. I would appreciate your update in this regard.

Regards

Does it support the SDP relaxation?

Yes. Use SDPWRMPowerModel.

it didn’t work

What was the error?

Thanks for the reply. The error that I have received is

LoadError: MethodError: no method matching setsolver(::JuMP.Model, ::SeDuMi.Optimizer)

Closest candidates are:

setsolver(::JuMP.Model, !Matched::MathProgBase.SolverInterface.AbstractMathProgSolver) at C:\Users\Abd-PC.juliapro\JuliaPro_v1.0.3.1\packages\JuMP\I7whV\src\JuMP.jl:271

in expression starting at C:\Users\Abd-PC\Desktop\testing PowerModels\testing_PowerModels_2:14

setsolver(::GenericPowerModel{SDPWRMForm}, ::SeDuMi.Optimizer) at base.jl:168

#solve_generic_model#141(::Function, ::Function, ::GenericPowerModel{SDPWRMForm}, ::SeDuMi.Optimizer) at base.jl:228

(::getfield(PowerModels, Symbol("#kw##solve_generic_model")))(::NamedTuple{(:solution_builder,),Tuple{typeof(PowerModels.get_solution)}}, ::typeof(solve_generic_model), ::GenericPowerModel{SDPWRMForm}, ::SeDuMi.Optimizer) at none:0

#run_generic_model#138(::Function, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Dict{String,Any}, ::Type, ::SeDuMi.Optimizer, ::Function) at base.jl:195

run_generic_model(::Dict{String,Any}, ::Type, ::SeDuMi.Optimizer, ::Function) at base.jl:191

#run_generic_model#137(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::Type, ::SeDuMi.Optimizer, ::Function) at base.jl:186

run_generic_model(::String, ::Type, ::SeDuMi.Optimizer, ::Function) at base.jl:185

#run_opf#618(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::Type, ::SeDuMi.Optimizer) at opf.jl:15

run_opf(::String, ::Type, ::SeDuMi.Optimizer) at opf.jl:15

top-level scope at none:0

Any update?

The log you show indicates an issue with the solver interface. I recommend trying SCS or Mosek, these are the ones I have used to developing and testing the SDP formulations.

What version of PowerModels are you using (import Pkg; Pkg.status()). setsolver looks like it is for an old version of JuMP.

PowerModels v0.9.8

SCS worked, but Sedumi didn’t

The latest release of PowerModels is 0.18.0. Your version is two years old.

I would suggest that you don’t use JuliaPro, and just install the latest point release of Julia instead: Download Julia

How to call Mosek for solving the SDP problem in PowerModels?

I answered your other question: Using Gurobi with PowerModels - #2 by odow

using MosekTools and Mosek.Optimizer.