Filter löschen
Filter löschen

Several doubts regarding Matlab/Simulink FMUs

3 Ansichten (letzte 30 Tage)
Jon am 26 Jan. 2024
Beantwortet: surya venu am 14 Mai 2024
Hello everyone,
  1. When a .FMU is model is formed after exporting it in matlab/simulink, within among all the files/folders created, one of them is the "binaries" folder which, if I am not mistaken, determines on which operating system this FMU model can be run. Is there any way to export the FMU model to be run on another operating system, or whenever an FMU model is exported, the binaries are from the operating system on which it is exported?
  2. I can see on my computer the .FMU files that I have exported with matlab/simulink. However, if I want to attach these files to an email, either it does not let me send the email or they do not appear as attachments (images below). Is there any explanation for this? Here hoe it looks my folder in my PC And here the exact same folder when trying to add files in a mail
  3. As far as I know, in order to work with FMU files in python, I need the following libraries among others: pyFMI, pythonfmu. However, are there any other libraries that you would need that you are not considering? Also, is it necessary to have Matlab/simulink installed on the same computer where I am going to work the FMU files with python?
Thank you a lot in advance

Antworten (1)

surya venu
surya venu am 14 Mai 2024
Here are the answer for your questions:
1) When exporting an FMU model in MATLAB/Simulink, one of the folders created is the "bin" folder, which contains the FMU-specific libraries. These libraries are essential for the FMU to run on the target operating system. The binaries in this folder are indeed specific to the operating system on which the FMU model is exported. This means that if you export an FMU on a Windows system, the binaries in the "bin" folder are specifically compiled for Windows. Similarly, exporting an FMU on a Linux or macOS system would generate binaries compatible with those respective operating systems.
2) You can try creating a ".zip" and send it via email.
3) Working with FMU (Functional Mock-up Unit) files in Python indeed often involves libraries like pyFMI and pythonfmu. These libraries facilitate the loading, manipulation, and simulation of FMUs in a Python environment. Here's a brief overview of both and additional libraries or tools you might consider:
  1. FMPy: Another library for working with FMUs in Python is FMPy. It supports loading and simulating FMUs both for model exchange and co-simulation. FMPy can also be used to plot results, and it provides a GUI for inspecting FMUs.
  2. Assimulo: This is a Python library for solving ordinary differential equations (ODEs) and differential algebraic equations (DAEs). While not specifically designed for FMUs, Assimulo can be used in conjunction with pyFMI to solve the equations that are part of the FMU models.
Having MATLAB/Simulink installed on the same computer is not necessary for working with FMU files in Python.
Hope it helps.


Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by