How to change ode solver settings for a Simbiology model?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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!
0 Kommentare
Akzeptierte Antwort
Arthur Goldsipe
am 2 Aug. 2013
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
Weitere Antworten (0)
Communitys
Weitere Antworten in SimBiology Community
Siehe auch
Kategorien
Mehr zu Scan Parameter Ranges finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!