Embedded code generation using the OSQP solver

G. Banjac, B. Stellato, N. Moehle, P. Goulart, A. Bemporad and S. Boyd

in IEEE Conference on Decision and Control, Melbourne, Australia, December 2017.
BibTeX  Preprint  Code 

  author = {G. Banjac and B. Stellato and N. Moehle and P. Goulart and A. Bemporad and S. Boyd},
  title = {Embedded code generation using the OSQP solver},
  booktitle = {IEEE Conference on Decision and Control},
  year = {2017}

We introduce a code generation software package that accepts a parametric description of a quadratic program (QP) as input and generates tailored C code that compiles into a fast and reliable optimization solver for the QP that can run on embedded platforms. The generated code is based on OSQP, a novel open-source operator splitting solver for quadratic programming. Our software supports matrix factorization caching and warm starting, and allows updates of the problem parameters during runtime. The generated C code is library-free and has a very small compiled footprint. Examples arising in real-world applications show that the generated code outperforms state-of-the-art embedded and desktop QP solvers.