How can I reduce the compiling time taken in a matlab simulink model?

Hello everyone,
I have a problem with my Simulink model. When I try to run the simulation, the compiling process takes a very long time (about 10 minutes!), then the simulation runs normally. This problem started when I introduced a "Distributed Parameter Line" block in my model.
Is there a way to fix this problem? I have a model version 1.76 R2016b.
Thanks for the attention. Federico

Answers (1)

  • Try Using Accelerator mode in Simulink. Also try to run model from MATLAB Script. like, sim('MyModel') % it will run your simulink model from script.
  • I would perform a quick sanity check before I feed data into the model, Because sometime solver doesn't like zeros and negative number's.

3 Comments

Thank you for your answer.
I tried to apply your suggestions, but the problem persists. Running model from MATLAB script doesn't make difference, while Accelerator mode just makes simulation faster, but compiling time is still very long. The compiling process stucks at "Evaluating block parameters: Started".
I have the same problem at the moment. What did you do to solve it?
I have same problem about this, when I introduced "Distributed Parameter Line", it always took me more than 1 hour to compile

Sign in to comment.

Categories

Find more on Simulink in Help Center and File Exchange

Asked:

on 25 Jan 2017

Commented:

on 8 Jul 2021

Community Treasure Hunt

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

Start Hunting!