A fast, reliable, and open-source convex cone solver.
SCS (Splitting Conic Solver) is a numerical optimization package for solving large-scale convex quadratic cone problems. The code is freely available on GitHub. It solves primal-dual problems of the form
over variables
\(x \in \mathbf{R}^n\) |
primal variable |
\(y \in \mathbf{R}^m\) |
dual variable |
\(s \in \mathbf{R}^m\) |
slack variable |
with data
\(A \in \mathbf{R}^{m \times n}\) |
sparse data matrix, see Data matrices |
\(P \in \mathbf{S}_+^{n}\) |
sparse, symmetric positive semidefinite matrix |
\(c \in \mathbf{R}^n\) |
dense primal cost vector |
\(b \in \mathbf{R}^m\) |
dense dual cost vector |
\(\mathcal{K} \subseteq \mathbf{R}^m\) |
nonempty, closed, convex cone, see Cones |
\(\mathcal{K}^* \subseteq \mathbf{R}^m\) |
dual cone to \(\mathcal{K}\) |
At termination SCS will either return points \((x^\star,y^\star,s^\star)\) that satisfies the optimality conditions to the desired accuracy, or a certificate of primal or dual infeasibility to the designated infeasibility accuracy.
Features
Efficient: Designed to scale to large problems.
Flexible: Supports quadratic objectives and a large range of cones.
Free and open source: Distributed under the permissive MIT license.
Detects infeasibility: Robustly and reliably detects infeasible problems.
Interfaces: Bindings for many languages, including C, Python, Julia, R, MATLAB, Ruby, and JavaScript via WebAssembly.
Warm starts: Easily warm-started, and the matrix factorization can be cached.
Matrix-free: Optionally use an indirect linear system solver, or a GPU version.
Supported: A supported solver in CVX, CVXPY, YALMIP, Convex.jl and JuMP.
Accelerated: Includes acceleration that can improve convergence to high accuracy.
Battle-tested: The first ADMM-based solver available, and in wide usage.
Performance
SCS 3.3 is built for large problems. On the Mittelmann set of large LPs it solves more instances than any other open-source solver; with the cuDSS GPU backend it is the fastest solver we have measured on the largest QPs and second only to HiGHS on the largest LPs; and on the CPU it matches the best interior-point solvers problem for problem at a relative tolerance of \(10^{-4}\), while also handling the second-order, semidefinite, exponential and power cones that QP solvers cannot. Every solution is verified independently against the same residual test, so solvers with different ideas of “tolerance” are compared fairly. SCS also detects when there is no solution, returning certificates of infeasibility or unboundedness that are verified the same way. The full methodology, all test sets including SDPs and the infeasible problems, and the raw data are on the benchmarks page.
Largest quarter of the Maros-Meszaros and QPLIB QPs (top), largest quarter of the Kennington and MIPLIB-relaxation LPs (middle) and the Mittelmann large-LP set (bottom), at tolerance \(10^{-4}\). Left: fraction of problems solved within a factor \(\tau\) of the fastest solver. Right: shifted geometric mean solve time with failures charged three times the time limit, and the number of verified solves.
Infeasibility detection on the 29 infeasible Netlib LPs, for the solvers that return certificates: a solve is a certificate of infeasibility or unboundedness verified from the problem data. These are small problems (a median of 460 variables), so this tests detection rather than speed at scale; settings are described on the benchmarks page.
Development
SCS is a community project, built from the contributions of many researchers and engineers. The primary maintainer is Brendan O’Donoghue. We appreciate all contributions. To get involved, see our contributing guide.