Including a time delay term for a differential equation

151 Views Asked by At

I have a system similar to the model found here which is
enter image description here

Here, P is the Parasite, C is cytokines and N is the neutrophils. Neutrophils are recruited due to cytokine response at rate $\eta$.
I want to know how I can change these equations so that,
1) Neutrophils are recruited according cytokine response, but the recruitment process begins only after a certain time has passed say $t_r$ .
Could it be done as ${dN\over dt}={\eta \over t_r}C(1-{N\over N_{max}})$

In solving this system in Matlab using ode solvers how can this kind of condition be given.

2) Instead of a delay of time $t_r$ can this be done so that neutrophil recruitment would start only after cytokine response have reached a certain level say $C_{threshold}$

1

There are 1 best solutions below

0
On BEST ANSWER

If your only goal is to make a working simulation model, this can be done pretty easily. When solving a set of ODEs in Matlab using an ODEsolver, you describe the right-hand sides with a function that has two arguments: X (the state) and t (time). You can embed the required logic into this function.

Say, instead of writing

dN = eta*X(4)*(1-X(5)/Nmax)-...

you write

if t>= t_r 
   dN = eta*X(4)*(1-X(5)/Nmax)-...
else
   dN = 0 -...
end