2025-09-10 –, 202
Tasks involving Modelica models often do not simply investigate the dynamic behavior of a system, but rather want to characterize also possible optimal control strategies according to suitable criteria. Unfortunately, since Modelica does not support out-of-the-box optimization features, users are often forced to use other tools to code again the system model for optimization studies. For this reason, the authors present Modelica2Pyomo, an open-source tool to translate Modelica models into Pyomo optimization programs, leveraging on their flat Base Modelica representation. This work illustrates the main features of Modelica2Pyomo, including automatic variables and constraints normalization, expressions manipulation and initialization via Modelica simulation results. To demonstrate the capabilities of this framework, two examples are showcased, including an industrial relevant open-loop optimal control problem of a solid-oxide fuel cell.
Francesco Casella is associate professor at Politecnico di Milano. His main research interests are modelling and control of innovative thermal power generation systems, Modelica modelling of engineering systems in general, and advanced numerical and symbolic methods for Modelica model simulation. He is the Director of the Open Source Modelica Consortium, member of the Board of the Modelica Association, and an active member of the Modelica community since 2003.