Scaly: an Optimizing Compiler for Optimal Control
Tudor A. Oancea, Colin N. Jones
Key points
From the paper's conclusion- We present Scaly, an open-source optimizing compiler for optimal control, written in Python, that generates fast C code.
Abstract
We present Scaly, an open-source optimizing compiler for optimal control, written in Python, that generates fast C code. Scaly provides a modeling language embedded in Python for the parametric optimization problems that arise in model predictive control and moving horizon estimation, and computes the sparse derivatives that standard optimization solvers need. Scaly accepts general nonlinear programs but applies optimizations specific to optimal control, which preserve the repeated structure of a problem, such as the stages of a horizon, through differentiation down to the generated loops. The generated C depends only on the C math library and never allocates memory dynamically. On three benchmark problems, Scaly evaluates the Hessian of the Lagrangian up to 26 times faster than CasADi, with smaller binaries and build times that stay nearly constant with the horizon. With the same solver, Scaly shortens the solver time per control step on every benchmark, by a factor of up to 9.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- FOMTools: Development and AI-Assisted Code Generation for First-Order MethodsarXiv · 2026
- $\mu$MPC: Microsecond-Scale Nonlinear and World Model Control from Edge to GPU via Koopman-Linearized PrecompilationarXiv · 2026
- Learning Linear Time-Varying Koopman Models for Constrained Nonlinear Optimal ControlarXiv · 2026
- FAME-QP: A GPU-Accelerated Quadratic-Programming Solver for Real-Time Model Predictive ControlarXiv · 2026
- Automated Design and Evaluation Pipeline for Optimal Control Transcriptions in Model Predictive ControlarXiv · 2026
- Error-Budget-Driven Adaptive Mixed-Precision Primal–Dual Optimization for Large-Scale Sparse Linear ProgrammingMathematics · 2026