APM.RTOL - APMonitor Option

 Type: Floating Point, Input
 Default Value: 1.0e-6
 Description: Equation solution tolerance

RTOL is the error tolerance for reporting a successful solution where the residuals (r) of the equations (f(x)=r) are converged to nearly zero. A lower value of RTOL, such as 1e-8, will give a more precise answer but at the expense of more iterations. The default of 1e-6 is generally sufficient for most problems. However, there are times when the equation solution should be reported more precisely. Making RTOL too small may cause a bad solution to be reported because it surpasses the computer precision. RTOL and OTOL (tolerance for the objective function) should generally be adjusted together.

Python Gekko Example

m.options.RTOL=1e-6
m.options.OTOL=1e-6

See also OTOL, SOLVER

💬