I asked Devin this directly before I discovered the google_group.
Basically, I want to change the dose for a drug based on the drug's concentration. Here is some code that does not work but illustrates what I want to do.
Ideally I would like the titration to be dependent on TIME and CONC as well. Any suggestions are appreciated.
Many thanks and Kind regards..Dinko
##------------------------------------------------------------------------------------------------------------------------------------------------------------------------
code <- '
$PARAM TVCL = 1.3, TVVC=28, TVKA=0.6, WT=70, F1=1
$SET delta=0.1
$CMT GUT CENT
$MAIN
// ... why does not this work?
_F(1) = F1;
if(CENT>0.1) _F(1) = F1*0.1;
//if(CENT>0.1 && TIME>48) _F(1) = F1*0.1;
double CLi = exp(log(TVCL) + 0.75*log(WT/70) + ETA(1));
double VCi = exp(log(TVVC) + ETA(2));
double KAi = exp(log(TVKA) + ETA(3));
$OMEGA name="IIV"
0.1 0 0
$ODE
dxdt_GUT = -KAi*GUT;
dxdt_CENT = KAi*GUT - (CLi/VCi)*CENT;
$TABLE
table(CP) = CENT/VCi;
table(ETA1) = ETA(1);
table(ETA2) = ETA(2);
$CAPTURE ETA(1) ETA(2) _F(1)
'
##------------------------------------------------------------------------------------------------------------------------------------------------------------------------