RE: "ERROR IN LSODA: CODE -1"

From: Elassaiss - Schaap, J. <jeroen.elassaiss-schaap>
Date: Fri, 23 Sep 2011 09:05:47 +0200

Nick,

The help entry makes sense to me. When one assumes that both tolerances are=
converted as
tolerance = 10^(-TOL)
they are appropriately scaled.

And with regard to the html fragment you referred to, it seems to me like a=
pragmatic advice rather than stating that those numbers should be kept equ=
al. It also makes sense that if you want more accurate positive numbers you=
also may want the zero defined more accurately.

Best regards,
Jeroen

-----Original Message-----
From: owner-nmusers
Behalf Of Nick Holford
Sent: Thursday, September 22, 2011 23:02
To: nmusers
Subject: Re: [NMusers] "ERROR IN LSODA: CODE -1"

Hi,

I think it may be useful to understand that numerical differential
equation solvers require an absolute tolerance as well as a relative
tolerance. See
http://www.gnu.org/software/octave/doc/interpreter/Differential_002dAlgebra=
ic-Equations.html
for an explanation and example of how these tolerances are typically used.

The need for an absolute tolerance is when the correct solution of the
DE is zero. In this case a relative tolerance cannot guide the numerical
DE solver to achieve a sufficiently precise solution.

An absolute tolerance is analogous to an additive residual error while
relative tolerance is analogous to a proportional residual error. Thus
the absolute and relative tolerance criteria have no direct numerical
relationship to each other.

The online NM7 help describes ATOL like this:

ATOL=n
Absolute tolerance. Used only with ADVAN13, for which TOL is a rela-
tive tolerance. The default is 12; a smaller value (equal to TOL) may
improve run time. May also be set with \$COVARIANCE record.

The NM7 definition is rather mysterious. If ATOL is really an absolute
tolerance criterion then a value of 12 would be ridiculous if the scale
of the solution was in say the 1 to 100 range. Perhaps we are expected
to guess that ATOL means 10D-12?

I cannot see any reason to suggest why ATOL should be set equal to TOL
because these numbers are like apples and oranges and cannot be
compared. Some ODE solvers allow ATOL as a vector to match the DADT
vector so that the absolute tolerance for each solution could be
individually specified.

Nick

Notice: This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates Direct contact information
for affiliates is available at
http://www.merck.com/contact/contacts.html) that may be confidential,
proprietary copyrighted and/or legally privileged. It is intended solely
for the use of the individual or entity named on this message. If you are
not the intended recipient, and have received this message in error,
please notify us immediately by reply e-mail and then delete it from