SDPA.jl

Build Status codecov

SDPA.jl is a wrapper for the SDPA semidefinite programming solver in double precision floating point arithmetic.

Affiliation

This wrapper is maintained by the JuMP community and is not a product of the SDPA developers.

License

SDPA.jl is licensed under the MIT License.

The underlying solver, SDPA is licensed under the GPL v2 license.

Installation

Install SDPA using Pkg.add:

import Pkg
Pkg.add("SDPA")

In addition to installing the SDPA.jl package, this will also download and install the SDPA binaries. (You do not need to install SDPA separately.)

If you see an error similar to:

INFO: Precompiling module GZip.
ERROR: LoadError: LoadError: error compiling anonymous: could not load library "libz"

please see GZip.jl#54 or Flux.jl#343. In particular, in Ubuntu this issue may be resolved by running

sudo apt-get install zlib1g-dev

See SDPAFamily for the other solvers, SDPA-GMP, SDPA-DD, and SDPA-QD of the family.

Use with JuMP

using JuMP, SDPA
model = Model(SDPA.Optimizer)
set_attribute(model, "Mode", SDPA.PARAMETER_DEFAULT)

MathOptInterface API

The SDPA optimizer supports the following constraints and attributes.

List of supported objective functions:

List of supported variable types:

List of supported constraint types:

List of supported model attributes:

Options

SDPA has three modes that give default value to all ten parameters.

The following table gives the default values for each parameter and mode.

ParameterPARAMETER_DEFAULTPARAMETER_UNSTABLE_BUT_FASTPARAMETER_STABLE_BUT_SLOW
MaxIteration1001001000
EpsilonStar1.0e-71.0e-71.0e-7
LambdaStar1.0e+21.0e+21.0e+4
OmegaStar2.02.02.0
LowerBound1.0e+51.0e+51.0e+5
UpperBound1.0e+51.0e+51.0e+5
BetaStar0.10.010.1
BetaBar0.20.020.3
GammaStar0.90.950.8
EpsilonDash1.0e-71.0e-71.0e-7

By default, we put SDPA in the SDPA.PARAMETER_DEFAULT mode.

Change the mode using the "Mode" option:

using JuMP, SDPA
model = Model(SDPA.Optimizer)
set_attribute(model, "Mode", SDPA.PARAMETER_STABLE_BUT_SLOW)

Note that the parameters are set in the order they are given, so you can set a mode and then modify parameters from this mode.

using JuMP, SDPA
model = Model(SDPA.Optimizer)
set_attribute(model, "Mode", SDPA.PARAMETER_STABLE_BUT_SLOW)
set_attribute(model, "MaxIteration", 100)

The choice of parameter mode has a large impact on the performance and stability of SDPA, and not necessarily in the way implied by the names of the modes; for example, PARAMETER_UNSTABLE_BUT_FAST can be more stable than the other modes for some problems. You should try each mode to see how it performs on your specific problem. See SDPA.jl#17 for more details.