| Contents | Index |
The AbsoluteTolerance property specifies the largest allowable absolute error at any step in simulation. It is a property of SolverOptions object. SolverOptions is a property of the configset object. AbsoluteTolerance is available for the ode solvers (ode15s, ode23t, ode45, and sundials).
At each simulation step, the solver estimates the local error ei in the ith state vector y. Simulation converges at that time step if ei satisfies the following equation:
|ei|≤max(RelativeTolerance*|yi|,AbsoluteTolerance)
Thus at higher state values, convergence is determined by RelativeTolerance. As the state values approach zero, convergence is controlled by AbsoluteTolerance. The choice of values for RelativeTolerance and AbsoluteTolerance will vary depending on the problem. The default values should work for first trials of the simulation; however if you want to optimize the solution, consider that there is a trade-off between speed and accuracy. If the simulation takes too long, you can increase the values of RelativeTolerance and AbsoluteTolerance at the cost of some accuracy. If the results appear to be inaccurate, you can decrease the tolerance values but this will slow down the solver. If the magnitude of the state values is high, you can try to decrease the relative tolerance to get more accurate results.
This may be important for reactions where species values tend to zero. Even if you are not interested in the value of a state y(i) when it is small, you may have to specify AbsoluteTolerance small enough to get some correct digits in y(i) so that you can accurately compute more interesting state values.
| Applies to | Object: SolverOptions |
| Data type | double |
| Data values | >0. Default is 1e-6. For generated pharmacokinetic models, default is 1e-15. |
| Access | Read/write |
This example shows how to change AbsoluteTolerance.
Retrieve the configset object from the modelObj.
modelObj = sbiomodel('cell');
configsetObj = getconfigset(modelObj)Change the AbsoluteTolerance to 1e-8.
set(configsetObj.SolverOptions, 'AbsoluteTolerance', 1.0e-8); get(configsetObj.SolverOptions, 'AbsoluteTolerance') ans = 1.0000e-008

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |