using MaximumWallClock in a loop

조회 수: 2 (최근 30일)
emjey
emjey 2020년 2월 25일
댓글: emjey 2020년 3월 2일
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.

채택된 답변

Sietse Braakman
Sietse Braakman 2020년 2월 25일
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
emjey
emjey 2020년 2월 25일
Ah, excellent solution. I will try that, thanks!
emjey
emjey 2020년 2월 26일
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?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sietse Braakman
Sietse Braakman 2020년 2월 26일
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
emjey
emjey 2020년 3월 2일
Appologies Sietse, my mistake. I used 'EndTime' in a wrong way. All seems to work now.

댓글을 달려면 로그인하십시오.

커뮤니티

더 많은 답변 보기:  SimBiology Community

카테고리

Help CenterFile Exchange에서 Perform Sensitivity Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by