Is there a good way to assign a time-varying bioavailabilty on a zero-order
rate of infusion in NONMEM? The best I’ve been able to come up with is
something like the below. It seems like something that should be easier
than what I’m doing below (I adjusted it from the real example as I was
typing it into the email—I could have introduced a bug in the process).
And importantly, -9998 is well before any time in my database.
(dosing into CMT=1 with an IV infusion)
COMP=(CENTRAL DEFDOSE DEFOBS) ; central
COMP=(P1) ; peripheral 1
COMP=(P2) ; peripheral 2
; Normal stuff and ...
; Record the dosing time
IF (NEWIND.LT.2) THEN
TDOSE = -9999
DOSEEND = -9998
DOSE = -999
DOSERATE = 0
IF ((EVID.EQ.1 .OR. EVID.EQ.4) .AND. RATE.GT.0) THEN
TDOSE = TIME
DOSEEND = TIME + AMT/RATE
F1 = 0 ; Bioavailability is zero so that the $DES block has full control
over the rate.
; Manually control the infusion
RATEIN = 0
IF (MTIME(1).LE.T .AND. T.LE.MTIME(2)) THEN
RATEADJCALC = RATEADJMAX * EXP(-(T – MTIME(1)) * RATEADJTAU)
RATEIN = DOSERATE - RATEADJCALC
DADT(1) = RATEIN - K10*A(1) - K12*A(1) + K21*A(2) - K13*A(1) + K31*A(3)
DADT(2) = K12*A(1) - K21*A(2)
DADT(3) = K13*A(1) - K31*A(3)