Tool Demonstration Abstract: OpenModelica and CasADi for Model-Based Dynamic Optimization

This paper demonstrates model-based dynamic optimization through the coupling of two open source tools: OpenModelica, which is a Modelica-based modeling and simulation platform, and CasADi, a framework for numerical optimization. The coupling uses a standardized XML format for exchange of differentialalgebraic equations (DAE) models. OpenModelica supports export of models written in Modelica and the Optimica language extension using this XML format, while CasADi supports import of models represented in this format. This allows users to define optimal control problems (OCP) using Modelica and Optimica specifications, and solve the underlying model formulation using a range of optimization methods, including direct collocation and direct multiple shooting. The proposed solution has been tested on several industrially relevant optimal control problems, including a diesel-electric power train, a free-floating robot, and a stirred-tank.