Skip to main content
. 2022 Feb 25;198:31–46. doi: 10.1016/j.matcom.2022.02.025
Algorithm 2 Determining the numerical solution of piecewise SEIUR model
at time t{pi,pi+1,,pi+11} for i=1n
where pi is the start point of period i and p1=0

Input:
The initial value of variables: S[0], E[0], I[0], U[0] and R[0];
The optimal parameters for each period i: βi, γi, f and σ;
Total population of the United States: N;
The number of iterations or days: n;
Output
S[t], E[t], I[t] and R[t] at all time t{1,2,,n}

Procedure
Fori in 1 to n
 Forj in pi to pi+11
 S[j]=S[j1]βiS[j1](I[j1])N
 E[j]=E[j1]+βiS[j1](I[j1])NσE[j1]
 I[j]=I[j1]+σfE[j1]γjI[j1]
 U[j]=U[j1]+σ(1f)E[j1]γjU[j1]
 R[j]=R[j1]+γj(I[j1]+U[j1])
 ReturnS[j], E[j], I[j], U[j] and R[j]