If you are doing Monte Carlo simulation or system optimization on your Simulink® model, you’ll need to run multiple simulations while varying model parameters. How do you get each simulation to run as quickly as possible?
In Simulink, there are three desktop simulation modes: Normal, Accelerator, and Rapid Accelerator. For most models, Accelerator is faster than Normal, and Rapid Accelerator is faster still. Rapid Accelerator mode speeds up simulation by generating an executable for your model. The exact speedup varies depending on the model, but Rapid Accelerator can be more than 10 times faster than Normal mode.
Using Rapid Accelerator involves trading off flexibility and performance. Rapid Accelerator does not support the debugger or profiler, and it works only when the entire model is capable of generating C code. But if your goal is efficient batch and Monte Carlo simulations, then Rapid Accelerator is your best option.
This article shows how to set up your batch simulation script to get the maximum performance out of Rapid Accelerator.