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

First, install the benchmark and QP solvers by:

pip install qpsolvers_benchmark[solvers]

Omit [solvers] if you are only interested in running the benchmark with the solvers already installed on your system. Then, to run for instance 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 a specific solver, problem or set of solver settings:

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.0rc2.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

qpsolvers_benchmark-0.1.0rc2-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for qpsolvers_benchmark-0.1.0rc2.tar.gz
Algorithm Hash digest
SHA256 96a74e8361b924f60420f11046f303f749c2e0dfe4803f21eb1e9590f4d53299
MD5 278ddcaab319889cfd47e2257b3640a6
BLAKE2b-256 f166a4d4fd8f7fcf73c1ffe95569a685b8434db2cb83d752ef74197cfc531389

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qpsolvers_benchmark-0.1.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 6dd962e4aa49849dab98a4eaa66399f7c39795dc792afeaed951dc5e1d281983
MD5 2dcd8a671fb45016b808117edfb8d154
BLAKE2b-256 85345b3dca0c007cb6c10e0644d29731446b94916dedf9f53056c3dcf130f5e5

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