General advice on choice of tolerances. For many users, the appropriate choices for tolerance
values in reltol and abstol are a concern. The following pieces of advice are relevant.
-
The scalar relative tolerance reltol is to be set to control relative errors. So reltol = 10−4
means that errors are controlled to .01%. We do not recommend using reltol larger than 10−3
On the other hand, reltol should not be so small that it is comparable to the unit roundoff of the
machine arithmetic (generally around 1.0E-15) -
The absolute tolerances abstol (whether scalar or vector) need to be set to control absolute errors when any components of the solution vector y may be so small that pure relative error control is meaningless. For example, if y[i] starts at some nonzero value, but in time decays to zero, then pure relative error control on y[i] makes no sense (and is overly costly) after y[i] is below some noise level. Then abstol (if scalar)

这篇内容提供了关于选择相对误差容忍度(reltol)和绝对误差容忍度(abstol)的一般建议。建议reltol设置为10^-4以控制相对误差,不推荐超过10^-3。对于可能接近零的解组件,需要设置适当的abstol以控制绝对误差,因为纯相对误差控制可能失去意义。abstol的值应根据具体问题中的噪声水平来设定,无法给出一般性的建议,用户或建模者应根据问题特性确定。最后,建议保守地设定这些容忍度值,以防止累积的步进误差过大。
最低0.47元/天 解锁文章
1321

被折叠的 条评论
为什么被折叠?



