Quadratic Programming Solver for Robotics and beyond.
Project description
ProxSuite is a collection of open-source, numerically robust, precise, and efficient numerical solvers (e.g., LPs, QPs, etc.) rooted in revisited primal-dual proximal algorithms. Through ProxSuite, we aim to offer the community scalable optimizers that deal with dense, sparse, or matrix-free problems. While the first targeted application is Robotics, ProxSuite can be used in other contexts without limits.
ProxSuite is actively developped and supported by the Willow and Sierra research groups, joint research teams between Inria, École Normale Supérieure de Paris and Centre National de la Recherche Scientifique localized in France.
ProxSuite is already integrated into:
- CVXPY modeling 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 to solve quadratic programs,
- TSID: robotic software for efficient robot inverse dynamics with contacts and based on Pinocchio.
We are ready to integrate ProxSuite within other optimization ecosystems.
ProxSuite main features
Proxsuite is fast:
- C++ template library,
- cache-friendly.
Proxsuite is 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 for
- handling 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.
Proxsuite is flexible:
- header only,
- C++ 14/17/20 compliant,
- Python and Julia bindings for easy code prototyping without sacrificing performance.
Proxsuite is extensible. Proxsuite is reliable and extensively tested, showing the best performances on the hardest problems of the literature. Proxsuite is supported and tested on Windows, Mac OS X, Unix, and Linux.
Documentation
The online ProxSuite documentation of the last release is available here.
Getting started
ProxSuite is distributed to many well-known package managers.
Quick install with :
pip install proxsuite
This approach is available on Linux, Windows and Mac OS X.
Quick install with :
conda install proxsuite -c conda-forge
This approach is available on Linux, Windows and Mac OS X.
Quick install with :
brew install proxsuite
This approach is available on Linux and Mac OS X.
Alternative approaches
Installation from source is presented here.
Compiling a first example program
For the fastest performance, use the following command to enable vectorization when compiling the simple example.
g++ -O3 -march=native -DNDEBUG -std=gnu++17 -DPROXSUITE_VECTORIZE examples/first_example_dense.cpp -o first_example_dense $(pkg-config --cflags proxsuite)
Using ProxSuite with CMake
If you want to use ProxSuite with CMake, the following tiny example should help you:
cmake_minimum_required(VERSION 3.10)
project(Example CXX)
find_package(proxsuite REQUIRED)
set(CMAKE_CXX_STANDARD 17) # set(CMAKE_CXX_STANDARD 14) will work too
add_executable(example example.cpp)
target_link_libraries(example PUBLIC proxsuite::proxsuite)
# Vectorization support via SIMDE and activated by the compilation options '-march=native' or `-mavx2 -mavx512f`
add_executable(example_with_full_vectorization_support example.cpp)
target_link_libraries(example_with_full_vectorization_support PUBLIC proxsuite::proxsuite-vectorized)
target_compile_options(example_with_full_vectorization_support PUBLIC "-march=native")
If you have compiled ProxSuite with the vectorization support, you might also use the CMake target proxsuite::proxsuite-vectorized
to also link against SIMDE.
Don't forget to use -march=native
to get the best performance.
ProxQP
The ProxQP algorithm 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}$.
Citing ProxQP
If you are using ProxQP for your work, we encourage you to cite the related paper.
Numerical benchmarks
The numerical benchmarks of ProxQP against other commercial and open-source solvers are available here.
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 that ProxQP is always below over solvers, which means it is the quickest for this test.
For hard problems from the Maros 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 that ProxQP solves 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.
QPLayer
QPLayer enables 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}$.
QPLayer is 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., the example about how to include QPLayer into a learning pipeline). QPLayer can also differentiates over LPs. QPLayer allows for parallelized calculus over CPUs, and is interfaced with PyTorch.
Citing QPLayer
If you are using QPLayer for your work, we encourage you to cite the related paper.
Installation procedure
Please follow the installation procedure here.
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 Distributions
Built Distributions
Hashes for proxsuite-0.6.2-0-pp39-pypy39_pp73-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec5de946ce34adda4ede486c47001d89e5570e24bdd8db769c86ba7bbe6bf3c5 |
|
MD5 | 6e6f557333931b483ed139f7800c8661 |
|
BLAKE2b-256 | d58847874f01805a518a1de0b421bdc84514cb5dbc47ee0dec07cee4b47f7332 |
Hashes for proxsuite-0.6.2-0-pp38-pypy38_pp73-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c35ab8453a64201f9f06145b4a873651a9e2abd4cdba41857a61d58f16b71893 |
|
MD5 | fa3bfff3e01e7eb6c993ae54606741bf |
|
BLAKE2b-256 | c10adb809137a924359e228fb387369c104ceae8551e3255b1da846604f46c9e |
Hashes for proxsuite-0.6.2-0-pp37-pypy37_pp73-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 494ffa192ceff631757e6cb52211e5803d2af51917369f36a4d3470494b4309c |
|
MD5 | 1746d321d98edca43be98b3b6e51aa2b |
|
BLAKE2b-256 | 180d1f227e61acd972cd198d7189d6928cc21dfbdad3755117048c2bfc87a3f2 |
Hashes for proxsuite-0.6.2-0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be2510393e0459c18a55374f0c6673e186665854d139445badbb2ddef3224cf2 |
|
MD5 | 15481e92a5e312de6955e3cbf06a94fc |
|
BLAKE2b-256 | 23445745e5da3a072f8cd2d9c63045780d2734ee4531362e528548af08e3ed0b |
Hashes for proxsuite-0.6.2-0-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16d9a820e03ad6203a060499c540fec65195e00b8c137aff56ac24c9e8732ffa |
|
MD5 | 8c76a3e92217d9eb0eabb31b1959ff42 |
|
BLAKE2b-256 | bbfc9a99c6f9f4cf110b428dc0c327d043b6ffcf2c7846396feebfce46b321b8 |
Hashes for proxsuite-0.6.2-0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cb06cca21df992457bd436d63f7cd0a0cf97a9557740477af2b64a026494b8a |
|
MD5 | aea31bfd33bbde3005caabffd0e66126 |
|
BLAKE2b-256 | 21e5ff1d514bc3b4510d65d15eac606aa2e64319018eba2d812cc80352af10d7 |
Hashes for proxsuite-0.6.2-0-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08c9c501d28618758f4238ab72f755dac162d157292bf99b86364c6379ae3da8 |
|
MD5 | d3359c9d599d40cd49f87471bd7fe14b |
|
BLAKE2b-256 | 6b7f55f29e2beeb04df29fba4d00abd983b986307ca72023fd66263e578d0d2d |
Hashes for proxsuite-0.6.2-0-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6c726d5c0993dfe63380bad44358b8a02b73d30605efe13f336ddf4744d335e |
|
MD5 | b284186f8ffd5ff7f0d8c5146ca0c52e |
|
BLAKE2b-256 | a15b52be205e588f0876bc9d1f6209f172d2a3dc65a97714a28786cbe2daa809 |
Hashes for proxsuite-0.6.2-0-cp311-cp311-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc71976c152a82edc9e1ef2515ced4026f3772c1b790a70805c91ebad2e68ddf |
|
MD5 | 27f2888db5a0d8e06dfb7def3b6e9323 |
|
BLAKE2b-256 | 8a211831a4ab47b774b13e66e2b486013b34269b42d6bc55e3b09a80ecf98dca |
Hashes for proxsuite-0.6.2-0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8863344bddec0927d25cfaca88c537120c0d2fd6ba1087cc927259157522d70 |
|
MD5 | 8d475efb4bc079a2c2c131d4d2ec777f |
|
BLAKE2b-256 | c3e268151ab6c9a90b1f153e0e1064d751b47d3d0c24608dc1717e202bde64d8 |
Hashes for proxsuite-0.6.2-0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6c2c4015e95fc78b8b69cf03f9b95e8a0712193cbce54e6dd2392f6ddf1e9db |
|
MD5 | 40d842b9ac64075f67b6f33fc34ec3bd |
|
BLAKE2b-256 | c069c138b32d97c18a2918a592860f2b52bb5fbb370728666423624dc962c5d1 |
Hashes for proxsuite-0.6.2-0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 543152272ee3b3164b7545091bf75262076a0bbf15d9c27e117cd207aa112097 |
|
MD5 | 854f78c75bc476c82da89aa7bf92cf03 |
|
BLAKE2b-256 | e46f0f42eed115c6919f3305ecf0af0ad23b28c30bcc6bf036939be6c3eb960b |
Hashes for proxsuite-0.6.2-0-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71c0ff961345b27b7668d6bb9f2409e39550ef8818e134c9aeb10b392824c547 |
|
MD5 | 15b4650d61dab6c87fa08479b86abe7b |
|
BLAKE2b-256 | a2b3111248a41d4879dbb0c3638ad1e0665c6bc24c657a5e0bfd1ad36a85a6d0 |
Hashes for proxsuite-0.6.2-0-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b26044d53cf165d3d7b317c84b619f42f53200db5ddece508f4cdf254cde21 |
|
MD5 | 90dd5ae64747c34de526966db3b02263 |
|
BLAKE2b-256 | 3ba1efd74c2075957da0511121c7ad805d4ac58b9343c5b8c8249730374e5b9e |
Hashes for proxsuite-0.6.2-0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4de006f4d42902bf86a15afb567fea430576ed7fc382ba168eae84b5b8cc1c9 |
|
MD5 | f181d20160d6057717185b4226a7dc29 |
|
BLAKE2b-256 | c8ace97ec93a2a25a310746798916b0af965291038543c7a7d0bc32291d1c7df |
Hashes for proxsuite-0.6.2-0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd2290a61a402943346518680f19a70a5eb521e42c78c354f3b5b77220898fdd |
|
MD5 | 84f57fc1cdd599727b7c3029281b7640 |
|
BLAKE2b-256 | 09f5e08871d88962ec25f3018a89e7e2f184154dbbafb2b8bf18f28637cb74f7 |
Hashes for proxsuite-0.6.2-0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3eb12d4aa23e8ca188f8e835879b68af11405bcfaabf7d331e725d0a1b9f61f3 |
|
MD5 | 4a6285a3c48e5a5700affb9662bcffaa |
|
BLAKE2b-256 | c141734bb1196f1af31eea956c1fe02359d4c6c3b0b01a76e652e7dbd663e764 |
Hashes for proxsuite-0.6.2-0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e052b283d83be4186fcc147f3dd181e755d09112ade1f3c0317528ee975ad11 |
|
MD5 | 4ba92341abc395422b3d66407d7eb59a |
|
BLAKE2b-256 | 3847c57b02ff7d13fc00c28841ef671f9cef5c76d13b9b6a39a30c8a6409c18e |
Hashes for proxsuite-0.6.2-0-cp39-cp39-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed7ca948ad322bdfa8a009efe7f70f4a776ff74244ab6ef2fc38184c961918b1 |
|
MD5 | a5155a499647ca3866698f620388ab74 |
|
BLAKE2b-256 | a30b7f162a23c01cdaba1a9e26c7099fe83c5d0b966c68de6060e5d7b10fd2d4 |
Hashes for proxsuite-0.6.2-0-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f347803f116f76f7083ea488aa08eeb933266dcdfae0fe0c0aff905ec5bd247d |
|
MD5 | 14283ff8948b3798fd0cb6bb0fef62b2 |
|
BLAKE2b-256 | 3e4f8d6450f1f2f4a54dafee1db12dce34f240df8e7615eea34d807ac77ea34c |
Hashes for proxsuite-0.6.2-0-cp39-cp39-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0959d5bb96f2fd304b963187efdfcb2b067e7ab57e23a6083866c52422242b6 |
|
MD5 | 65b74be741c9d8abf61cb40c85d35e4d |
|
BLAKE2b-256 | c3a11caceed3ab572da28dea736515ee38b7fece81fdf007f1f934286738ca3f |
Hashes for proxsuite-0.6.2-0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40ef4e09e074b98b206a09133bdd65fd0cdc841982012dc00106efc2c197a2c4 |
|
MD5 | 8518dd51903d13f2eb93d10c88ae96f8 |
|
BLAKE2b-256 | 6e0177f53863aae3726ec15d1bb2e579019294ffc98e6d131e631c8bbbddd0b1 |
Hashes for proxsuite-0.6.2-0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d518373b3de9d73dcd125dbd47c4af944e7f8e7aabac6fa51ed99cecac490260 |
|
MD5 | 070a2361a301e9c6b6fc556e3526d28e |
|
BLAKE2b-256 | adbf7264de975fa4f9c6674f1e595066564c5d1fcbdbc789ca7717f213595a9b |
Hashes for proxsuite-0.6.2-0-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78e125c2d5ac78995057552f630f5a87abc2612a60668f68ac6905b6f7fb7921 |
|
MD5 | f0ff7d0c3fe80da6b24030207b0379f7 |
|
BLAKE2b-256 | f9fc212fd893636ce2d915d73b2fde7cfb4e8aa221dd442f023b4ec5211968b3 |
Hashes for proxsuite-0.6.2-0-cp38-cp38-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a57528d8bd693ad56d397f34609deb93cb40eb4aefa54cd638cf8a4791f80fd5 |
|
MD5 | ef5c4b2b21c70dcb10e0b960f4edc630 |
|
BLAKE2b-256 | 4c732c8a6218204a83cecbb3d291eac928939c0640742f9700f7f9dfbc7dcf90 |
Hashes for proxsuite-0.6.2-0-cp38-cp38-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 104118047656764b13b26336130a436118a2987bdd0c84b1f4f7b5d72c5227a5 |
|
MD5 | 50429c02ac610fcd77d678b4b6c9a459 |
|
BLAKE2b-256 | 6c76a8bab86514e194934332929bbdeefdcec42f7e7bbc1ddb0afe7482b6da62 |
Hashes for proxsuite-0.6.2-0-cp38-cp38-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b1b8569035b193a29d3ebd07d8a9bc466adc5974ce7b26909714008db1ab925 |
|
MD5 | 59e001987e92be33f79242e1525cf011 |
|
BLAKE2b-256 | b1c52aa2cde7bba43b27b40dba9d38742c12274200bc8c173eb58740bae1c7f8 |
Hashes for proxsuite-0.6.2-0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90d1de613100acd5189a3d771a70ed795a7dc6f263725a969da339aaa21ae8f4 |
|
MD5 | bfffa67e5e5b1691439684976135a44b |
|
BLAKE2b-256 | 5f97f639d68f688535b52f9cbc2e3a355465b09816a7826eb1f589db69a30622 |
Hashes for proxsuite-0.6.2-0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1c45caff72176a91a94937edba868d6d2030e27bab83eea48d886b6127a8796 |
|
MD5 | 820be1e1cc25dbdc9eaf8316aadb683a |
|
BLAKE2b-256 | 7660138b9cd0fcb12ae9ae8bf94e7b030e263976a793a76725afcf8a278c0cdd |
Hashes for proxsuite-0.6.2-0-cp37-cp37m-manylinux_2_28_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe162d8529f6d86d171b71db053da35164429fd779165d80753ab7af349b1cc3 |
|
MD5 | 83258420926d2ba935df92d2f5363a77 |
|
BLAKE2b-256 | 234141331de2bbd3de4f30b526dab831fcd8b6e734b5a60b5535dcd7b3c72248 |
Hashes for proxsuite-0.6.2-0-cp37-cp37m-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52ca0bc9af16658d922f90f2f27478e221ed6ac155c2c7bf9422979e1c2ee97f |
|
MD5 | 1a22b594342b51e4eb20e57338cf36eb |
|
BLAKE2b-256 | 9ba0727b0545091fa9d702c901943edf09c2731ae0f2f6d2ce733aab285c61ef |
Hashes for proxsuite-0.6.2-0-cp37-cp37m-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64f8dfc7f170b9b9c1081e8857a65f0786bce1d70bc18126afe4d1258131887f |
|
MD5 | f8dbbaebf21cf7d017f6c75860b2a002 |
|
BLAKE2b-256 | f4ca37a674fb16a839d70bee660823863e7cd4273241c6e18037d2be3d80387c |