COMMANDS
NFUNCTIONS 2
NDERIVATIVES 5
NPARAMETERS 15
PNAMES 'CL', 'Vc', 'K12', 'K21', 'K13', 'K31', 'Kout', 'R0', 'Emax', 'EC50', 'AMP', 'PERIOD', 'ACR', 'Rp','Gamma'
PUNIT 'L/hr','L','1/hr','1/hr','1/hr','1/hr','1/hr','pg/mL','~','ug/L','pg/mL','hr','hr','pg/mL','~'
NSECONDARY 2
SNAMES 'Kp_in','Kp_out'
SUNIT 'pg/mL/hr','1/hr'
END
remark - define temporary variables
TEMPORARY
t=x
Dose=CON(1)
Kp_in=Kout*R0
Kp_out=Kp_in/Rp
Drug=1-Emax*(Z(1)/Vc)**Gamma/(EC50**Gamma+(Z(1)/Vc)**Gamma)
END
remark - define differential equations starting values
START
Z(1) = Dose
Z(2) = 0
Z(3) = 0
Z(4) = Rp
Z(5) = R0
END
remark - define differential equations
DIFFERENTIAL
DZ(1) = -(K12+K13+CL/Vc)*Z(1)+K21*Z(2)+K31*Z(3)
DZ(2) = K12*Z(1)-K21*Z(2)
DZ(3) = K13*Z(1)-K31*Z(3)
DZ(4) = Kp_in - Kp_out*Drug*Z(4)
DZ(5) = Kp_out*Drug*Z(4)-Kout*Z(5)
END
remark - define algebraic functions
FUNCTION 1
F= Z(1)/Vc
END
FUNCTION 2
F= Z(5)+ AMP*sin(2*3.1415*((T+ACR)/PERIOD))
END
remark - define any secondary parameters
SECO
Kp_in=Kout*R0
Kp_out=Kp_in/Rp
END
remark - end of model
EOM