Slow saved Simulink model startup involving an FMU
7 views (last 30 days)
Show older comments
We have an FMU block in a Simulink model connected to a few scalar inputs and outputs. The FMU is fairly sized at 5MB. When we double click and open the Simulink model, it takes a long time to load. The progress bar keeps scrolling.
As a fix, we found that hitting Ctrl + C in the Command Window stops the "Program" execution. But double clicking again right after opens the SImulink model instantaneously. Screenrecoding demoing this behavior here: https://www.loom.com/share/d0665b7cca5e4f009319a30189b99dbc?sid=d59a3b40-348c-48f6-804d-6d20433ea68f
We observed this on several machines, with different versions of Matlab (2023b, 2024a) and across several folders and files. Is there a way to avoid slow startup time? This did not happen in a Simulink model with just native Matlab Simulink components. One of our partners reported that this did not happen with another FMU that they had. So, if this issue is specific to our FMU, how can we get to the root cause? Any ideas for resolution are appreciated.
0 Comments
Answers (1)
Shantanu Dixit
on 26 Nov 2024
Hi Chintan,
I've encountered a similar issue when working with Simulink models that include FMU blocks with a large number of parameters. One effective workaround that helped me is placing the FMU in a model reference. This approach leads to reduced opening time because it encapsulates the FMU in a separate model. It reduces the number of blocks in the top-level system and allows for incremental diagram updates, which subsequently reduces the startup time.
For further reading, you can refer to the following useful resources:
0 Comments
See Also
Categories
Find more on Discontinuities in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!