proxsuite

raw JSON →
0.7.2.post1 verified Fri May 01 auth: no python

The ProxSuite library provides an efficient QP solver tailored for robotics and optimization, with implementations of the ProxQP and OSQP algorithms. The current version is 0.7.2.post1, released under a permissive license. It supports Python >= 3.8 and has a bimonthly release cadence.

pip install proxsuite
error ModuleNotFoundError: No module named 'proxqp'
cause Direct import of 'proxqp' instead of using 'proxsuite.proxqp'
fix
Use 'from proxsuite import proxqp' or 'import proxsuite.proxqp as proxqp'.
error ValueError: The matrix is not symmetric positive definite.
cause The Hessian matrix H or constraint matrix C has not been properly formatted or the QP is infeasible.
fix
Verify that H is symmetric positive semidefinite (e.g., cast to symmetric: H = (H + H.T)/2). Check problem dimensions.
error AttributeError: module 'proxsuite' has no attribute 'quadprog'
cause Old code using removed quadprog wrapper.
fix
Update to use proxsuite.proxqp. See migration guide in documentation.
error ImportError: cannot import name 'solve' from 'proxsuite.proxqp'
cause Incorrect import path. The solve function is inside a backend submodule (dense/sparse).
fix
Use 'from proxsuite.proxqp.dense import solve' (or sparse).
breaking The 'proxsuite.quadprog' module (which wrapped quadprog) was removed in version 0.4.0. Use 'proxsuite.proxqp' instead.
fix Replace 'from proxsuite import quadprog' with 'from proxsuite import proxqp'. The API is different; see migration guide.
breaking The 'warm_start' parameter in solve() was renamed to 'warm_start' in version 0.6.0. The old name 'warm_start' is still accepted but deprecated.
fix Use 'warm_start' (with underscore) consistently. The old spelling may be removed in future releases.
gotcha Do not pass NumPy arrays with dtype=float32. The solver expects float64. Silently truncates precision leading to unexpected results.
fix Ensure arrays are float64: array.astype(np.float64).
deprecated The 'results.x' attribute for primal solution is deprecated in favor of 'results.x_solution' (from v0.7.0).
fix Use qp.results.x_solution instead of qp.results.x.

Minimal example solving a dense QP with inequality constraints.

import proxsuite
import numpy as np

# Solve a simple QP: min 0.5 x'Hx + g'x s.t. Cx <= d
H = np.eye(2)
g = np.array([-2, -3])
C = np.array([[1, 2], [-1, 0]])
d = np.array([4, 0])

# Create solver and solve
qp = proxsuite.proxqp.dense.QP(H, g, C, d)
proxsuite.proxqp.dense.solve(qp)
print(qp.results.x)