proxsuite

The Advanced Proximal Optimization Toolbox

https://github.com/simple-robotics/proxsuite

Science Score: 41.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    8 of 22 committers (36.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

cpp eigen3 linear-programming optimization proximal-algorithms quadratic-programming robotics

Keywords from Contributors

geoscience hydrology meshes gaussian-processes dynamics
Last synced: 4 months ago · JSON representation ·

Repository

The Advanced Proximal Optimization Toolbox

Basic Info
  • Host: GitHub
  • Owner: Simple-Robotics
  • License: bsd-2-clause
  • Language: C++
  • Default Branch: devel
  • Homepage:
  • Size: 149 MB
Statistics
  • Stars: 483
  • Watchers: 16
  • Forks: 63
  • Open Issues: 17
  • Releases: 38
Topics
cpp eigen3 linear-programming optimization proximal-algorithms quadratic-programming robotics
Created over 3 years ago · Last pushed 5 months ago
Metadata Files
Readme License Citation

README.md

Proxsuite Logo

License Documentation CI - Linux/OSX/Windows - Conda PyPI version Conda version

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 developed 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 :

bash pip install proxsuite This approach is available on Linux, Windows and Mac OS X.

Quick install with :

bash conda install proxsuite -c conda-forge This approach is available on Linux, Windows and Mac OS X.

Quick install with :

bash 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. bash 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 cmakeminimumrequired(VERSION 3.10)

project(Example CXX) findpackage(proxsuite REQUIRED) set(CMAKECXXSTANDARD 17) # set(CMAKECXX_STANDARD 14) will work too

addexecutable(example example.cpp) targetlink_libraries(example PUBLIC proxsuite::proxsuite)

Vectorization support via SIMDE and activated by the compilation options '-march=native' or -mavx2 -mavx512f

addexecutable(examplewithfullvectorizationsupport example.cpp) targetlinklibraries(examplewithfullvectorizationsupport PUBLIC proxsuite::proxsuite-vectorized) targetcompileoptions(examplewithfullvectorization_support PUBLIC "-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=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 $bi \in \mathbb{R},~ \forall i = 1,...,n\text{eq}$ and $li \in \mathbb{R} \cup { -\infty }$ and $ui \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.

Random Mixed QP_dense_eps_abs_1e-6

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.

maros_meszaros_problems_high_accuracy

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-constraint 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 $bi \in \mathbb{R},~ \forall i = 1,...,n\text{eq}$ and $li \in \mathbb{R} \cup { -\infty }$ and $ui \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.

Owner

  • Name: SimpleRobotics
  • Login: Simple-Robotics
  • Kind: organization

Open Source Software for Efficient, Frugal and Reliable Robotics

Citation (CITATION.bib)

@inproceedings{bambade:hal-03683733,
  TITLE = {{PROX-QP: Yet another Quadratic Programming Solver for Robotics and beyond}},
  AUTHOR = {Antoine Bambade, Sarah El-Kazdadi, Adrien Taylor, Justin Carpentier},
  URL = {https://hal.inria.fr/hal-03683733},
  BOOKTITLE = {{RSS 2022 - Robotics: Science and Systems}},
  ADDRESS = {New York, United States},
  YEAR = {2022},
  MONTH = June,
  PDF = {https://hal.inria.fr/hal-03683733/file/Yet_another_QP_solver_for_robotics_and_beyond.pdf},
  HAL_ID = {hal-03683733},
  HAL_VERSION = {v1},
}

GitHub Events

Total
  • Create event: 9
  • Release event: 2
  • Issues event: 21
  • Watch event: 69
  • Delete event: 5
  • Issue comment event: 65
  • Push event: 53
  • Pull request review comment event: 7
  • Pull request review event: 37
  • Pull request event: 72
  • Fork event: 15
Last Year
  • Create event: 9
  • Release event: 2
  • Issues event: 21
  • Watch event: 69
  • Delete event: 5
  • Issue comment event: 65
  • Push event: 53
  • Pull request review comment event: 7
  • Pull request review event: 37
  • Pull request event: 72
  • Fork event: 15

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 1,769
  • Total Committers: 22
  • Avg Commits per committer: 80.409
  • Development Distribution Score (DDS): 0.73
Past Year
  • Commits: 180
  • Committers: 10
  • Avg Commits per committer: 18.0
  • Development Distribution Score (DDS): 0.694
Top Committers
Name Email Commits
Justin Carpentier j****r@i****r 478
BAMBADE Antoine a****e@i****r 369
Fabian Schramm 5****h 344
sarah 275
pre-commit-ci[bot] 6****] 85
ManifoldFR w****t@p****g 56
Joris Vaillant j****t@i****r 42
Stéphane Caron s****n@n****g 37
Antoine Bambade a****e@p****r 25
Wolfgang Merkt w****t@g****m 19
Guilhem Saurel g****l@l****r 12
quentin le lidec q****c@i****r 7
Adrien Escande a****e@i****r 5
J Berg j****9@g****m 4
Louis Montaut l****t@g****m 3
Michael Fennel m****l@k****u 2
Aaron Miller a****3@g****m 1
Daisuke Nishimatsu 4****1 1
Joris Gillis j****2@g****m 1
abambade a****e@M****l 1
Konstantinos Chatzilygeroudis c****z@g****m 1
oumayb b****a@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 65
  • Total pull requests: 267
  • Average time to close issues: 25 days
  • Average time to close pull requests: 5 days
  • Total issue authors: 45
  • Total pull request authors: 20
  • Average comments per issue: 3.77
  • Average comments per pull request: 0.77
  • Merged pull requests: 226
  • Bot issues: 0
  • Bot pull requests: 59
Past Year
  • Issues: 16
  • Pull requests: 66
  • Average time to close issues: 27 days
  • Average time to close pull requests: 8 days
  • Issue authors: 11
  • Pull request authors: 12
  • Average comments per issue: 1.69
  • Average comments per pull request: 0.92
  • Merged pull requests: 43
  • Bot issues: 0
  • Bot pull requests: 12
Top Authors
Issue Authors
  • stephane-caron (9)
  • jcarpent (4)
  • pengfzhou (4)
  • jdumas (2)
  • gergondet-woven (2)
  • jberg7 (2)
  • ahoarau (2)
  • yurivict (2)
  • whtqh (2)
  • limymy (2)
  • JYChen18 (1)
  • kermado (1)
  • costashatz (1)
  • antonvorobets (1)
  • zhilinxiong (1)
Pull Request Authors
  • jcarpent (59)
  • pre-commit-ci[bot] (58)
  • fabinsch (54)
  • jorisv (25)
  • Bambade (13)
  • nim65s (11)
  • ManifoldFR (10)
  • stephane-caron (9)
  • Lucas-Haubert (7)
  • wxmerkt (7)
  • quentinll (3)
  • kermado (2)
  • jberg5 (2)
  • dependabot[bot] (2)
  • oumayb (2)
Top Labels
Issue Labels
bug (3) enhancement (2)
Pull Request Labels
no changelog (55) pr status to review (6) pr status wip (3) bug (2) dependencies (2) github_actions (2) enhancement (1) pr status ready (1)

Packages

  • Total packages: 5
  • Total downloads:
    • pypi 16,357 last-month
    • homebrew 16 last-month
  • Total dependent packages: 9
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 176
  • Total maintainers: 1
proxy.golang.org: github.com/Simple-Robotics/ProxSuite
  • Versions: 44
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 4 months ago
proxy.golang.org: github.com/simple-robotics/proxsuite
  • Versions: 44
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 5 months ago
pypi.org: proxsuite

Quadratic Programming Solver for Robotics and beyond.

  • Versions: 44
  • Dependent Packages: 9
  • Dependent Repositories: 1
  • Downloads: 16,357 Last month
  • Docker Downloads: 0
Rankings
Dependent packages count: 1.2%
Downloads: 3.6%
Stargazers count: 3.7%
Docker downloads count: 3.9%
Forks count: 6.4%
Average: 6.8%
Dependent repos count: 21.7%
Maintainers (1)
Last synced: 5 months ago
conda-forge.org: proxsuite
  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Dependent repos count: 24.3%
Stargazers count: 26.3%
Forks count: 31.9%
Average: 33.5%
Dependent packages count: 51.6%
Last synced: 4 months ago
formulae.brew.sh: proxsuite

Advanced Proximal Optimization Toolbox

  • Versions: 30
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 16 Last month
Rankings
Dependent packages count: 19.0%
Forks count: 28.6%
Stargazers count: 29.3%
Average: 43.9%
Dependent repos count: 50.7%
Downloads: 92.0%
Last synced: 5 months ago

Dependencies

.github/workflows/ci-linux-osx-win-conda.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite
  • hendrikmuhs/ccache-action v1.2 composite
.github/workflows/ci-linux-ros.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • ros-industrial/industrial_ci master composite
.github/workflows/ci-osx-arm64-conda.yml actions
  • actions/checkout v2 composite
.github/workflows/gh-pages.yml actions
  • JamesIves/github-pages-deploy-action 3.7.1 composite
  • actions/checkout v2 composite
  • actions/download-artifact v2 composite
  • actions/upload-artifact v2 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/checkout v2 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • conda-incubator/setup-miniconda v2 composite
  • docker://quay.io/pypa/manylinux_2_24_x86_64 * composite
  • jannekem/run-python-script-action v1 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
  • numpy *
  • scipy *