5  A single dose

For each individual, you can execute a single dose. In this example, it’s a bolus dose.

model/evtools-0.solv
[ plugin ] evtools

[ set ] outvars = "CP"

[ param ] 

CL = 1
V = 32
KA = 2

DOSE = 100

[ pkmodel ] advan = 2

[ event ] 

if(NEWIND > 1) return; 

evt::ev dose = evt::bolus(DOSE, 1); 
self.push(dose); 

[ error ] capture CP = A2/V;

We don’t pass in a dosing data set; this is executed in the model itself.

mod <- mread("model/evtools-0.solv")
. Building evtools-0_solv ... done.
out <- mrgsim(mod, end = 48, delta = 0.1)

plot(out)