GithubHelp home page GithubHelp logo

markusgft / hpipm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from giaf/hpipm

1.0 2.0 0.0 6.07 MB

High-performance interior-point-method QP solvers

License: Other

CMake 0.58% Makefile 2.23% C 89.24% Shell 0.18% MATLAB 4.99% Julia 0.24% TeX 0.25% C++ 0.33% Python 1.97%

hpipm's Introduction

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.

  1. Compile and install BLASFEO and HPIPM BLASFEO and HPIPM (see instruction for Python 1)-3)):
  2. 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.
  3. In a terminal, navigate to the folder hpipm/examples/matlab_octave. Set the needed environment flags by running source env.sh in that folder. Run an instance of Matlab or Octave from the same terminal. Get started by running the examples in that folder.

References:


Notes:

  • 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.

hpipm's People

Contributors

giaf avatar zanellia avatar roversch avatar bnovoselnik avatar freyjo avatar tmmsartor avatar markusgft avatar imciner2 avatar jiangyntech avatar

Stargazers

dewalish avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.