How to change ode solver settings for a Simbiology model?

Hi Everyone,
I have a large stiff reaction network in Simbiology, which runs smoothly in R2010a with ode15s solver. I tested the code in R2012b and R2013a where the ode solver fails (all of them). A "very detailed" error message says:
Error using SBCompiler.SimulationObject/simulate Integration Tolerance Not Met.
If I export this model into SBML and back to matlab as an ODE function (calling ode15s() function), it runs without a problem in R2013a (using default ODE 15s settings). I was wondering is there any way to change the relTol, absTol settings for Simbiology simulations (configset obj)? It seems that way the (absolute/relative) tolerance settings for ode15s() and Simbiology's ode15s call are different.
Thanks!

 채택된 답변

Arthur Goldsipe
Arthur Goldsipe 2013년 8월 2일
Hi Zoltan,
Yes, there is a way to change several options related to the ODE solver, including the absolute and relative tolerances. If your SimBiology model is in a variable m1, you can view all the options like this:
get(m1.getconfigset('active').SolverOptions)
You can then set the options like this:
m1.getconfigset('active').SolverOptions.AbsoluteTolerance = 1e-5;
Note that a new ODE solver option was introduced in R2012b, AbsoluteToleranceStepSize, which often (but not always) improves the quality of the solution by adaptively adjusting the absolute tolerance during the simulation. You may also try setting that option to false and see if that improves the quality of the results for your particular model.
Finally, I wanted to point out another feature that you might find useful in this situation. In R2012b, you can get a text view of the ODEs that SimBiology creates for your model using the new getequations method. For example:
equations = m1.getequations
Good luck with your modeling!
-Arthur

댓글 수: 1

Hi Arthur,
Thanks for the detailed reply, it was very helpful! Turning off AbsoluteToleranceStepSize solved my problem. Now, I can run my model under Matlab 2013a as well.
Zoltan

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

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  SimBiology Community

카테고리

도움말 센터File Exchange에서 Scan Parameter Ranges에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by