
Speed up compilation time Matlab simulink/simscape
조회 수: 15 (최근 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
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Run-Time Parameters에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!