In the previous notebook Modeling heterogeneous dynamics: age-structured extensions to the SIR model, we coded our first simple age - structured model. To develop this further, we will now extend the model structure to 3 age groups - to represent children, adults, and the elderly in separate sets of SIR compartments. We are modeling the same infection and population as in the previous activity, with the only difference being this additional distinction between adults and the elderly. Again, these 3 age groups experience different forces of infection due to age-specific mixing.
Here is the input information for your model :
1
.
The probability of infection per contact,
b
, is 5 % for people of all ages
2
.
The total population size is 1 million, and children make up 20 % of this population . 15 % of the population are elderly .
3
.
The population has not been exposed to the infection before .
The contacts between our 3 age groups can be summarised in a contact matrix, where 1 represents children, 2 represents adults and 3 represents the elderly . In this example, the average daily number of contacts between the different age groups in the contact matrix are :
7
5
1
2
9
1
1
3
2
We want to model a vaccine with an all - or - nothing protective effect, which is 100 % effective in children and adults, but only 50 % effective in the elderly . There are 250, 000 vaccine doses available for the entire population . Since the infection causes more severe disease in the elderly, your task is to model which age group to prioritise for vaccination in order to minimise infection in the elderly .

Vaccinating only children

There are more doses of vaccine than children in the population, so the vaccine coverage will be 100 % in children and 0 % in the other groups as per the question
In[]:=
Clear["Global`*"]
In[]:=
(*Recoveryrate*)​​γ=1/5;​​(*theprobabilityofinfectionpercontact*)​​b=0.05;​​(*dailynumberofcontactsthatchildrenmakewitheachother*)​​c11=7;​​(*dailynumberofcontactsthatchildrenmakewithadults*)​​c12=5;​​(*dailynumberofcontactsthatchildrenmakewiththeelderly*)​​c13=1;​​(*dailynumberofcontactsthatadultsmakewithchildren*)​​c21=2;​​(*dailynumberofcontactsthatadultsmakewitheachother*)​​c22=9;​​(*dailynumberofcontactsthatadultsmakewiththeelderly*)​​c23=1;​​(*dailynumberofcontactsthatelderlypeoplemakewithchildren*)​​c31=1;​​(*dailynumberofcontactsthatelderlypeoplemakewithadults*)​​c32=3;​​(*dailynumberofcontactsthatelderlypeoplemakewitheachother*)​​c33=2;
In[]:=
(*TotalPopulationSize*)​​n=1000000;​​(*thepopulationofchildrensusceptible*)​​n1=0.2*n​​(*thepopulationofadultsusceptible*)​​n2=n-n1-n3​​(*thepopulationofadultsusceptible*)​​n3=0.15*n
Out[]=
200000.
Out[]=
650000.
Out[]=
150000.
Period of time in days
tmax=90;
Force of infection acting on susceptible children :
λ1[t_]:=b*c11*i1[t]/n1+b*c12*i2[t]/n2+b*c13*i3[t]/n3;
Force of infection acting on susceptible adults :
λ2[t_]:=b*c21*i1[t]/n1+b*c22*i2[t]/n2+b*c23*i3[t]/n3;
Force of infection acting on susceptible elderly people :
λ3[t_]:=b*c31*i1[t]/n1+b*c32*i2[t]/n2+b*c33*i3[t]/n3;
Vaccine coverage in children
vaccCov1=1.;
Vaccine coverage in adults
vaccCov2=0;
Vaccine coverage in the elderly
vaccCov3=0;
Vaccine efficacy in the elderly (100% in the other age groups)
In[]:=
vaccEff=0.5;
Effective vaccine coverage for each age group :
In[]:=
p1=vaccCov1;
In[]:=
p2=vaccCov2;
p3=vaccCov3*vaccEff;
Out[]=
0.
Define the system of differential equations
Rate of change in children :
eqns1={​​s1'[t]==-λ1[t]*s1[t],​​i1'[t]==λ1[t]*s1[t]-γ*i1[t],​​r1'[t]==γ*i1[t],​​s1[0]==n1-p1*n1,​​i1[0]==1,​​r1[0]==p1*n1};
Rate of change in adults:
eqns2={​​s2'[t]==-λ2[t]*s2[t],​​i2'[t]==λ2[t]*s2[t]-γ*i2[t],​​r2'[t]==γ*i2[t],​​s2[0]==n2-p2*n2,​​i2[0]==0,​​r2[0]==p2*n2};
Rate of change in elderly :
eqns3={​​s3'[t]==-λ3[t]*s3[t],​​i3'[t]==λ3[t]*s3[t]-γ*i3[t],​​r3'[t]==γ*i3[t],​​s3[0]==n3-p3*n3,​​i3[0]==0,​​r3[0]==p3*n3};
Solve the system
sol=NDSolve[{eqns1,eqns2,eqns3},{s1,i1,r1,s2,i2,r2,s3,i3,r3},{t,0,tmax}];
In[]:=
Plot[Evaluate[{s1[t],i1[t],r1[t],s2[t],i2[t],r2[t],s3[t],i3[t],r3[t]}/.sol],{t,0,tmax},PlotLegends->{"S1","I1","R1","S2","I2","R2","S3","I3","R3"},AxesLabel->{"Time","Population"},PlotRange->All,PlotStyle->{{Thick,Red},{Thick,Blue},{Thick,Green},{Dashed,Red},{Dashed,Blue},{Dashed,Green},{Thick,Dotted,Red},{Thick,Dotted,Blue},{Thick,Dotted,Green}},ImageSize->Large]​​​​
Out[]=
S1
I1
R1
S2
I2
R2
S3
I3
R3

Cumulative incidence function for children

In[]:=
inc[tmax_]:=NIntegrate[λ1[t]s1[t]/.sol,{t,0,tmax}];

Cumulative incidence function for adults

Cumulative incidence function for elderly persons

Giving all available vaccine doses to children would prevent all infections in children, but still result in 92, 941 infections in the elderly, and a total number of infections of 665, 739 by the end of the epidemic .

Vaccinating only adults

Vaccine coverage in adults = 250, 000/650, 000 and 0 % in the other groups
Period of time in days
Force of infection acting on susceptible children :
Force of infection acting on susceptible adults :
Force of infection acting on susceptible elderly people :
Vaccine coverage in children
Vaccine coverage in adults
Vaccine coverage in the elderly
Vaccine efficacy in the elderly (100% in the other age groups)
Effective vaccine coverage for each age group :
Define the system of differential equations
Rate of change in children :
Rate of change in adults:
Rate of change in elderly :
Solve the system

Cumulative incidence function for children

Cumulative incidence function for adults

Cumulative incidence function for elderly persons

Vaccinating only elderly people

Effective vaccine coverage for each age group:
Define the system of differential equations
Rate of change in children :
Rate of change in adults:
Rate of change in elderly
Solve the system

Cumulative incidence function for children

Cumulative incidence function for adults

Cumulative incidence function for elderly persons

The cumulative incidence in the elderly is lowest if we only vaccinate everyone in the elderly age group (only 50, 023 infections), despite the low vaccine efficacy in this age group! However, with this strategy we also get a substantially larger total number of infections than if vaccinating only children or only adults (842, 872 infections vs . 665, 739 and 603, 320 respectively) . The worst strategy for the given question would be to only vaccinate children, since this neither minimises the number of infections in the elderly nor in total .

CITE THIS NOTEBOOK

Optimizing interventions for a diverse population: age-structured modeling and analysis​
by Athanasios Paraskevopoulos​
Wolfram Community, STAFF PICKS, September 13, 2023
​https://community.wolfram.com/groups/-/m/t/3012132