limit computation time of a simulink simulation
Ältere Kommentare anzeigen
Hi,
is it possible, to set a time limit for a simulink simulation? When the time limit is reached, the simulation should be aborted.
Edit: I need a time limit for the computation time.
Thanks, Arco
Akzeptierte Antwort
Weitere Antworten (2)
Mischa Kim
am 2 Feb. 2014
0 Stimmen
Sure, in the model window the simulation time can be entered (in sec). In the figure below it is set to 10 sec.

3 Kommentare
Mischa Kim
am 2 Feb. 2014
To begin with you could try to change error tolerances and/or set a lower limit on the minimum step size (> Simulation > Model Configuration Parameters).
Subbarao Varigonda
am 3 Jul. 2022
Would like to know the direct answer to the question asked here. Can a Simulink model be run with a wall clock or CPU time constraint? As stated by the original poster of this question, there are times when parameter values used may be bad and simulation may get stuck. We are not interested here in making the simulation work for such cases as it is not practical to do when running a large number of cases in a design of experiments setting. We simply need Simulink simulation to self-terminate (possibly with return status indicating this) if it is not completed successfully in allocated time. If this feature is not supported by Simulink and Matlab scripting language to run Simulink models, please consider adding this. Thank you!
Andreas Goser
am 2 Feb. 2014
0 Stimmen
You may want to abort a simulation based on your results being in a range that make you sure those parameter are not good. Check out this library
1 Kommentar
Arco
am 5 Feb. 2014
Kategorien
Mehr zu Programmatic Model Editing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!