Embedded Code Generation Using the OSQP Solver

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

in IEEE Conference on Decision and Control, Melbourne, Australia, pp. 1906-1911, December 2017.
BibTeX  Code 

@inproceedings{GBan:2017,
  author = {G. Banjac and B. Stellato and N. Moehle and P. J. Goulart and A. Bemporad and S. Boyd},
  title = {Embedded Code Generation Using the OSQP Solver},
  booktitle = {IEEE Conference on Decision and Control},
  year = {2017},
  pages = {1906-1911}
}

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.