Skip to content
High-performance interior-point-method QP solvers
Branch: master
Clone or download
Latest commit 5d84a09 Jul 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
archive changed license to GPLv3 with classpath expeption Aug 15, 2018
auxiliary add hpipm_timer based on blasfeo_timer Jul 8, 2019
benchmark changed license to GPLv3 with classpath expeption Aug 15, 2018
cond fix to last commit Jun 6, 2019
dense_qp add set dense qp ipm arg warm start Jun 2, 2019
doc some routine rename in ocp_qp Jul 4, 2019
examples same to c example Jul 19, 2019
experimental/andrea allow for lists of numpy arrays too, removed Julia examples for now Jun 20, 2019
include some routine rename in ocp_qp_res & zero out mem in create all ocp ro… Jul 9, 2019
interfaces fix to mex interface compilation after folder rename Jul 19, 2019
ipm_core add not-square-root alg for cond May 19, 2019
lib created make build system May 17, 2017
ocp_qp fix python interface Jul 18, 2019
test_problems some routine rename in ocp_qp_res & zero out mem in create all ocp ro… Jul 9, 2019
tree_ocp_qp add warm_start==2 to warm start primal and dual sol May 31, 2019
utils changed license to GPLv3 with classpath expeption Aug 15, 2018
.gitignore fix python interface Jul 18, 2019
CMakeLists.txt add hpipm_timer based on blasfeo_timer Jul 8, 2019
Changelog.txt update changelog Jul 18, 2019
LICENSE.txt changed license to GPLv3 with classpath expeption Aug 15, 2018
Makefile add hpipm_timer based on blasfeo_timer Jul 8, 2019
Makefile.rule merge conflict Oct 29, 2018
README.md moved matlab & octave interface & examples to archive; renamed matlab… Jul 18, 2019
TODO.txt added TODO.txt Aug 14, 2017
version.txt add version.txt and Changelog.txt Jul 4, 2019

README.md

This is HPIPM, a high-performance interior-point method solver for dense, optimal control- and tree-structured convex quadratic programs. It provides efficient implementations of dense and structure-exploiting algorithms to solve small to medium scale problems arising in model predictive control and embedded optimization in general and it relies on the high-performance linear algebra package BLASFEO.


Getting Started:

The best way to get started with HPIPM is to check out the examples in /hpipm/examples/. HPIPM can be directly used from C, but there are also interfaces to Python and Matlab. Depending on which level you want to use HPIPM, check out the following section below. The QP notation used in HPIPM can be found in the doc folder.

C

In order to run the C examples in /hpipm/examples/C/ follow the steps below:

  1. clone BLASFEO on your machine: git clone https://github.com/giaf/blasfeo.git
  2. from the BLASFEO root folder, run make static_library & sudo make install_static
  3. from the HPIPM root folder, run make static_library & make examples
  4. cd to /hpipm/examples/c/ and run getting_started.out to solve a simple OCP-structured QP.

Python

If you would like to try out the Python interface, check out the examples in /hpipm/examples/python/ after going through the following steps:

  1. clone BLASFEO on your machine: git clone https://github.com/giaf/blasfeo.git
  2. from the BLASFEO root folder, run make shared_library -j4 & sudo make install_shared
  3. from the HPIPM root folder, run make shared_library -j4 & sudo make install_shared
  4. make sure that the location of the installed shared libraries is known to the system by running export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/blasfeo/lib:/opt/hpipm/lib. If you would like to avoid running this command whenever opening a new shell, you can add the commands above to your .bashrc.
  5. cd to /hpipm/interfaces/python/hpipm_python and run pip3 install .
  6. cd to /hpipm/examples/python and run python3 getting_started.py to solve a simple OCP-structured QP.

MATLAB and Octave

The interface for Matlab and Octave is based on mex files. Besides downloading, compiling and (optionally) installing BLASFEO and HPIPM (see instruction for Python):

  1. In a terminal, navigate to the folder hpipm/interfaces/matlab_octave, set the needed environment flags by running source env.sh in that folder and finally compile the interface by running the function compile_mex_ocp_qp in a Matlab or Octave instance started from the same terminal.
  2. In a terminal, navigate to the folder hpipm/examples/matlab_octave, set the needed environment flatgs by running source env.sh in that folder and finally run the examples in a Matlab or Octave instance started from the same terminal.

References:


Notes:

  • HPIPM is released under the GPL+CE (Gnu General Public License version 3.0 with Classpath Exception). This license has been chosen to avoid the issues that the LGPL license implies in case of static linking. Unformally speaking, the GPL+CE license allows the HPIPM library to be linked to both statically and dynamically to produce an executable, and the resulting executable can be released under terms of your choice. Please refer to the LICENSE.txt file for the legally binding statement of the license.

  • HPIPM relies on the high-performance linear algebra library BLASFEO. BLASFEO provides several implementations optimized for different computer architectures, and it makes heavy use of assembly code. If you get the error Illegal instruciton at running time, you are probably using a BLASFEO version (TARGET) unsupported by your CPU.

You can’t perform that action at this time.