```From: Toufigh Gordi - tgordi@buffalo.edu
Subject: [NMusers] Simulation problems
Date: 2/4/2004 4:54 PM

Dear all,

I am trying to simulate oral dosing of a compound following a
bi-exponential decline with saturable CL and its binding to receptors,
which is described by a simple E-max model. Part of the control stream
is given here:

COMP=(GUT DEFDOSE)
COMP=CENT
COMP=PERIPH

\$PK
VM=THETA(1)*EXP(ETA(1))
KM=THETA(2)
V1=THETA(3)*EXP(ETA(2))
Q=THETA(4)
V2=THETA(5)*EXP(ETA(3))
S2=V1

BASE=THETA(6)
IMAX=THETA(7)
IC50=THETA(8)
KA=THETA(9)
F1=0.6
\$DES
CON=A(2)/V1

\$ERROR
CONC=F
LAM=BASE-(IMAX*CONC/(IC50+CONC))
IF (PKPD.EQ.2) THEN
Y=LAM
ELSE
Y=CONC+EPS(1)
ENDIF

\$THETA (7.98 FIXED)      ;1 VM
\$THETA (11.1 FIXED)      ;2 KM
\$THETA (41.9 FIXED)      ;3 V1
\$THETA (0.395 FIXED)     ;4 Q
\$THETA (39.2 FIXED)      ;5 V2
\$THETA (54.8 FIXED)      ;6 BASE
\$THETA (53.7 FIXED)      ;7 IMAX
\$THETA (0.579 FIXED)     ;8 IC50
\$THETA (0.01 FIXED)       ;9 KA

\$OMEGA 0.0791 FIX        ;1 IIV VM
\$OMEGA 0.0181 FIX        ;2 IIV V1
\$OMEGA 0.0918 FIX        ;3 IIV V2
;\$OMEGA 0.00328 FIX       ;4 IIV BASE
;\$OMEGA 0.00424 FIX       ;5 IIV IMAX
;\$OMEGA 0.888 FIX         ;6 IIV IC50

\$SIGMA 0 FIX             ;4 ADD ERROR PK

All fixed values beside the bioavilability (0.6) and ka are model
estimates using data from single iv doses. The problem I encounter
is that when ka is increased to, let's say 0.03 or higher, the simulation
results in a Fortran message of overflow. The model works, however below
this value, or if no ETAs are presented on the PD parameters. Increasing
dose will also result in success with higher ka values.

My guess is that ETAs make the model unstable and result in a division by
zero somewhere. My first question is how to fix the problem. The second
is if there is any understandable reason for why ka should be the cause
of the model collapse.

Best regards,

Toufigh Gordi

_______________________________________________________

From: Leonid Gibiansky - lgibiansky@emmes.com
Subject: RE: [NMusers] Simulation problems
Date: 2/5/2004 9:17 AM

Toufigh,

Just to be sure, I would define (in the ERROR block)
CONC=A(2)/V1
Also, the model as you described does not contain ETAs on PD parameters,
so it works according to your message. Could you show the model that have problems ?

The only place that can lead to overflow is the ERROR-block division by (IC50+CONC)

You may try
DEN = (IC50+CONC)
IF(DEN .LT. 0.00001) DEN = 0.00001
LAM=BASE-IMAX*CONC/DEN
and see what happens.

Leonid
_______________________________________________________

From: Toufigh Gordi - tgordi@buffalo.edu
Subject: RE: [NMusers] Simulation problems
Date: 2/5/2004 9:52 AM

Dear Leonid,

After pushing the send button yesterday, I realized that the model, as
presented, works. What doesn't work is if you add: *EXP(ETA(x)) to BASE,
IMAX, and IC50, respectively, where x would be 4, 5, or 6.

I have now done as you suggested and the full model I try to simulate
is given below. It works now, with or without a lower limit on DEN. It
seems that the problem was created by:

CONC=F

Once this line was gone, everything works.

Toufigh

\$PROB ALL DOSES
; 2-COMP
\$INPUT ID AMT DATE=DROP TIME DV EVID CMT PKPD
\$DATA scpkpdsim.csv IGNORE=#
\$MODEL NCOMP=3

COMP=(SC DEFDOSE)
COMP=CENT
COMP=PERIPH

\$PK
VM=THETA(1)*EXP(ETA(1))
KM=THETA(2)
V1=THETA(3)*EXP(ETA(2))
Q=THETA(4)
V2=THETA(5)*EXP(ETA(3))

S2=V1

BASE=THETA(6)*EXP(ETA(4))
IMAX=THETA(7)*EXP(ETA(5))
IC50=THETA(8)*EXP(ETA(6))
KA=THETA(9)

F1=0.6

\$DES
CON=A(2)/V1

\$ERROR
CONC=A(2)/V1
;        CONC=F
DEN=(IC50+CONC)
;        IF(DEN.LT.0.00001) DEN=0.00001

LAM=BASE-(IMAX*CONC/DEN)

IF (PKPD.EQ.2) THEN
Y=LAM
ELSE
Y=CONC+EPS(1)
ENDIF

\$THETA (7.98 FIXED)      ;1 VM
\$THETA (11.1 FIXED)      ;2 KM
\$THETA (41.9 FIXED)      ;3 V1
\$THETA (0.395 FIXED)     ;4 Q
\$THETA (39.2 FIXED)      ;5 V2
\$THETA (54.8 FIXED)      ;6 BASE
\$THETA (53.7 FIXED)      ;7 IMAX
\$THETA (0.579 FIXED)     ;8 IC50
\$THETA (0.1 FIXED)       ;9 KA

\$OMEGA 0.0791 FIX        ;1 IIV VM
\$OMEGA 0.0181 FIX        ;2 IIV V1
\$OMEGA 0.0918 FIX        ;3 IIV V2
\$OMEGA 0.00328 FIX       ;4 IIV BASE
\$OMEGA 0.00424 FIX       ;5 IIV IMAX
\$OMEGA 0.888 FIX         ;6 IIV IC50

\$SIGMA 0 FIX             ;4 ADD ERROR PK

\$SIMULATION (20031840) ONLYSIM
\$TABLE ID TIME CONC LAM Y PKPD CMT  NOPRINT ONEHEADER FILE=SDTAB201

_______________________________________________________

```