Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

How to accelerate the FastRestart workflow ?

1 view (last 30 days)
David Pasdeloup
David Pasdeloup on 29 Jun 2018
Closed: MATLAB Answer Bot on 20 Aug 2021
I have to run multiple simulations iteratively. Between simulations steps I change input parameters through a constant block. I followed the FastRestart workflow, but it is quite slow when running multiple iterations.
I noticed:
- Case 1) Running programaticlly from the workspace: For 20 iterations of 10s (total simulation time = 200s) with a constant input, it takes around 10s to complete. (it is displayed in the bottom of the screen "Ready (Fast Restart)" most of the time.
- Case 2) While running the model directly in simulink (setting explicitely the input in the constant block, and not from the WS) for 200s, the simulation is executed almost instantly.
Since in the two cases the input is the same and is constant (to make things comparable for the testing situation), I am expecting the same running time in both cases (it is what I understood from the FastRestart workflow page). Or when running programatically from the workspace (sim command), it it much longer...
One of my guess is that it is saving the SimState that takes time. I would like to find a solution to make it faster since I have to run thousands of iterations.
Note: I am using the accelerator mode and I have also a To Workspace block for the outputs of the model (type timeseries).

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!