ECOS.jl icon indicating copy to clipboard operation
ECOS.jl copied to clipboard

A Julia interface to the ECOS conic optimization solver

ECOS.jl

Build Status codecov

ECOS.jl is a wrapper for the ECOS solver.

The wrapper has two components:

Affiliation

This wrapper is maintained by the JuMP community and is not a product of Embotech AG.

License

ECOS.jl is licensed under the MIT License.

The underlying solver, embotech/ecos, is licensed under the GPL v3 license.

Installation

Install ECOS.jl using Pkg.add:

import Pkg
Pkg.add("ECOS")

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

To use a custom binary, read the Custom solver binaries section of the JuMP documentation.

Use with JuMP

To use ECOS with JuMP, use ECOS.Optimizer:

using JuMP, ECOS
model = Model(ECOS.Optimizer)
set_attribute(model, "maxit", 100)

MathOptInterface API

The ECOS optimizer supports the following constraints and attributes.

List of supported objective functions:

  • MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}}

List of supported variable types:

  • MOI.Reals

List of supported constraint types:

  • MOI.VectorAffineFunction{Float64} in MOI.Nonnegatives
  • MOI.VectorAffineFunction{Float64} in MOI.SecondOrderCone
  • MOI.VectorAffineFunction{Float64} in MOI.Zeros

List of supported model attributes:

  • MOI.ObjectiveSense()

Options

The following options are supported:

Parameter Explanation
gamma scaling the final step length
delta regularization parameter
eps regularization threshold
feastol primal/dual infeasibility tolerance
abstol absolute tolerance on duality gap
reltol relative tolerance on duality gap
feastol_inacc primal/dual infeasibility relaxed tolerance
abstol_inacc absolute relaxed tolerance on duality gap
reltol_inacc relative relaxed tolerance on duality gap
nitref number of iterative refinement steps
maxit maximum number of iterations
verbose verbosity bool for PRINTLEVEL < 3