Home

Awesome

qpmad

<table> <tr> <td align="center"> CI status </td> <td align="center"> Debian package </td> </tr> <tr> <td align="center"> <a href="https://github.com/asherikov/qpmad/actions?query=workflow%3A.github%2Fworkflows%2Fmaster.yml+branch%3Amaster"> <img src="https://github.com/asherikov/qpmad/workflows/.github/workflows/master.yml/badge.svg?branch=master" alt="Build Status"> </a> </td> <td align="center"> <a href="https://cloudsmith.io/~asherikov-aV7/repos/all/packages/detail/deb/qpmad/latest/a=all;d=any-distro%252Fany-version;t=binary/"> <img src="https://api-prd.cloudsmith.io/v1/badges/version/asherikov-aV7/all/deb/qpmad/latest/a=all;d=any-distro%252Fany-version;t=binary/?render=true&show_latest=true" alt="Latest version of 'qpmad' @ Cloudsmith" /> </a> </td> </tr> </table>

Eigen-based, header-only C++ implementation of Goldfarb-Idnani dual active set algorithm for quadratic programming. The package is ROS compatible.

The solver is optimized for performance, for this reason some of the computations are omitted as described below. See https://github.com/asherikov/qpmad_benchmark for comparison with qpOASES and eiQuadProg.

Contents

<a name="links"></a> Links

<a name="features"></a> Features:

<a name="dependencies"></a> Dependencies:

<a name="notes"></a> Notes:

  1. Before computing the full step length I check that the dot product of the chosen constraint with the step direction is not zero instead of checking the norm of the step direction. The former approach makes more sense since the said dot product appears later as a divisor and we can avoid computation of a useless norm.

  2. I am aware that activation of simple bounds zeroes out parts of matrix 'J'. Unfortunately, I don't see a way to exploit this on modern hardware -- updating the whole 'J' at once is computationally cheaper than doing this line by line selectively or permuting 'J' to collect sparse rows in one place.

  3. Since the solver may arbitrarily choose violated constraints for activation, it always prefers the cheapest ones, i.e., the simple bounds. In particular, this allows to avoid computation of violations of general constraints if there are violated bounds.

  4. Vector 'd' and primal step direction are updated during partial steps instead of being computed from scratch. This, however, does not result in a significant performance improvement.

<a name="docs"></a> Documentation and examples

<a name="faq"></a> FAQ

'Non-negative step lengths expected' exception

See discussion at https://github.com/asherikov/qpmad/issues/2