$DES
Marks the beginning of abbreviated code for the DES routine
|
|
Discussion
In general, a system of differential equations has the form
$$ \frac{dA(t)}{dt}=g(A(t), x, p, t). $$ Here both left-hand-side (LHS) and right-hand-size (RHS) are vectors of dimention \(n\): \(A=[A_1, \dots, A_n]^T\), \(g=[g_1, \dots, g_n]^T\). A denotes the drug amount in all compartments, other than the output compartment, \(p\) the internal PK parameters and \(t\) the time. For example, for the one compartment model with linear elimination and absorption from a drug depot we have $$ n=2,\quad p=[K_e, K_a]^T,\quad g_1=-K_aA_1,\quad g_2=K_aA_1-K_eA_2 $$
The $DES record is used to compute the right-hand-side of differential equations. It is used
with PREDPP's general non-linear models (ADVAN6, ADVAN8, ADVAN9,
ADVAN13, ADVAN14, ADVAN15, ADVAN16, ADVAN17,ADVAN18).
See abbreviated code for general rules for abbreviated code. Specific rules follow.
Assignment and conditional statements
Left-hand quantities
- DADT(1), DADT(2), … (Required. Derivative of each compartment amount with respect to time.) It is important to note that PREDPP itself adds in the rates for any infusions that may be active. It is possible to introduce endogenous drug into a compartment by explicit terms in a differential equation, rather than by PREDPP dose event records. Drug introduced in this manner is not included by PREDPP in the computation of the output compartment.
- DES-defined (i.e., PRED-defined) items.
Right-hand quantities
- A(1), A(2), … (Current compartment amounts; may be random vari- ables.)
- P(1), P(2), … (Post-translation explicit basic PK parameters; may be random variables.)
- PK-defined items (Post-translation implicit basic PK parameters; may be random variables.)
- T (Time; may be random variable. T takes values continuously over an integration interval.) (Note that T may take values that are larger than the ending time of the interval.)
- DES-defined items that appeared earlier as left-hand quantities in
$DES. - Data item labels specified on the
$INPUTstatement may be used explicitly in DES and$DESabbbreviated code (rather than obtained as PK parameters). This may improve run time. As with$PK, values are those of the current event record (the event record to which the system is being advanced). - THETA(n).
Fortran functions that are continuous, such as SIN and COS.
Functions that introduce a discontinuity, such as INT, MOD, and ABS,
should not be used. Instead, use model event times MTIME in the $PK
block, and either set flag variables in $PK that can be tested in
$DES, or use MPAST in the $DES block.
PREDPP. For examples for the use of MTIME with $DES, see model time examples.
Global Variables
Certain variables in FORTRAN Modules can be used. The following are of particular interest.
- DOSTIM: DOSTIM is the time of a lagged dose or additional
dose to which the system is being advanced. Abbreviated code
in
$DESmay test DOSTIM. It may use DOSTIM on the right, unless DOSTIM is a random variable. In this case, it may be used on the right in a$PKblock to define a random variable which may in turn be used on the right in the$DESblock. - DOSREC: DOSREC is the dose record corresponding to the dose
entering at DOS- TIM. Abbreviated code in
$AESmay test items in DOSREC in a logical condition, and DOSREC may always be used on the right. - ISFINL: During simulation or a copying pass, and during the advance to a particular time (event or non-event time), ISFINL=1 at a final call to DES at that time. Otherwise, ISFINL=0.
- DES_DER, MITER, METH: See Diff Eq Solver Settings.
Forbidden Variable names
|
|
Pseudo assignment statements
|
|
Record order
Follows $SUBROUTINES $INPUT $MODEL $PK
DISPLAYED VALUES
DES-defined variables may be listed for display in $TABLE or $SCATTER.
The values displayed for the first event record of the data set are
0's. The values displayed for the first event record of subsequent
individuals are those from the last event record of the previous
individual. This is because there is no call to DES with the first
event record of the individual record, or with any other event
record with the same value of TIME. NM-TRAN provides a warning
message.
|
|
The values displayed for event records other than the first are evaluated at the event time (as are all other displayed items such as PK- defined values and data record items).
Note that multiple calls to DES are associated with each event record. Some (including the final call during integration) may have a value of T that is larger than the end time of the integration interval. When NONMEM is performing simulation or a copying pass (COMACT>0), DES is called immediately after the advance to an event time or non-event time, with a value of T equal to this time, so that displayed values are the final value of T. Global variable ISFINL is set by PREDPP to 1 on this final call to DES. ISFINL can be tested on a WRITE statement if such statements are used in DES.
(See DES, ADVAN6, ADVAN8, ADVAN9)