Export a Python script to FMU

257 Views Asked by At

I need to simulate a Python model in Dymola. After research, I am considering the possibility of converting the Python model into a FMU and then loading that in Dymola. Is this possible? How can I convert a Python script into a FMU?

I tried with the FMPy package and I could not export to FM

1

There are 1 best solutions below

0
Christian Bertsch On

There are several tools available:

(A way without using FMI would be Modelica ExternalLibrary (https://github.com/CATIA-Systems/Modelica-ExternalLibrary), a Modelica library that demonstrates how to call external C/C++ and Python-code from Modelica.)