﻿# Leukopoiesis Model
# Variable Definitions
# Eqn 1:
#	β(Q) is the introduction rate
#	β0 represents the maximal rate of introduction in the proliferating phase
#	θ1 is the value for which β reaches half of its maximal value
#	n is the sen- sitivity of the rate of reintroduction
#	Q is the quiscent cells
# Eqn 2:
#	k(W) is the differentiation rate
#	k0 is a proportionality coefficiet
#	m and θ2 depend on the growth factors responsible for maturation of considered white blood cells
#	W is lymphocytes (T, B, or NK)
# Eqn 3:
#	Kv is the differentiation rate to other blood cells
#	γ1 is the apoptosis rate for prolif. haematopoietic stem cells
#	τ1 is the proliferation phase duration
# Eqn 4:
#	A is the amplification parameter
#	γ2 is the death rate of matured blood cells
#	τ2 is the amplification phase duration

beta = (beta0*(theta1)^n)/(theta1^n + Q^n)
k = (k0*(theta2)^m)/(theta2^m + W^m)

Q'=-(Kv + k + beta)*Q + 2*exp(-gamma1*tau1)*delay(beta,tau1)*delay(Q,tau1)
W'=-gamma2*W+A*delay(k,tau2)*delay(Q,tau2)

par beta0=1.77, theta1=100000000, n=3, k0=0.1, m=2, theta2=100000000, Kv=0.02, gamma1=0.1, tau1=0.05, A=20, gamma2=0.0394, tau2=2
init Q=2000000, W=700000
@ xplot=Q, yplot=W, zplot=t
@ bound=10000000000000
@ dt=0.5, total=1000
done

