0
$\begingroup$

I am working on a Delayed Coupled SIR model. The model's equations are as follows

  SS1 = NDSolve[
      {x1'[t] == - x1[t] ((0.3/(80*10^6)) y1[t] + (0.5/(80*10^6)) y2[t]),
       x2'[t] == - x2[t] ((0.3/(50*10^6)) y1[t] + (0.5/(50*10^6)) y2[t]),
       y1'[t] == x1[t] ((0.3/(80*10^6)) y1[t] + 0.5/(80*10^6) y2[t]) - 
                 x1[t - 14] ((0.3/(80*10^6)) y1[t - 14] + (0.5/(80*10^6)) y2[t - 14]),
       y2'[t] == x2[t] ((0.5/(50*10^6)) y1[t] + (0.5/(50*10^6)) y2[t]) - 
                 x2[t - 10] ((0.5/(50*10^6)) y1[t - 10] + (0.5/(50*10^6)) y2[t - 10]),
       z1'[t] == x1[t - 14] ((0.3/(80*10^6)) y1[t - 14] + (0.5/(80*10^6)) y2[t - 14]),
       z2'[t] == x2[t - 10] ((0.5/(50*10^6)) y1[t - 10] + (0.5/(50*10^6)) y2[t - 10]),
       x1[0] == 80*10^6, y1[0] == 150, y1[t /; t <= 0] == E^t, z1[0] == 0,
       x2[0] == 50*10^6, y2[t /; t <= 0] == E^t, y2[0] == 100,  
       z2[0] == 0  }, {x1, y1, z1, x2, y2, z2}, {t, 0, 200}] 

As you can see, I have tried to couple two SIR models with different coefficients (and delays). I am having issues with introducing a delay (or a disjoint) in the coupling. I wished to give the mixed coefficient values based on time ie

$\beta_{12}$ = {$a_1$ : t<$t_0$, 0 :($t_0$<t<$t_1$), $a_2$ :($t_1$<t)

The mixed and pure coefficients are constant in the above equation, and I couldn't go about how to incorporate this in my model.

$\endgroup$
2
  • $\begingroup$ Could you clarify what $\beta_{12}$ is in your model? $\endgroup$
    – Chris K
    Commented Apr 4, 2021 at 15:41
  • $\begingroup$ that would be the (0.5/(80*10^6)) and similarly $\beta_21$ = ((0.3/(50*10^6)) $\endgroup$ Commented Apr 4, 2021 at 17:19

1 Answer 1

1
$\begingroup$

This is not an answer but an example to show how to introduce delay equations of a SIR model.

Manipulate[
 sol = First@NDSolve[
 {
 SS'[t] == \[Lambda] - \[Beta] SS[t] II[t] - (\[Mu] + \[Nu]) SS[t],                                          
 SS[t /; t <= 0] == .990,
 II'[t] == Exp[-\[Mu]*\[Tau]] \[Beta] SS[t - \[Tau]] II[t - \[Tau]] - (\[Mu] + \[Alpha] + \[Gamma]) II[t],   
 II[t /; t <= 0] == .010,
 RR'[t] == \[Gamma] II[t] + \[Nu] SS[t] - \[Mu]*RR[t],                                                    
 RR[t /; t <= 0] == .0
 }, {SS, II, RR}, {t, 0, 365}];

Show[Plot[Evaluate[{#[t], #[t - \[Tau]]} /. sol], {t, 21, time}, 
  PlotLabel -> "SIR model with delay", PlotRange -> All] & /@ {SS, II, RR}],

Delimiter,
{{\[Tau], 7, "incubation period (in days) (: "}, 0, 21, 1},
{{\[Beta], .25, "transmission rate: "}, 0, 1, .05},
{{\[Gamma], .07, "recovery rate in days: "}, 0, 1, .005},
{{\[Alpha], .001, "death rate from virus: "}, 0, 1, .001},
{{\[Nu], .001, "vaccination rate: "}, 0, 1, .001},

Delimiter,
{{\[Lambda], 0, "birth rate: "}, 0, 1, .001},
{{\[Mu], 0, "natural death rate: "}, 0, 1, .001},
{{time, 100, "duration of the pandemic (in days): "}, 1, 365, 7}
]
$\endgroup$
1
  • $\begingroup$ this doesnt really with my problem though. i am looking at a very specific part of the problem, ie time dependent coefficient, rather than variable but constant coefficient. i hope my problem is a bit clearer $\endgroup$ Commented Apr 7, 2021 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.