Learning for CasADi: Data-driven Models in Numerical Optimization

Tim Salzmann, Jon Arrizabalaga, Joel Andersson, Marco Pavone, Markus Ryll
12/10/2023
49 citations
eess.SYcs.AIcs.LG

Official code: Tim-Salzmann/l4casadi (596 stars, Python, MIT, PyTorch, last commit 2025-06-05).

Abstract

While real-world problems are often challenging to analyze analytically, deep learning excels in modeling complex processes from data. Existing optimization frameworks like CasADi facilitate seamless usage of solvers but face challenges when integrating learned process models into numerical optimizations.

Show full abstract

To address this gap, we present the Learning for CasADi (L4CasADi) framework, enabling the seamless integration of PyTorch-learned models with CasADi for efficient and potentially hardware-accelerated numerical optimization. The applicability of L4CasADi is demonstrated with two tutorial examples: First, we optimize a fish's trajectory in a turbulent river for energy efficiency where the turbulent flow is represented by a PyTorch model. Second, we demonstrate how an implicit Neural Radiance Field environment representation can be easily leveraged for optimal control with L4CasADi. L4CasADi, along with examples and documentation, is available under MIT license at https://github.com/Tim-Salzmann/l4casadi

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Use PyTorch Models with CasADi for data-driven optimization or learning-based optimal control. Supports Acados.

59650Python, C++Jun 19, 20231 years agoMIT
acadoscasadicplusplusdeep-learninglearning-control+7 more

Similar Papers

Cite this paper

@article{salzmann2023learning,
  title  = {Learning for CasADi: Data-driven Models in Numerical Optimization},
  author = {Tim Salzmann and Jon Arrizabalaga and Joel Andersson and Marco Pavone and Markus Ryll},
  year   = {2023},
  eprint = {2312.05873},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.05873v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.05873.svg)](https://codeofpaper.com/paper/2312.05873)

Discussion