MATLAB: How to reduce the startup time of the simulink model

simulinkspeedupstartup of simulink model

Hello everyone,
I have a simulink model involving some masked C-sfunctions and some blocks from a user-defined library.
Every time that I have to launch a simulation, the simulink model is incredibly slow to start up. I understood that simulink takes its time at the startup to compile the model, and to resolve the references….. But the elapsed time is huge (3mins). I'm wondering if there is a way to speed up these operation.
Is there a way to compile the simulink model just one time and not at every simulation?
I try to use the accelerate mode as simulation mode, but it is still too much slow
I read this guide
but I don't get it, I found it too much oriented to profiling and memory allocation…
do you have any suggestions? I have Matlab 7.8 R2009a
thanks 4 reading

Best Answer

If this continues I would try model referencing.
You could wrap up as much of the model as possible in a subsystem and leave constants/tunable parameters on the top level and create the reference for the subsystem. Once that is done you set the reference to accelerator mode, see how well this works.
If it is still taking a long time to initialize try setting the rebuild option to none in the configuration parameters for model references.
Related Question