1. [Publications](/publications)
2. Learning for CasADi: Data-driven Models in Numerical Optimization
 
 # Learning for CasADi: Data-driven Models in Numerical Optimization

  ![Publication image](/sites/default/files/styles/wide/public/default_images/default.jpeg?itok=qUFsuJCP "Publication image")

 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. 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 [this https URL](https://github.com/Tim-Salzmann/l4casadi)



 ## Authors



Tim Salzmann (Technical University of Munich)

Jon Arrizabalaga (Technical University of Munich)

Joel Andersson (Freelance software developer and consultant)

[Marco Pavone](/person/marco-pavone)

Markus Ryll (Technical University of Munich)

 

 

 ## Publication Date



Sunday, December 10, 2023

 

 ## Published in



[Arxiv](https://arxiv.org/abs/2312.05873)

 

 ## Research Area



[Autonomous Vehicles](/research-area/autonomous-vehicles)