library(mrgsolve)
mod <- mread("pk2", modlib())
#> Building pk2 ... done.
mod %>%
ev(amt = 100, rate = 3) %>%
mrgsim(end = 48, delta = 0.1) %>%
plot
as.list(mod)$code %>% cat(sep = "\n")
#> $PARAM @annotated
#> CL : 1 : Clearance (volume/time)
#> V2 : 20 : Central volume (volume)
#> Q : 2 : Inter-compartmental clearance (volume/time)
#> V3 : 10 : Peripheral volume of distribution (volume)
#> KA : 1 : Absorption rate constant (1/time)
#>
#> $CMT @annotated
#> EV : Extravascular compartment (mass)
#> CENT : Central compartment (mass)
#> PERIPH : Peripheral compartment (mass)
#>
#> $GLOBAL
#> #define CP (CENT/V2)
#>
#> $PKMODEL ncmt = 2, depot = TRUE
#>
#> $CAPTURE @annotated
#> CP : Plasma concentration (mass/time)
#>
Created on 2018-12-06 by the reprex package (v0.2.1)