SeDuMi.jl is wrapper for the SeDuMi solver.
The wrapper has two components:
- an exported
sedumi
function that is a thin wrapper on top of thesedumi
MATLAB function - an interface to MathOptInterface
Note that this SeDuMi natively supports the Hermitian PSD cone.
This interface provides the support of conic constraints, as create with
@constraint(model, ... in PSDCone())
or
@constraint(model, ... in HermitianPSDCone())
.
If your model rather contains conic variables such as created with
@variable(model, ... in PSDCone())
or
@variable(model, ... in HermitianPSDCone())
, you should try
adding a Dualization layer
to see if it improves the solve time.
This wrapper is maintained by the JuMP community and is not an official wrapper of SeDuMi.
SeDuMi.jl
is licensed under the MIT License.
The underlying solver, sqlp/sedumi is licensed under the GPL v2 license.
In addition, SeDuMi requires an installation of MATLAB, which is a closed-source commercial product for which you must obtain a license.
To use SeDuMi with JuMP, do:
using JuMP, SeDuMi
model = Model(SeDuMi.Optimizer)
set_attribute(model, "fid", 0)
The SeDuMi optimizer supports the following constraints and attributes.
List of supported objective functions:
List of supported variable types:
List of supported constraint types:
MOI.VectorAffineFunction{Float64}
inMOI.Nonnegatives
MOI.VectorAffineFunction{Float64}
inMOI.RotatedSecondOrderCone
MOI.VectorAffineFunction{Float64}
inMOI.SecondOrderCone
MOI.VectorAffineFunction{Float64}
inMOI.Zeros
MOI.VectorAffineFunction{Float64}
inSeDuMi.ScaledPSDCone
MOI.VectorAffineFunction{ComplexF64}
inSeDuMi.ScaledPSDCone
List of supported model attributes:
First, make sure that you satisfy the requirements of the MATLAB.jl Julia package, and that the SeDuMi software is installed in your MATLAB™ installation.
Then, install SeDuMi.jl
using Pkg.add
:
import Pkg
Pkg.add("SeDuMi")
If you get the error:
Undefined function or variable 'sedumi'.
Error using save
Variable 'jx_sedumi_arg_out_1' not found.
ERROR: LoadError: MATLAB.MEngineError("failed to get variable jx_sedumi_arg_out_1 from MATLAB session")
The error means that we couldn't find the sedumi
function with one output
argument using the MATLAB C API.
This most likely means that you did not add SeDuMi to the MATLAB's path, that
is, the toolbox/local/pathdef.m
file.
If modifying toolbox/local/pathdef.m
does not work, the following should work,
where /path/to/sedumi/
is the directory where the sedumi
folder is located:
julia> import MATLAB
julia> cd("/path/to/sedumi/") do
MATLAB.mat"install_sedumi"
end
julia> MATLAB.mat"savepath"