论文标题
用cvxpy生成嵌入式代码
Embedded Code Generation with CVXPY
论文作者
论文摘要
我们介绍了CVXPYGEN,这是一种用于生成自定义C代码的工具(适用于嵌入式应用程序),该工具解决了一类参数化的凸优化问题。 CVXPYGEN基于CVXPY,CVXPY是一种由Python绑定的域特异性语言,该语言支持自然语法(遵循数学描述),用于指定凸优化问题。除了定制求解器的C实现外,CVXPYGEN还为原型和桌面(非安装)应用程序创建了Python包装器。我们给出了两个示例,即四轮驱动器的位置控制和对投资组合优化模型的反面测试。 Cvxpygen在可以处理的问题大小,二进制代码大小和求解时间方面优于最先进的代码生成工具。 cvxpygen和生成的求解器是开源的。
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.