Integration tolerance not met in SimBiology?

9 views (last 30 days)
Ciaran
Ciaran on 23 Mar 2015
Edited: Arthur Goldsipe on 22 Jan 2024
I am in the process of trying to use SimBiology to fit some data to my model. I have imported a SBML file that was constructed using Copasi. The current kinetic parameters are nonsense at the moment but the model should simulate regardless (at least it does in copasi). The error I receive when I try to simulate is: 'Integration tolerance not met'. I then made this figure very large which did nothing to solve my problem. Could anybody suggest how to fix this problem?
  1 Comment
Ingrid
Ingrid on 23 Mar 2015
Without having seen your .sbproj file, my guess is that your model is stiff and that using an ode solver suitable for stiff systems will help (see the documentation for further information). If changing the ode solver doesn't help, then one needs the .sbproj file in order to find out what is going on in your case.

Sign in to comment.

Answers (1)

Arthur Goldsipe
Arthur Goldsipe on 24 Mar 2015
Edited: Arthur Goldsipe on 22 Jan 2024
[Updated on January 22, 2024: The Model Debugger for SimBiology is a great tool for deubgging all sorts of simulation failures. Download the debugger here.]
To follow up on Ingrid's comment, make sure you have selected either ode15s or sundials as your solver. Those are the two solvers supported by SimBiology that are appropriate for stiff ODEs.
You also mentioned that you "made this figure very large". Do you mean you made a tolerance very large? SimBiology actually has several configuration options related to tolerances. You may need to adjust several of them in order to simulate your system, and you may actually need to make some tolerances smaller to solve the problem. (Sometimes, if tolerances are too large, the simulation can proceed to unrealistic values that make the ODEs unstable.) I suggest you read the SolverOptions documentation.
The system is likely becoming unstable in some way during the simulation. When this happens, the solver often starts to take many very small time steps before returning the error message. In such cases, I find it helpful to start adjusting MaximumNumberOfLogs. I usually start with a value of 1000 and see if that allows the simulation to complete without error. If it simulates, I keep reducing the value until I find a value that allows the simulation to complete. When I subsequently look at the simulation results, I usually find some species in the model have increased to such large values that the integration can't proceed. After that, the specific fix depends on the problem. Sometimes I adjust the parameters or change the model in some other way.
And one last thought. Perhaps you need to rethink what the real problem is here. Do you really care about obtaining simulation results when using nonsense parameters? I'm guessing what you really care about is that the model simulates with reasonable parameters, and that you are able to estimate these such parameters. If that's the case, I personally wouldn't bother trying to get this particular simulation to complete. Instead, I would focus on estimating reasonable parameters. If you estimate parameters using a Fit Task in the the SimBiology Desktop or the sbiofit function from the command line, all you need to do is find a reasonable set of initial parameter values that allow the simulation to complete. SimBiology can handle simulation errors like this that occur during fitting: It will assume that parameter values that result in simulation errors fit the data poorly and continue trying to find good parameter values.
  1 Comment
emjey
emjey on 3 Mar 2020
hi Artur, following up on your answer I wanted to ask what is the reason that a solver, I used ode15s, starts to throw this error with tighter tolerances.
E.g. with
Abs. tol.: 1e-12, Rel. tol.: 1e-10,
my model runs fine, but already with
Abs. tol.: 1e-16, Rel. tol.: 1e-12,
I get the message error Integration Tolerance Not Met. Here it looks the model gets unstable with smaller tolerances. How should one interpret it?

Sign in to comment.

Communities

More Answers in the  SimBiology Community

Tags

Products

Community Treasure Hunt

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

Start Hunting!