Skip to content

addDepot() fails if the centralLine is at the beginning or end of the model #77

@billdenney

Description

@billdenney

At the beginning gives an incorrect model output.

mymodel <- function() {
  description <- "One compartment PK model with linear clearance using differential equations"
  dosing<-c("central", "depot")
  ini({
    lcl <- 1 ; label("Clearance (CL)")
    lvc  <- 3.45 ; label("Central volume of distribution (V)")
    propSd <- 0.5 ; label("Proportional residual error (fraction)")
  })
  model({
    d/dt(central) <- exp(lcl)/exp(lvc)*central

    central ~ prop(propSd)
  })
}

mymodel |>
  addDepot(fdepot = 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions