In[]:=
seirCompartments = {[t], ℰ[t], ℐ[t], ℛ[t]};​​seirEquations = ​​ '[t]  -β
[t]

ℐ[t],​​ ℰ'[t]  β
[t]

ℐ[t] - σ ℰ[t],​​ ℐ'[t]  σ ℰ[t] - γ ℐ[t],​​ ℛ'[t]  γ ℐ[t],​​ [0]  s0,​​ ℰ[0]  ex0,​​ ℐ[0]  i0,​​ ℛ[0]  r0​​;​​seirInitialConditions = {s0999999,i01,1000000,r00,ex00};​​seirParameters = β
1
2
, γ
1
10
, σ
3
4
;​​Multicolumn[seirEquations /. seirInitialConditions, 2]
Out[]=
′

[t]-
βℐ[t][t]
1000000
[0]999999
′
ℰ
[t]-σℰ[t]+
βℐ[t][t]
1000000
ℰ[0]0
′
ℐ
[t]σℰ[t]-γℐ[t]
ℐ[0]1
′
ℛ
[t]γℐ[t]
ℛ[0]0

This was done in session and plots all the four compartments. I wnat to focus on the Infection and Recovered compartments only.

In[]:=
With​​ {seirSolutions = seirCompartments /. ParametricNDSolve[seirEquations /. seirInitialConditions, seirCompartments, {t, 0, 100000}, {β, γ, σ}]},​​ Manipulate​​ Show[​​ Plot[Evaluate@Through[seirSolutions[β, γ, σ]], {t, 0, tmax}, PlotRange  {{0, tmax}, {0, ymax}}]​​ ],​​ (* paramters in model *)​​ {{β, 1/2},0,1},​​ {{γ, 1/10},0,1},​​ {{σ, 3/4},0,1},​​ Delimiter,​​ (* plot range limits *)​​ {{tmax, 100, "
t
max
"}, 0, 200},​​ {{ymax, 1000000, "
y
max
"}, 0, 1000000},​​ SaveDefinitions  True​​ ​​
Out[]=
​
β
γ
σ
t
max
y
max
0
20
40
60
80
100
0
200000
400000
600000
800000
1×
6
10
In[]:=
With​​ {seirSolutions = seirCompartments /. ParametricNDSolve[seirEquations /. seirInitialConditions, seirCompartments, {t, 0, 100000}, {β, γ, σ}]},​​ Manipulate​​ Show[​​ Plot[Evaluate@Through[ℐ[t]/.seirSolutions[β, γ, σ]], {t, 0, tmax}, PlotRange  {{0, tmax}, {0, ymax}}]​​ ],​​ (* paramters in model *)​​ {{β, 1/2},0,1},​​ {{γ, 1/10},0,1},​​ {{σ, 3/4},0,1},​​ Delimiter,​​ (* plot range limits *)​​ {{tmax, 100, "
t
max
"}, 0, 200},​​ {{ymax, 1000000, "
y
max
"}, 0, 1000000},​​ SaveDefinitions  True​​ ​​
Out[]=
​
β
γ
σ
t
max
y
max
0
20
40
60
80
100
0
200000
400000
600000
800000
1×
6
10
ReplaceAll
:{{ParametricFunction[1,Internal`Bag[{Hold[ParametricNDSolve[{8},{4},{3},{3}]]},1,1],1,1,{{β$2512,γ$2513,σ$2514},4,{Automatic,0,0}},{NDSolve`base$2527,NDSolve`NDSolveParametricFunction[0,{ParametricNDSolve,Internal`Bag[{2},1,2],None,ParametricNDSolve},{{{9},{9}},{0,{3},{2},{3}},None,{{6},{3},None,{}}},5,{},All]}],18[1,5],1,1}[1]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.
ReplaceAll
:{{ParametricFunction[1,Internal`Bag[{Hold[ParametricNDSolve[{8},{4},{3},{3}]]},1,1],1,1,{{β$2512,γ$2513,σ$2514},4,{Automatic,0,0}},{NDSolve`base$2527,NDSolve`NDSolveParametricFunction[0,{ParametricNDSolve,Internal`Bag[{2},1,2],None,ParametricNDSolve},{{{9},{9}},{0,{3},{2},{3}},None,{{6},{3},None,{}}},5,{},All]}],18[1,5],1,1}[1]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.
ReplaceAll
:{{ParametricFunction[1,Internal`Bag[{Hold[ParametricNDSolve[{8},{4},{3},{3}]]},1,1],1,1,{{β$2512,γ$2513,σ$2514},4,{Automatic,0,0}},{NDSolve`base$2527,NDSolve`NDSolveParametricFunction[0,{ParametricNDSolve,Internal`Bag[{2},1,2],None,ParametricNDSolve},{{{9},{9}},{0,{3},{2},{3}},None,{{6},{3},None,{}}},5,{},All]}],18[1,5],1,1}[1]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.
General
:Further output of ReplaceAll::reps will be suppressed during this calculation.