(no subject)
Subject: Re: [NMusers] Problems with a physiologic model
All the responses to Paul's email have been relevant. I would like to
remark on few of his questions (the easy ones).
The PARAM option of $MODEL describes the number of basic PK parameters,
as defined by NM-TRAN. To NM-TRAN, a basic PK parameter is a variable
that is defined in $PK and used in the $DES block. He has 6: CO, CLB,
VI, VB, CLL, CTL. The PARAM option is not needed when the $PK and $DES
blocks are present. NM-TRAN can count for itself. PARAM is only required
when you write your own code,
e.g., $SUBR ... DES=mydes
My advice is to leave it out when the $PK and $DES block are present.
Paul asks: When I set TOL=6, the execution of the model doesn't even
begin interating (sat for > 24 hrs)
Why does it not even
start when TOL=6, but it does when I lowered it to TOL=3?
I would guess that, with TOL=6, an illegal floating point number (NaN)
has been
developed somewhere in PREDPP or NONMEM, and this has cause the code to
go into an infinite loop. NONMEM is best compiled with options such that
the run stops immediately when an illegal floating point operation has
occured. As to why this problem is sensitive to the value of TOL, and
the choice of ADVAN (6,8,9): something in the model is not well
specified, so that it is very unstable and badly behaved numerically.
In general: When using $DES, it is best to do as much of the arithmetic
as possible in $PK rather than $DES. The $PK block is evaluated far less
often. (Paul's cs specifies CALLFL=-2, as often as possible - this is
not needed with a $PK block that calculates exactly same values for
every event record, assuming that WGT is constant. Better to specify
CALLFL=1, ONCE PER IR.) Either way, the $DES block is evaluated many
times
more often than the $PK block, and all those divisions in $DES are
costly of run time.
Leonid's suggestion to compute rate constants in $PK is an excellent
one. It would be a good idea even if the D.E.'s were not linear in the
compartment amounts A(i). (If the D.E.'s are non-linear in the A(i),
then some arithmetic *must* be done in the D.E.s) But since, as Leonid
points out, the D.E.s are linear, then Pual can try to use ADVAN7
(or ADVAN5 if ADVAN7 has a numerical problem.) ADVAN5 and 7 may well be
faster and more stable than ADVAN6-8-9, although I do not have a lot of
personal experience with this.