blegat / Zaphod.jl

ADMM conic solver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zaphod.jl

Build Status codecov

Zaphod.jl (Zaphod is an ADMM/Proximal solver for the Homogeneous Self-Dual Embedding) is a simple implementation of an ADMM solver for conic programs interfacing with MathOptInterface (MOI).

Much like Zaphod Beeblebrox, its plan is to remain stupidely simple (following the KISS principle) and let its dependencies do all the work.

It is not meant to be the most efficient but rather to be a good example for learning how to write a solver for JuMP.

The implementation follows quite closely what's described in SCS paper.

The solver is quite similar to SCS and COSMO although SCS and COSMO should be much faster (as their goal is to be fast, not only simple) and they also support quadratic objective. One important difference is that Zaphod uses MathOptSetDistances. Therefore, any MOI.AbstractVectorSet that satisfies the following 5 conditions is automatically supported:

  • MOI.dual_set is implemented
  • MathOptSetDistances.projection_on_set is implemented
  • MOI.Utilities.set_dot is equivalent to LinearAlgebra.dot (we could work around this similarly to how Dualization to scale A' and b' of the Q matrix equation (8) of the SCS paper but for the program to remain self-dual we would actually need to scale both A' and A by the square root of the scaling so it's equivalent to bridging to the scaled version of the cones, see #2)
  • The set is included in the SUPPORTED_CONE Union in src/MOI_wrapper.jl
  • The set is included in the Cones @product_of_sets in src/MOI_wrapper.jl

This was used for

License

Zaphod.jl is licensed under the MIT License.

Installation

Install Zaphod as follows:

import Pkg
Pkg.add(url="https://github.com/blegat/Zaphod.jl")

Use with JuMP

To use Zaphod with JuMP, use Zaphod.Optimizer:

using JuMP, Zaphod
model = Model(Zaphod.Optimizer)
set_attribute(model, "max_iters", 600)

MathOptInterface API

The Zaphod optimizer supports the following constraints and attributes.

List of supported objective functions:

List of supported variable types:

List of supported constraint types:

Options

The list of options are

Option name Default value
max_iters 100
ϵ_primal 1e-4
ϵ_dual 1e-4
ϵ_gap 1e-4
ϵ_unbounded 1e-7
ϵ_infeasible 1e-7

About

ADMM conic solver

License:Other


Languages

Language:Julia 100.0%