Skip to main content

Benchmark for quadratic programming solvers available in Python.

Project description

QP solvers benchmark

Contributing

Benchmark for quadratic programming (QP) solvers available in Python. It contains the following test sets:

  • Maros-Meszaros: problems designed to be difficult, some of them with non-strictly p.s.d. Hessians.
  • Maros-Meszaros dense: subset of the 59 smallest Maros-Meszaros problems, still difficult but accessible to dense solvers.

This benchmark aims to help us compare and select QP solvers. Its methodology is open to discussions. New test sets are also welcome. Feel free to add one that better represents the family of problems you are working on.

Solvers

Solver Keyword Algorithm Matrices License
CVXOPT cvxopt Interior point Dense GPL-3.0
ECOS ecos Interior point Sparse GPL-3.0
Gurobi gurobi Interior point Sparse Commercial
HiGHS highs Active set Sparse MIT
MOSEK mosek Interior point Sparse Commercial
OSQP osqp Augmented Lagrangian Sparse Apache-2.0
ProxQP proxqp Augmented Lagrangian Dense & Sparse BSD-2-Clause
qpOASES qpoases Active set Dense LGPL-2.1
qpSWIFT qpswift Interior point Sparse GPL-3.0
quadprog quadprog Active set Dense GPL-2.0
SCS scs Augmented Lagrangian Sparse MIT

Results

Check out the full reports for each test set in the results directory.

Maros-Meszaros

The Maros-Meszaros test set contains difficult problems, some of them large, sparse, ill-conditioned or with non-strictly p.s.d. Hessian matrices. For sparse solvers only.

Solver Success rate (%) Runtime (× slower than best) Primal error
cvxopt 16 16.4 18.5
highs 61 1.8 2.0
osqp 64 1.3 1.8
proxqp 72 1.0 1.0
scs 54 3.1 548.2

Check out the full report for definitions and details.

Maros-Meszaros dense

Probems in the Maros-Meszaros test set with less than a 1,000 optimization variables and 1,000 constraints. Note that this subset is not representative of the full Maros-Meszaros test set.

Check out the full report for definitions and details.

Limitations

Here are some known areas of improvement for this benchmark:

  • Cold start only: we don't evaluate warm-start performance for now.
  • Dual feasibility: we don't check the dual multipliers that solvers compute internally, as the API for them is not yet unified.

Running the benchmark

To run the benchmark on your machine, you will first need to install qpsolvers along with the QP solvers you want to test. For instance, to install open source solvers:

pip install qpsolvers[open_source_solvers]

To run e.g. the Maros-Meszaros test set, call:

python benchmark.py run maros_meszaros

Replace maros_meszaros with the name of the test set you want to run. You can also run only a specified solver, problem or set of solver settings, for instance:

python benchmark.py run maros_meszaros_dense --solver proxqp --settings default

Check out python benchmark.py --help for details.

See also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qpsolvers_benchmark-0.1.0rc1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

qpsolvers_benchmark-0.1.0rc1-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file qpsolvers_benchmark-0.1.0rc1.tar.gz.

File metadata

File hashes

Hashes for qpsolvers_benchmark-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 e109c93186131f02b11ea5a752937a5db79765cf57068c2fcbaf012558618e76
MD5 32894d2383c2880f6bc4863567754a2a
BLAKE2b-256 d334e19eb3b562634b67ed419f19b98e690cb159f2fa8bbf528f1b861dc45118

See more details on using hashes here.

File details

Details for the file qpsolvers_benchmark-0.1.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for qpsolvers_benchmark-0.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 20e312b7bf0844c98c589fd9f358e7980aa72e973edc7603f364e29d6dc41891
MD5 c36e705d7449e7dc1fbb19c7029570df
BLAKE2b-256 6597143bbcbb62c5f2a813964bc4d99fa7719b146010aa44b1963662b0098af8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page