Skip to content
DraconiticResearch
Search Sources API
201,818 studies31 sourcesUpdated 52 min ago
PreprintCC BY 4.0arXiv

Scaly: an Optimizing Compiler for Optimal Control

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.

Related

  1. Optimizing bounds for energy-constrained optimal cooling problems in two dimensions
    Pedro Blöss Braga, Giovanni Fantuzzi
    arXivPreprintCC BY 4.0Full textAnalysis & PDEsOptimisation & controlarXiv
  2. Turnpike in optimal control and beyond: a survey
    Emmanuel Trélat, Enrique Zuazua
    HALPreprintPublisher termsFull textOptimisation & controlHAL
  3. Optimal Control of State Constrained Systems via Measure Relaxations and Polynomial Optimization
    Saroj Prasad Chhatoi, Aneel Tanwani, Didier Henrion
    HALPreprintPublisher termsFull textOptimisation & controlHAL
  4. Optimal Control of Vaccine Therapy in a Tumor-Immune-Vaccine Model for Pituitary Neuroendocrine Tumors
    Enagnon David Lassounon, Mahouton Lazare Hounvènou
    HALPreprintLicence Ouverte 2.0Full textGeneral biologyGeneral mathematicsHAL
  5. A COVID-19 transmission model with optimal control integrating BERT with LHS and least-squares fitting for real-world consistency
    Yinghui Chen, Chairat Modnak
    Scientific ReportsPeer-reviewedCC BY-NC-ND 4.0Full textGeneral mathematicsCrossref
BibTeX
@misc{oancea2026scaly,
  title = {{Scaly: an Optimizing Compiler for Optimal Control}},
  author = {Tudor A. Oancea and Colin N. Jones},
  howpublished = {arXiv},
  year = {2026},
  month = oct,
  doi = {10.48550/arxiv.2610.41762},
  eprint = {2610.41762},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.41762},
  note = {CC BY 4.0},
}
RIS
TY  - UNPB
TI  - Scaly: an Optimizing Compiler for Optimal Control
AU  - Tudor A. Oancea
AU  - Colin N. Jones
PY  - 2026
DA  - 2026/10/30
PB  - arXiv
DO  - 10.48550/arxiv.2610.41762
UR  - https://arxiv.org/abs/2610.41762
AB  - 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.
ER  -