Optimization with FMI and CasADi: Analysis in IndustrialApplications
2025-09-10 , 203

Motivated by real use cases from Bosch for optimization-based functions and controllers in the context of energy optimal operation of vehicles and buildings, we investigate the usage of FMI for optimization purposes via the open-source tool CasADi. We implemented a framework in Python to automatically compare optimization results and computation times of optimal control problems in CasADi. We are able to compare the results generated by different implementations: a) including the system dynamics as FMUs and b) a native implementation where the system dynamics is realized by Python code for CasADi. We present results from two use cases: the trajectory following of a single track vehicle model and the optimal control of a building’s chiller system. Detailed analysis of the split of the execution time of one optimization run gives valuable insight which kind of FMI function calls or derivatives are competitive and which one have bottlenecks compared to the native solution in CasADi without FMUs.


Paper PDF: 16thmodelicafmiconference/question_uploads/paper_117_on0BlGf.pdf
See also: Slides (928.2 KB)

Christian Bertsch is a senior project manager at Bosch Research.
He studied mathematics and physics at the University of Heidelberg, Germany, focusing on numerics. Bertsch began his career at Bosch in 2001 as a simulation engineer. Since 2004, he has led projects for Bosch Research in the fields of system simulation, advanced model-based functions and algorithms for embedded software, cloud applications, and dynamical digital twins.
Within the Bosch Group, he coordinates the usage of FMI and represents Bosch in the FMI Project, serving as its leader since 2022.

This speaker also appears in:

Working at German Aerorspace Center DLR in Oberpfaffenhofen, Institute of Vehicle Concepts.
Andreas is a Mathematician with background on numerical integration algorithms, nonlinear optimization, Modelica, FMI and eFMI.