library(ggplot2)
des1CMToral <- function(t,y,p){
  with(as.list(c(p,y)), {
    V      <- 1/C
    K      <- L
    DADT1  <-  - KA*A1
    DADT2  <-    KA*A1 - K*A2
    CP     <-  A2/V
    list(c(DADT1, DADT2),c(CP=CP))
  })
}
pars   <- c(KA=0.1,C=1,L=1)
init   <- c(A1=0,A2=0)
events <- dose_func(cmt=1,value=1,times=0)
times  <- seq(0,24,length.out=200)
out    <- as.data.frame(deSolve::lsoda(init,times,des1CMToral, pars,events=list(data=events)))
out    <- reshape2::melt(out,id='time')
ggplot(out,aes(time,value)) + geom_line() + facet_wrap(~variable,scales='free')
