TY - JOUR
T1 - Embedded Code Generation With CVXPY
AU - Schaller, Maximilian
AU - Banjac, Goran
AU - Diamond, Steven
AU - Agrawal, Akshay
AU - Stellato, Bartolomeo
AU - Boyd, Stephen
N1 - Publisher Copyright:
© 2017 IEEE.
PY - 2022
Y1 - 2022
N2 - We introduce CVXPYgen, a tool for generating custom C code, suitable for embedded applications, that solves a parameterized 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.
AB - We introduce CVXPYgen, a tool for generating custom C code, suitable for embedded applications, that solves a parameterized 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.
KW - Computational methods
KW - Embedded systems
KW - Optimization
UR - http://www.scopus.com/inward/record.url?scp=85130823196&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85130823196&partnerID=8YFLogxK
U2 - 10.1109/LCSYS.2022.3173209
DO - 10.1109/LCSYS.2022.3173209
M3 - Article
AN - SCOPUS:85130823196
SN - 2475-1456
VL - 6
SP - 2653
EP - 2658
JO - IEEE Control Systems Letters
JF - IEEE Control Systems Letters
ER -