I almost run same codes but got two different plots while simulating , may i know how it happen

1 st run

mymodel = @model begin
    @param begin
      tvcl ∈ RealDomain(lower=0, init = 1)
      tvv1 ∈ RealDomain(lower=0, init = 40)
      tvv2 ∈ RealDomain(lower=0, init= 100)
      tvq ∈ RealDomain(lower=0, init=3)
      σ_prop ∈ RealDomain(lower = 0, init= 0.04)
      #Ω ∈ PDiagDomain( init = [0.09])
     end

  @random begin
    η ~ MvNormal(Matrix{Float64}(0.09I, 1, 1))
  end

  @pre begin
    CL = tvcl * exp(η[1])
    V1  = tvv1
    V2 = tvv2
    Q = tvq

  end
  #@covariates Wt

    @dynamics begin
        Central' = - (CL/V1)*Central + Q*(Peripheral/V2) - Q*(Central/V1)
        Peripheral' = Q*(Central/V1) - Q*(Peripheral/V2)
    end
    @vars begin
        cent= Central/V1
        Perip=Peripheral/V2
end
  @derived begin
      conc = cent
      dv ~ @. Normal(conc, sqrt(conc^2*σ_prop)+eps())
    end
end
param= init_param(mymodel)
data = CSV.read("D:\\NONMEMnights\\mould\\julia\\12.3.2\\2comp_iv_data.csv", missingstring=".")
Newdata = read_pumas(data,id=:id, time=:TIME, dvs=[:dv])
sim=simobs(mymodel, Newdata, param)
plot(sim)
![arun1|493x318](upload://y36mTTNyHbZihWwsbCExwXPC1QU.png) 

2nd run

md = CSV.read("D:\\NONMEMnights\\mould\\julia\\12.3.2\\2comp_iv_data.csv", missingstring=".")

trans = read_pumas(md, id=:id, time=:TIME, dvs=[:dv],)

dian = @model begin
  @param   begin
    tvcl ∈ RealDomain(lower=0, init = 1.0)
    tvv ∈ RealDomain(lower=0, init = 20)
    tvQ ∈ RealDomain(lower = 0, init= 1)
    tvv2 ∈ RealDomain(lower = 0, init = 100)
    Ω ∈ PDiagDomain(init=[0.09])
    σ_prop ∈ RealDomain(lower=0,init=0.04)
  end
#end
  @random begin
#   η ~ MvNormal(Matrix{Float64}(0.01I, 1, 1))
η ~ MvNormal(Ω)
    #η ~ MvNormal(Ω)
  end
#end
  @pre begin
    CL = tvcl * exp(η[1])
    V  = tvv
    V2 = tvv2
    Q = tvQ
  end
#end
 #@covariates WT
#end
  #@dynamics ImmediateAbsorptionModel
    @dynamics begin
        #    Depot' =  -Ka*Depot
            Central' =  Q*(Peripheral/V2) - (CL/V)*Central - Q*(Central/V)

         Peripheral' =   Q*(Central/V)-Q*(Peripheral/V2)
    end
#end
@vars begin
       Cent   :=  Central/V
       Peri  :=  Peripheral/V2
   end
  @derived begin
      cp = Cent
     # dv ~ @. Normal(cp,sqrt(cp^2*σ_prop))
      dv ~ @. Normal(cp, sqrt(cp^2*σ_prop)+eps())
    end
end

param =init_param(dian)

sims = simobs(dian,trans,param)
plot(sims)
![run2|576x361](upload://2PWmTP5WIBeDN8r0gG8p9l9ibqU.png) 

arun1 1st run
run2 2nd run

Dear Sai,

In a Pumas model, whatever variables are generated/assigned in the @vars block, @observed and @derived block make it to the output of the model when simulating (think of it like $TABLE in NM).

The fundamental reason for the difference in output is the way you specified the @vars block. In the first run, you had the variables in the @vars block being assigned with a =, but in the second one they are being assigned with :=. You can read about the difference here https://docs.pumas.ai/dev/basics/models/#@vars:-Variable-Aliases-1. But essentially anything aliased with a := does not get carried to the output. Hence you did not get a plot.

with regards to the difference in concentrations levels, since this is a simulation, we can say that the difference in concentration levels is random (but in the same ballpark)

Thankyou Vijay

Saikumar Matcha