How to programmatically stop simulation when output converges
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Yunyu Hu
le 22 Fév 2020
Réponse apportée : Vimal Rathod
le 27 Fév 2020
I am running a model to do somthing like Monta Carlo simulation.
The output will get to a stable value after enough time, sometimes it takes longer, sometimes it takes less time.
To save the simulation time (there are several thousands of simulations to do), how can I programmatically set dynamic simulation time or stop simulation when output gets stable?
If there is even a solution for parallel computing, that would be even better.
Thanks and BR
2 commentaires
Réponse acceptée
Vimal Rathod
le 27 Fév 2020
You could use a Stop Simuation Block to stop the simulation by defining a condition which you want to satisfy before stopping the simulation.
You need to construct some logic which gives a boolean input to the stop simulation block.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Monte-Carlo dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!