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 BaseModelica 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.

Modelica2Pyomo: a tool to translate Modelica models into Pyomo optimization models

De Pascali, Matteo Luigi;Biegler, Lorenz T.;Martelli, Emanuele;Casella, Francesco
2025-01-01

Abstract

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 BaseModelica 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.
2025
Proceedings 16th International Modelica & FMI Conference
Modelica, Model Conversion, Base Modelica, Pyomo, Dynamic Optimization
File in questo prodotto:
File Dimensione Formato  
2025-DePascaliEtAl-Modelica.pdf

accesso aperto

: Publisher’s version
Dimensione 405.01 kB
Formato Adobe PDF
405.01 kB Adobe PDF Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11311/1301960
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
  • OpenAlex 1
social impact