Extremely slow compilation time in referenced model (Simulink)

조회 수: 15 (최근 30일)
maiaL
maiaL 2020년 7월 29일
댓글: Eric Racicot 2023년 6월 20일
I have a Simulink model (model1) which has a model reference to model2.
Model2 compilation time (checked with sldiagnostics) is pretty fast, takes 10s or so. However, when I compile model1, the compilation times takes more than 3 minutes, and according to sldiagnostics, the only step that's taking too long is exactly this:
Cstat28: 190.56 seconds -- Check And Compile Model Reference Normal Modes
which is the compilation of the referenced model (model2).
How's this possible? What could I do to alleviate this, as a 3-minute compilation time is a huge hindrance for my test environment.
  댓글 수: 6
Mark Hiteshew
Mark Hiteshew 2021년 11월 5일
I have this same issue. I have a lot of model references and it takes a while to 'update' them before starting to run the model, even if I haven't changed anything in the model references. It's rather annoying
D D
D D 2023년 6월 19일
I also have same problem. I have a lot of model references and it takes a while to compule them when starting to run the model, even if I haven't changed anything in the model references. Please share if any solution is identified..

댓글을 달려면 로그인하십시오.

답변 (1개)

Jesús Zambrano
Jesús Zambrano 2020년 9월 8일
Try running the top-level model in Accelerator or Rapid Accelerator mode.
Here are a few tips when using the Accelerator and Rapid Accelerator mode:
  • Avoid blocks that do not support code generation. They run in interpreted mode and can slowdown your model.
  • Try switching the Compiler Optimization Level from faster build to faster run.
  • For maximum speed, start your simulation using the sim command when using these modes.
  댓글 수: 5
D D
D D 2023년 6월 19일
I also have same problem. I have a lot of model references and it takes a while to compule them when starting to run the model, even if I haven't changed anything in the model references. Please share if any solution is identified..
Eric Racicot
Eric Racicot 2023년 6월 20일
I run optimizer for a patch antenna... showing Building Model for about 15 minutes and nothing change... I look computer task manager and mathlab using less than 2% of processor. Why is so long?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Component-Based Modeling에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by