library(ggplot2)
des2CMToral <- function(t,y,p){
  with(as.list(c(p,y)), {
    K20  <- CL1 / V1
    K23  <- CL2 / V1
    K32  <- CL2 / V2

    DADT1 = -A1 * KA
    DADT2 =  A1 * KA + A3 * K32 - A2 * (K20 + K23)
    DADT3 =            A2 * K23 - A3 * K32
    CP    =  A2/V1
    list(c(DADT1, DADT2, DADT3),c(CP=CP))
  })
}
pars   <- c(KA=0.1,CL1=10,V1=5,CL2=5,V2=100)
init   <- c(A1=0,A2=0,A3=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,des2CMToral, pars,events=list(data=events)))
out    <- reshape2::melt(out,id='time')
ggplot(out,aes(time,value)) + geom_line() + facet_wrap(~variable,scales='free')
