input = {F, ka, V, k}

depot(type=1, target=Ad, p=F)
depot(type=2, target=Ac)

ddt_Ad = -ka*Ad
ddt_Ac =  ka*Ad - k*Ac
Cc = Ac/V
adm1 <- list(time=c(6, 36), amount=40, type=1)
adm2 <- list(time=c(12,42), amount=c(20,30), rate=c(5, 10), type=2)
trt  <- list(adm1, adm2)
p    <- list(name=c("F","ka","V","k"), value=c(0.7,1,10,0.1))
Cc   <- list(name="Cc",time=seq(0, 60, by=0.1))
res  <- simulx(model="pk2a_model.txt",parameter=p,output=Cc,treatment=trt)

print(ggplot(data=res$Cc, aes(x=time, y=Cc)) + geom_line())

Combination of repeated oral and intravenous administrations

Let \(A_d\) and \(A_c\) be, respectively, the amounts in the depot compartment (gut) and the central compartment (bloodtsream). Kinetics of \(A_d\) and \(A_c\) are described by the following system of ODEs \[ \begin{aligned} \dot{A_d}(t) & = - ka \, A_d(t) \\ \dot{A_c}(t) & = ka \, A_d(t) - k \, A_c(t) \end{aligned} \]

The concentration \(C_c\) in the central compartment is defined by \(\ \ C_c(t) = A_c(t)/V\)

  • Define the dosage regimen for the intravenous (iv) administration in the tab iv: time of first dose, number of doses, interdose interval, infusion time, amount.

  • Define the dosage regimen for the oral administration in the tab oral: time of first dose, number of doses, interdose interval, amount.

  • select the PK parameters in the tab parameters:
    • \(F\), the bioavalabililty (a fraction between 0 and 1) ,
    • \(ka\), the absorption rate constant,
    • \(V\), the volume of the central compartment.
    • \(k\), the elimination rate constant,

  • define the outputs in the tab outputs :
    • select the output to display: the amount \(A_d\) or \(A_c\), or the concentration \(C_c\),
    • select the time range where the prediction is computed,
    • select the number of time points of the grid where the prediction is computed.

  • set some settings in the tab settings: line width, linear or semi-log scale.