Home

Awesome

Benchmark examples for the OSQP solver

These are the scripts to compare the following Quadratic Program (QP) solvers

The detailed description of these tests is available in this paper. To run these scripts you need pandas and cvxpy installed.

All the scripts (apart from the parametric examples) come with options (default to False)

Benchmark problems

The problems are all randomly generated as described in the OSQP paper. They produce a benchmark library of 1400 problems with nonzeros ranging from 100 to 10'000'000. Problem instances include

We generate the problems using the scripts in the problem_classes folder.

To execute these tests run

python run_benchmark_problems.py

Results

The resulting shifted geometric means are

OSQPGUROBIMOSEKECOSqpOASES
1.04.282.5228.85149.93

Maros Meszaros problems

These are the hard problems from the Maros Meszaros testset converted using CUTEst and the scripts in the maros_meszaros_data/ folder. In these benchmarks we compare OSQP with GUROBI and MOSEK.

To execute these tests run

python run_maros_meszaros_problems.py

Results

The resulting shifted geometric means are

OSQPGUROBIMOSEK
1.461.06.12

SuiteSparse Matrix Lasso and Huber Fitting problems

These are Lasso and Huber fitting problems generated from Least-Squares linear systems Ax ~ b from the SuiteSparse Matrix Collection. They are downloaded and converted to mat using the download.jl script. They are a total of 60 problems (30 Lasso and 30 Huber fitting).

To execute these tests run

python run_suitesparse_problems.py

Results

The resulting shifted geometric means are

OSQPGUROBIMOSEK
1.01.631.74

Parametric problems

These tests apply only to the OSQP solver with and without warm-starting for three parametric examples of

The problem construction is the same as for the same categories in the Benchmark Problems.

To execute these tests run

python run_parametric_problems.py

Citing

If you are using these benchmarks for your work, please cite the OSQP paper.