Speed up compilation time Matlab simulink/simscape

4 次查看(过去 30 天)
Hello everybody,
i am modeling an electrical machine using simulink/simscape. More precisely, I am observing the thermal behavior. Thus, using the thermal domain of Simscape.
However, the compilation time is very long compared to the simulation time and takes about 99% of the whole simulation time.
Is there any option to speed up the compilation time? For example a pre-compilation of the block that no compilation is needed if parameters are changed.
I think using Rapid Accelerator mode just speeds up the simulation itself. At least it has no influence for my model.
Best regards
Felix

回答(1 个)

Aabha
Aabha 2025-2-7
编辑:Aabha 2025-2-7
I understand that you are trying to reduce the compilation time for your Simscape model. To achieve this, Simscape has run-time parameters, which are MATLAB variables or Simulink.Parameter objects that are run-time configurable. These parameters allow to skip recompiling the model when parameter values are changed. Simscape supports run-time configurability for most parameters that need a numerical value input. To determine whether a parameter is run-time configurable, you can review the settings for the parameter in the block property inspector. If a parameter is run-time configurable, you will see the property inspector set to the default setting, “Compile-time”. This can be changed to “Run-time” if necessary.
Please refer to the following documentation to understand more about run-time parameters.
There are a few other ways in which you can speed up the compilation of a Simscape model in general. You can use optimization techniques such as scalable compilation, incremental compilation, and memory or disk caching for model compilation.
Please refer to the following documentation to understand more about techniques for improving compilation performance.

类别

Help CenterFile Exchange 中查找有关 Run-Time Parameters 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by