Cap Maximum ODE solve time
3 ビュー (過去 30 日間)
古いコメントを表示
I am solving a set of ODEs with several different initial conditions some of which will be badly conditioned and get bogged down. I want to cap the run time of an individual solve to say 100 seconds. If it reaches 100 seconds, I want to exit and just mark the solve as fail. I haven't been able to find a way to do this on the forum. Does anyone have any suggestions?
1 件のコメント
Sam Chak
2025 年 7 月 11 日
What is the order of your dynamic system? You can determine this by identifying the number of state variables. If, from the map of the state space in the operating range, you can identify which regions are badly conditioned, would you avoid selecting the initial values from those regions?
回答 (2 件)
John D'Errico
2025 年 7 月 12 日
Simpler is to just set the maximum number of evals or iterations. This way you don't need to do anything special, just set a flag that already exists. It will do effectively the same thing as what you asked for.
1 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!