Auto induction model

hi …
can someone check the dynamics block for my autoinduction model?

Central' = (cld/vt) * Peripheral - ((1+E) * cls * Central/vc ) - (cld/vc) * Central
Peripheral' = (cld/vc) * Central - (cld/vt) * Peripheral
E' =  kin *(Eo + cls * (Central/vc))- ko * E

thank you

Dear Sai - could you please share the full code? Thank you…J

pk = @model begin
    @param begin
        tvvc ∈ RealDomain(lower=0)
        tvcls ∈ RealDomain(lower=0)
        tvcld ∈ RealDomain(lower=0)
        tvvt ∈ RealDomain(lower=0)
        tvko ∈ RealDomain(lower=0)
        tvkin ∈ RealDomain(lower=0)
        tvEo ∈ RealDomain(lower=0)
        Ω ∈ PDiagDomain(2)
        σ ∈ RealDomain(lower=0) 

    end
    @random begin
        η ~ MvNormal(Ω)
    end
    @pre begin
         vc = tvvc * exp(η[1])
         cls = tvcls * exp(η[2])
         cld = tvcld
         vt = tvvt
         ko = tvko
         kin = tvkin
         Eo = tvEo
    end
    @dynamics begin
        Central' = (cld/vt) * Peripheral - ((1+E) * cls * Central/vc ) - (cld/vc) * Central
        Peripheral' = (cld/vc) * Central - (cld/vt) * Peripheral
        E' =  kin *(Eo + cls*(Central/vc))- ko * E

    end
    @derived begin
        cp =  @. 1000 * Central/vc
        dv ~ @. Normal(cp,sqrt(cp^2 * σ) )
    end
end

param = (tvvc = 146, tvcls = 0.04, tvcld = 116, tvvt = 58.4,
          tvko = 0.023, tvEo = 138, tvkin = 0.023,
          Ω = Diagonal([0.0,0.0]), σ =0 )

simulation part

r = DosageRegimen([120,40], rate = [120,80],time=[0,8],addl =[0,8], ii =[0,8], cmt = [1,1])

sub = Subject(id=1, evs = dr)

obs = simobs(pk,sub,param,obstimes = 0:1:100)

plot(obs)

You also a @init block to set the initial conditions for the diff eqs. I dont see it in your code, did I miss it? J

sorry. i did not write it. and i did not knew how to write it. ill check the tutorials . thank you very much

@init begin
Resp = Kin/Kout
end
this is the init value given in tutorials,
kin, kout are having same numerical value in exercise,what can i write in init block.
and i also give Eo value as initial value of enzyme availability

No worries. Insert a block above the diff eqs like below:

@init begin
    Central         =   0 # change to the appropriate initial value
    Peripheral    =   0
    fAI                =   1 # You are essentially creating a 'dummy' delayed auto-induction of 
                                #  the systemic clearance. I think fraction auto-induction is a better 
                                #  notation, hence I suggest we change it to fAI. See below for more info.
  end

Your E can be better termed as fAI. Why ‘fraction’? it is because this is a ‘dummy’ compartment. All we are interested in is to change the systemic CL by a ‘fraction’. Further, it makes our equations easier by making the diff eq for fAI as below. This way, you keep the initial condition for fAI quantity as 1. Meaning, at baseline - at drug dosing, the auto-induction is 1 (ie no effect). With Central’ amounts changing, the fAI will also change, affecting the cls.
fAI' = kai * (cls*(Central/vc)- fAI)
Does this help? try this and let me know how it goes. Output each compartment to visualize how the diff eqs operate. Good luck…J

is this correct way of writing ?
still i have a doubt in writing for Central compartment in dynamics block

pk  = @model begin
    @param begin
        tvvc ∈ RealDomain(lower=0)
        tvcls ∈ RealDomain(lower=0)
        tvcld ∈ RealDomain(lower=0)
        tvvt ∈ RealDomain(lower=0)
        tvko ∈ RealDomain(lower=0)
        tvkin ∈ RealDomain(lower=0)
        tvEo ∈ RealDomain(lower=0)
        Ω ∈ PDiagDomain(2)
        σ ∈ RealDomain(lower=0) 

    end
    @random begin
        η ~ MvNormal(Ω)
    end
    @pre begin
         vc = tvvc * exp(η[1])
         cls = tvcls * exp(η[2])
         cld = tvcld
         vt = tvvt
         ko = tvko
         kin = tvkin
         Eo = tvEo
    end
    @init begin
         Central = 0
         Peripheral = 0
         fAI = 1
    end
    @dynamics begin
        Central' = (cld/vt) * Peripheral - ((1+fAI) * cls * Central/vc ) - (cld/vc) * Central
        Peripheral' = (cld/vc) * Central - (cld/vt) * Peripheral
        fAI' = ko * (cls*(Central/vc)- fAI)

    end
    @derived begin
        cp =  @. 1000 * Central/vc
        cpheri  = @. Peripheral/vt
        En =  @. fAI
    end
end

param = (tvvc = 146, tvcls = 0.04, tvcld = 116, tvvt = 58.4,
          tvko = 0.023, tvEo = 138, tvkin = 0.023,
          Ω = Diagonal([0.0,0.0]), σ =0 )
dr = DosageRegimen([120,40], rate = [120,80],time=[0,8],addl =[0,8], ii =[0,8], cmt = [1,1])

sub = Subject(id=1, evs = dr)

obs = simobs(pk,sub,param,obstimes = 0:1:100)

plot(obs)

still the plot not showing auto induction. concentration level are increasing

I think tvcls is too low in your model. I just ran your model by changing tvcls=4, then I can see concentration is decreasing and enzyme is increasing.

Simple question is that I can’t see where Eo is used in your model.

Hi Sai,
I hope this help. You need to account for the initial enzyme value in the system.

  @init begin
    Enzyme = (Kin/Kout)+E0
  end

  @dynamics begin
    Central' = -(Cls/Vc)*Central*(Enzyme) - (Cld/Vc)*Central + (Cld/Vt)*Peripheral
    Peripheral' = (Cld/Vc)*Central - (Cld/Vt)*Peripheral
    Enzyme' = Kin*(E0+(Central/Vc)) - Kout*Enzyme
  end

pk22

2 Likes

thankyou very much parssh