using MaximumWallClock in a loop

3 vues (au cours des 30 derniers jours)
emjey
emjey le 25 Fév 2020
Commenté : emjey le 2 Mar 2020
I run many simulations in a loop (global sensitivity analysis) and would like to terminate stuck simulations by setting 'MaximumWallClock' (there parameter sets which make a model stiff and difficult to solve).
Is there a build in way to flag simulations terminated in such way?
The reason for this is that I need to discard those results because it would falsify the analysis outcome.

Réponse acceptée

Sietse Braakman
Sietse Braakman le 25 Fév 2020
There is no built-in flag but you could exclude any simulation for which the final time step does not equal your stop-time. Let me know if that answers your question.
  2 commentaires
emjey
emjey le 25 Fév 2020
Ah, excellent solution. I will try that, thanks!
emjey
emjey le 26 Fév 2020
There is an issue with this. My model, which I cannot share, takes about 30 sec to simulate. Setting MaximumWallClock =10sec and EndTime=15 sec does not result in termination of the simulation. Any ideas what do I miss?

Connectez-vous pour commenter.

Plus de réponses (1)

Sietse Braakman
Sietse Braakman le 26 Fév 2020
I am not sure I understand what you mean by "EndTime". There are two things we need to separate here: the wall clock time (the actual time it takes to simulate your model) and the simulation time (the virtual time you would like to simulate your model for, e.g. 14 days with daily dosing). With StopTime, I meant the StopTime in the configuration set that determines the simulation time, (and not the wall clock time). What I think is happening, is that you reduced the StopTime, which reduces the time it takes to simulate your model to less than the MaximumWallClock time.
  1 commentaire
emjey
emjey le 2 Mar 2020
Appologies Sietse, my mistake. I used 'EndTime' in a wrong way. All seems to work now.

Connectez-vous pour commenter.

Communautés

Plus de réponses dans  SimBiology Community

Catégories

En savoir plus sur Scan Parameter Ranges 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!

Translated by