pith. sign in

arxiv: 2203.11419 · v2 · pith:NUPH3U3Vnew · submitted 2022-03-22 · 🧮 math.OC

Embedded Code Generation with CVXPY

classification 🧮 math.OC
keywords cvxpygencodeoptimizationapplicationsconvexcustomcvxpyembedded
0
0 comments X
read the original abstract

We introduce CVXPYgen, a tool for generating custom C code, suitable for embedded applications, that solves a parametrized class of convex optimization problems. CVXPYgen is based on CVXPY, a Python-embedded domain-specific language that supports a natural syntax (that follows the mathematical description) for specifying convex optimization problems. Along with the C implementation of a custom solver, CVXPYgen creates a Python wrapper for prototyping and desktop (non-embedded) applications. We give two examples, position control of a quadcopter and back-testing a portfolio optimization model. CVXPYgen outperforms a state-of-the-art code generation tool in terms of problem size it can handle, binary code size, and solve times. CVXPYgen and the generated solvers are open-source.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.