Benchmark for quadratic programming solvers available in Python.
Project description
QP solvers benchmark
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
- Optimality conditions and numerical tolerances in QP solvers: note written while figuring out the
high_accuracy
settings of this benchmark. - jrl-qp/benchmarks: benchmark of QP solvers available in C++.
- proxqp_benchmark: benchmark examples for the ProxQP solver.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file qpsolvers_benchmark-0.1.0rc1.tar.gz
.
File metadata
- Download URL: qpsolvers_benchmark-0.1.0rc1.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e109c93186131f02b11ea5a752937a5db79765cf57068c2fcbaf012558618e76 |
|
MD5 | 32894d2383c2880f6bc4863567754a2a |
|
BLAKE2b-256 | d334e19eb3b562634b67ed419f19b98e690cb159f2fa8bbf528f1b861dc45118 |
File details
Details for the file qpsolvers_benchmark-0.1.0rc1-py3-none-any.whl
.
File metadata
- Download URL: qpsolvers_benchmark-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.22.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e312b7bf0844c98c589fd9f358e7980aa72e973edc7603f364e29d6dc41891 |
|
MD5 | c36e705d7449e7dc1fbb19c7029570df |
|
BLAKE2b-256 | 6597143bbcbb62c5f2a813964bc4d99fa7719b146010aa44b1963662b0098af8 |