Package: proxsuite
ProxSuiteis a collection of open-source, numerically robust, precise, and efficient numerical solvers (e.g., LPs, QPs, etc.) rooted in revisited primal-dual proximal algorithms.
ThroughProxSuite, we aim to offer the community scalable optimizers that deal with dense, sparse, or matrix-free problems. While the first targeted application is Robotics,ProxSuitecan be used in other contexts without limits.ProxSuiteis actively developped and supported by theWillowandSierraresearch groups, joint research teams betweenInria,École Normale Supérieure de ParisandCentre National de la Recherche Scientifiquelocalized in France.ProxSuiteis already integrated into:CVXPYmodeling language for convex optimization problems,CasADi's symbolic framework for numerical optimization in general and optimal control. ProxQP is available in CasADi as a plugin tosolve quadratic programs,TSID: robotic software for efficient robot inverse dynamics with contacts and based onPinocchio.We are ready to integrateProxSuitewithin other optimization ecosystems.ProxSuite main featuresProxsuiteis fast:C++ template library,cache-friendly.Proxsuiteis versatile, offering through a unified API advanced algorithms specialized for efficiently exploiting problem structures:dense, sparse, and matrix-free matrix factorization backends,advanced warm-starting options (e.g., equality-constrained initial guess, warm-start or cold-start options from previous results),with dedicated features forhandling more efficiently box constraints, linear programs, QP with diagonal Hessian, or with far more constraints than primal variables,solving nonconvex QPs,solving batches of QPs in parallel,solving the closest feasible QP if the QP appears to be primal infeasible,differentiating feasible and infeasible QPs.Proxsuiteis flexible:header only,C++ 14/17/20 compliant,Python and Julia bindings for easy code prototyping without sacrificing performance.Proxsuiteis extensible.Proxsuiteis reliable and extensively tested, showing the best performances on the hardest problems of the literature.Proxsuiteis supported and tested on Windows, Mac OS X, Unix, and Linux.DocumentationThe onlineProxSuitedocumentation of the last release is availablehere.Getting startedProxSuiteis distributed to many well-known package managers.Quick install with:pipinstallproxsuiteThis approach is available on Linux, Windows and Mac OS X.Quick install with:condainstallproxsuite-cconda-forgeThis approach is available on Linux, Windows and Mac OS X.Quick install with:brewinstallproxsuiteThis approach is available on Linux and Mac OS X.Alternative approachesInstallation from source is presentedhere.Compiling a first example programFor the fastest performance, use the following command to enable vectorization when compiling the simpleexample.g++-O3-march=native-DNDEBUG-std=gnu++17-DPROXSUITE_VECTORIZEexamples/first_example_dense.cpp-ofirst_example_dense$(pkg-config--cflagsproxsuite)Using ProxSuite with CMakeIf you want to use ProxSuite with CMake, the following tiny example should help you:cmake_minimum_required(VERSION3.10)project(ExampleCXX)find_package(proxsuiteREQUIRED)set(CMAKE_CXX_STANDARD17)# set(CMAKE_CXX_STANDARD 14) will work tooadd_executable(exampleexample.cpp)target_link_libraries(examplePUBLICproxsuite::proxsuite)# Vectorization support via SIMDE and activated by the compilation options '-march=native' or `-mavx2 -mavx512f`add_executable(example_with_full_vectorization_supportexample.cpp)target_link_libraries(example_with_full_vectorization_supportPUBLICproxsuite::proxsuite-vectorized)target_compile_options(example_with_full_vectorization_supportPUBLIC"-march=native")If you have compiled ProxSuite with the vectorization support, you might also use the CMake targetproxsuite::proxsuite-vectorizedto also link against SIMDE.
Don't forget to use-march=nativeto get the best performance.ProxQPTheProxQPalgorithm is a numerical optimization approach for solving quadratic programming problems of the form:$$
\begin{align}
\min_{x} &  ~\frac{1}{2}x^{T}Hx+g^{T}x \
\text{s.t.} & ~A x = b \
& ~l \leq C x \leq u
\end{align}
$$where $x \in \mathbb{R}^n$ is the optimization variable. The objective function is defined by a positive semidefinite matrix $H \in \mathcal{S}^n_+$ and a vector $g \in \mathbb{R}^n$. The linear constraints are defined by the equality-contraint matrix $A \in \mathbb{R}^{n_\text{eq} \times n}$ and the inequality-constraint matrix $C \in \mathbb{R}^{n_\text{in} \times n}$ and the vectors $b \in \mathbb{R}^{n_\text{eq}}$, $l \in \mathbb{R}^{n_\text{in}}$ and $u \in \mathbb{R}^{n_\text{in}}$ so that $b_i \in \mathbb{R},~ \forall i = 1,...,n_\text{eq}$ and $l_i \in \mathbb{R} \cup { -\infty }$ and $u_i \in \mathbb{R} \cup { +\infty }, ~\forall i = 1,...,n_\text{in}$.CitingProxQPIf you are usingProxQPfor your work, we encourage you tocite the related paper.Numerical benchmarksThe numerical benchmarks ofProxQPagainst other commercial and open-source solvers are availablehere.For dense Convex Quadratic Programs with inequality and equality constraints, when asking for relatively high accuracy (e.g., 1e-6), one obtains the following results.On the y-axis, you can see timings in seconds, and on the x-axis dimension wrt to the primal variable of the random Quadratic problems generated (the number of constraints of the generated problem is half the size of its primal dimension). For every dimension, the problem is generated over different seeds, and timings are obtained as averages over successive runs for the same problems. This chart shows for every benchmarked solver and random Quadratic program generated, barplot timings, including median (as a dot) and minimal and maximal values obtained (defining the amplitude of the bar). You can see thatProxQPis always below over solvers, which means it is the quickest for this test.For hard problems from theMaros Meszaros testset, when asking for high accuracy (e.g., 1e-9), one obtains the results below.The chart above reports the performance profiles of different solvers. It is classic for benchmarking solvers. Performance profiles correspond to the fraction of problems solved (on the y-axis) as a function of certain runtime (on the x-axis, measured in terms of a multiple of the runtime of the fastest solver for that problem). So the higher, the better. You can see thatProxQPsolves the quickest over 60% of the problems (i.e., for $\tau=1$) and that for solving about 90% of the problems, it is at most 2 times slower than the fastest solvers solving these problems (i.e., for $\tau\approx2$).Note: All these results have been obtained with a 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz CPU.QPLayerQPLayerenables to use a QP as a layer within standard learning architectures. More precisely, QPLayer differentiates over $\theta$ the primal and dual solutions of QP of the form$$
\begin{align}
\min_{x} &  ~\frac{1}{2}x^{T}H(\theta)x+g(\theta)^{T}x \
\text{s.t.} & ~A(\theta) x = b(\theta) \
& ~l(\theta) \leq C(\theta) x \leq u(\theta)
\end{align}
$$where $x \in \mathbb{R}^n$ is the optimization variable. The objective function is defined by a positive semidefinite matrix $H(\theta) \in \mathcal{S}^n_+$ and a vector $g(\theta) \in \mathbb{R}^n$. The linear constraints are defined by the equality-contraint matrix $A(\theta) \in \mathbb{R}^{n_\text{eq} \times n}$ and the inequality-constraint matrix $C(\theta) \in \mathbb{R}^{n_\text{in} \times n}$ and the vectors $b \in \mathbb{R}^{n_\text{eq}}$, $l(\theta) \in \mathbb{R}^{n_\text{in}}$ and $u(\theta) \in \mathbb{R}^{n_\text{in}}$ so that $b_i \in \mathbb{R},~ \forall i = 1,...,n_\text{eq}$ and $l_i \in \mathbb{R} \cup { -\infty }$ and $u_i \in \mathbb{R} \cup { +\infty }, ~\forall i = 1,...,n_\text{in}$.QPLayeris able to learn more structured architectures. For example, $\theta$ can consists only in learning some elements of $A$ while letting $b$ fixed (see e.g., theexampleabout how to include QPLayer into a learning pipeline).QPLayercan also differentiates over LPs.QPLayerallows for parallelized calculus over CPUs, and is interfaced withPyTorch.CitingQPLayerIf you are usingQPLayerfor your work, we encourage you tocite the related paper.Installation procedurePlease follow the installation procedurehere.