$DES

Marks the beginning of abbreviated code for the DES routine

1
2
3
4
5
6
7
$DES
 abbreviated code

;# Example: ODEs for ADVAN2
$DES
DADT(1)=-P(3)*A(1)
DADT(2)=P(3)*A(1)-P(1)*A(2)

Discussion

In general, a system of differential equations has the form

$$ \frac{dA(t)}{dt}=g(A(t), p, t). $$ Both the 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 the compartments (except 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 specify \(g_i\)'s, the RHS of differential equations. It is used with general nonlinear models (ADVAN6, ADVAN8, ADVAN9, ADVAN13, ADVAN14, ADVAN15, ADVAN16, ADVAN17, ADVAN18). See abbreviated code for general rules for abbreviated code.

Assignment and conditional statements

Left-hand quantities

  • DADT(i): \(\frac{dA_i}{dt}\), \(i=1,2,\dots\), required. Note that NONMEM adds in the rates for any infusions that are be active at \(t\). It is possible to introduce endogenous drug into a compartment by explicit terms in a differential equation, rather than by dose event records. Drug introduced in this manner is not included in the computation of the output compartment.
  • DES-defined (i.e., PRED-defined) items.

Right-hand quantities

  • A(i): \(A_i(t)\) current compartment amounts;
  • P(i): the \(i\)'th post-translation explicit basic PK parameters;
  • PK-defined items (Post-translation implicit basic PK parameters; may be random variables.);
  • T: time \(t\);
  • DES-defined items that appeared earlier as left-hand quantities in $DES;
  • Data item labels specified on the $INPUT statement;
  • THETA;
  • continuous Fortran functions such as sin, exp, and cos. For discontinuous RHS, use model event times MTIME in the $PK block. See model time examples.

Global Variables

Certain variables in Fortran Modules can be used. The following are of particular interest.

  • DOSTIM: the time of a lagged dose or additional dose to which the system is being advanced. Abbreviated code in $DES may test DOSTIM. When DOSTIM is not a random variable (a function of \(\eta\)'s), it can be used on the right in $DES. Otherwise, it should be used on the right in a $PK block to define a random variable. This new variable can then be used on the right in the $DES block.
  • DOSREC: the dose record corresponding to the dose entering at time DOSTIM. Abbreviated code in $AES may test items in DOSREC.
  • ISFINL: when advance to a particular time during simulation or a copying pass, ISFINL=1 indicates a final call to DES at that time. Otherwise, ISFINL=0.
  • See also Diff Eq Solver Settings.

Reserved Variable names

1
IR DA DP E(n) ETA(n) EPS(n) ERR(n)

Storage and calling options

Record order

Follows $SUBROUTINES, $INPUT, $MODEL, $PK.

(See DES, ADVAN6, ADVAN8, ADVAN9)