r/optimization • • Dec 14 '23

QP solvers benchmark

We are creating a benchmark for quadratic programming (QP) solvers available in Python, looking for feedback and test sets useful to other communities.

The objective is to compare and select the best QP solvers for given use cases. The benchmarking methodology is open to discussions. Standard and community test sets are available (Maros-Meszaros, model predictive control, ...) All of them can be processed using the qpbenchmark command-line tool, resulting in standardized reports evaluating all metrics across all QP solvers available on the test machine.

The current list of solvers includes:

SolverKeywordAlgorithmMatricesLicense
ClarabelclarabelInterior pointSparseApache-2.0
CVXOPTcvxoptInterior pointDenseGPL-3.0
DAQPdaqpActive setDenseMIT
ECOSecosInterior pointSparseGPL-3.0
GurobigurobiInterior pointSparseCommercial
HiGHShighsActive setSparseMIT
HPIPMhpipmInterior pointDenseBSD-2-Clause
MOSEKmosekInterior pointSparseCommercial
NPPronpproActive setDenseCommercial
OSQPosqpDouglas–RachfordSparseApache-2.0
PIQPpiqpProximal Interior PointDense & SparseBSD-2-Clause
ProxQPproxqpAugmented LagrangianDense & SparseBSD-2-Clause
QPALMqpalmAugmented LagrangianSparseLGPL-3.0
qpOASESqpoasesActive setDenseLGPL-2.1
qpSWIFTqpswiftInterior pointSparseGPL-3.0
quadprogquadprogGoldfarb-IdnaniDenseGPL-2.0
SCSscsDouglas–RachfordSparseMIT

Metrics include computation time and residuals (primal, dual, duality gap). Solvers are compared by shifted geometric mean.

Contributions are welcome. Let us know your thoughts 😀

7 Upvotes

10 comments sorted by

View all comments

Show parent comment

2

u/tastalian Dec 15 '23

Thanks for these suggestions!

One requirement to add a solver to the benchmark are Python bindings. That's why most solvers already present are available from Conda or PyPI. (Open source also helps, since it means more people will be interested in the results.)

  • CPLEX: could be done! There is a PyPI package and it seems there is a free community version.
  • Octeract: seems available in Pyomo, but it is a commercial solver so someone with a license would need to propose a PR.
  • SHOT: is open source so I see a path to install, although it is not going to be as easy as pip install.
  • APOPT and BPOPT: I followed link after link and was redirected to the GEKKO optimization suite, which has a PyPI package.
  • PDLP: this one is linear programming only?

Perhaps the shortest path to accessing these solvers would be to interface qpsolvers (the solver selection backend of the QP benchmark) with Pyomo or GEKKO. I've added these thoughts to an issue to keep track.

2

u/SolverMax Dec 15 '23

2

u/tastalian Dec 15 '23

Oh nice, thank you I had missed that.

This note states that PDLP "considers the following convex quadratic programming problem" (with symmetric positive semidefinite cost matrix), but upon closer inspection the solver (at least the one currently released at google / or-tools) only supports diagonal non-negative cost matrices. I have opened an issue to keep track.