QP Benchmarks for the OSQP Solver against GUROBI, MOSEK, ECOS and qpOASES
Switch branches/tags
Nothing to show
Clone or download


Benchmark examples for the OSQP solver

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

  • OSQP
  • ECOS (through CVXPY)
  • qpOASES

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

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

  • Random QP
  • Equality constrained QP
  • Portfolio
  • Lasso
  • Huber fitting
  • Constrained optimal control

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

To execute these tests run

python run_benchmark_problems.py


The resulting performance profiles are performance_profiles_benchmark

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


The resulting performance profiles are performance_profiles_maros

Parametric problems

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

  • Portfolio
  • Lasso
  • Constrained optimal control (MPC)

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


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