Integration Tolerance Not Met in SimBiology after sbioaccelerate
1 次查看(过去 30 天)
显示 更早的评论
I'm receiving this error when trying to simulate my model after using s sbioaccelerate using some dose objects, but not others:
Error using SBCompiler.SimulationObject/simulate Integration Tolerance Not Met.
Error in sbiosimulate (line 140) [t, x] = simobj.simulate(mobj, cs, variants, doses);
I can simulate the model fine before using simbioaccelerate. I am receiving these warnings as well, and I know which equations they are coming from. Although, The equations shouldnt be producing complex numbers.
The right-hand side of the system of SimBiology ODEs results in complex numbers. The imaginary part of the result will be ignored. The repeated assignment rules of the SimBiology model result in complex numbers. The imaginary part of the result will be ignored.
I'm not sure what sbioaccelerate could be doing that is causing this; any help on how to troubleshoot this would be appreciated.
0 个评论
采纳的回答
Arthur Goldsipe
2017-8-4
In addition to Joe's excellent suggestion, here are my thoughts:
The complex numbers are the source of the problem. The accelerated version of the model likely results in NaNs in cases where the unaccelerated model results in complex numbers. These NaNs then lead to the integration errors.
Are you using sqrt or some sort or raising a number to a fractional exponent? If so, then you could get a complex number if the argument is ever negative. This can happen when a concentration is close to zero, but solver tolerances allow it to go slightly negative. One solution there is to replace x^n with max(0,x)^n.
If you are still unable to find the cause of the complex numbers, please feel free to share additional details or contact Technical Support. I may not see updates you post here, so also feel free to contact me via my user page if you don't get a response to a comment here.
Good luck!
-Arthur
0 个评论
更多回答(1 个)
Joe Myint
2017-8-4
Hi Kaitlyn,
You mentioned you ran sbioaccelerate with dose objects. Just a reminder that you need to use the exact same input arguments when you call sbiosimulate afterwards. For details, take a look at this page.
https://www.mathworks.com/help/simbio/ug/accelerating-model-simulations-and-analyses.html
But from the looks of it, it seems you might have to troubleshoot your model as you are seeing some tolerance issues. Have a look at this troubleshooting page for some tips.
https://www.mathworks.com/help/simbio/ug/troubleshooting-simulation-errors.html
Joe
0 个评论
社区
更多回答在 SimBiology Community
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scan Parameter Ranges 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!