Mathematical modeling and simulation of SEIR model for COVID-19 outbreak: A case study of Trivandrum

In this study, we formulated a mathematical model of COVID-19 with the effects of partially and fully vaccinated individuals. Here, the purpose of this study is to solve the model using some numerical methods. It is complex to solve four equations of the SEIR model, so we introduce the Euler and the fourth-order Runge–Kutta method to solve the model. These two methods are efficient and practically well suited for solving initial value problems. Therefore, we formulated a simple nonlinear SEIR model with the incorporation of partially and fully vaccinated parameters. Then, we try to solve our model by transforming our equations into the Euler and Runge–Kutta methods. Here, we not only study the comparison of these two methods, also found out the differences in solutions between the two methods. Furthermore, to make our model more realistic, we considered the capital of Kerala, Trivandrum city for the simulation. We used MATLAB software for simulation purpose. At last, we discuss the numerical comparison between these two methods with real world data.


. Introduction
Coronaviruses are a large family of viruses that can infect both animals and humans with humans being seriously affected. Several coronaviruses have been linked to respiratory infections in humans, ranging from the common cold to more serious illnesses including the Middle East respiratory syndrome (MERS) and severe acute respiratory syndrome (SARS). Coronavirus disease 2019 (COVID-19) is caused by the most recent forms of coronavirus. For the past 2 years, people all over the world have been affected by COVID-19, which is the fifth pandemic after the 1918 Spanish flu (H1N1) pandemic, followed by the 1957 Asian flu (H2N2), the 1968 Hong Kong flu (H3N2), and the 2009 Swine flu pandemic (H1N1) pandemics [1]. COVID-19 is an infectious disease caused by various strains of coronavirus. It is the seventh member of the coronavirus family. This pandemic has seen a surge of patients with acute respiratory distress syndrome (ARDS) in intensive care units across the globe [2]. We study the outbreak in the capital of Kerala, Trivandrum city, which is also called Thiruvananthapuram. Till 30 December, 2021, this city has recorded 5,07,748 COVID-19-positive cases, out of which 4,99,009 cases have recovered and 6,257 have deceased. This pandemic not only affects the population but also affects the economics around the world [3]. So, by using the mathematical model, we can find the transmission of disease into the population. This provides us with a better understanding of how to deal with the current circumstance. It plays a powerful component in studying the dynamics of the spread of infectious diseases such as Ebola virus disease [4]. Disease in the ecosystem has become a popular research topic, and communicable disease has become a vital aspect of human population monitoring [5]. It makes us understand the dynamics of the disease and provides prediction about the spread of the disease. Haneen et al. [6] have constructed a simple and effective numerical algorithm that provides approximate solutions to complicated problems, especially the modeling of real-world phenomena [6]. Many authors use the utilized fractional differential problem, which is a modern mathematical formation model [7,8]. According to Kolokolnikov and Iron [9], the SEIR model is a simple dynamic model that describes the spread of the disease between populations [9]. Similarly, some of the researchers used the same SEIR approach in Xu et al. [10] and Peng et al. [11]. Some SEIR approaches have been done in Hurit et al. [12] and Alsakaji et al. [13]. Here, the author formulated and solved the model using the Euler method, the Runge-Kutta method, and Heun's method. Therefore, these mathematical models give valuable information, ideas, and control measures to the public as well as the government.
In this study, we are going to formulate a nonlinear ordinary differential equation. Here, we are going to solve the proposed model by using numerical methods. Therefore, we approach the Euler and Runge-Kutta methods. In these two methods, the values of y are calculated by short steps ahead of equal interval h of the independent variable x [14]. Now, the general form of the Euler method can be written as follows: In the case of the fourth order Runge-Kutta method, we have, y n+1 = y n + 1 6 (K 1 + 2K 2 + 2K 3 + K4), where n varies from 0,1,2,...
where K 1 = hf (t n , y n ), Here, in our proposed study, we formulated a COVID-19 model by incorporating the effects of partially vaccinated and fully vaccinated individuals at Trivandrum city. We tried to solve our model with various numerical techniques by using the Euler and Runge-Kutta methods. We have transformed our whole system into the Euler and fourth order Runge-Kutta equations by using general iterative formulas, and the solution is obtained by using MATLAB software.
Our study is organized as follows. The next section presents the formulation of the COVID-19 model, followed by the transformation of our SEIR model into the Euler and fourth order Runge-Kutta equations. Section 3 deals with the applications and solutions of both proposed methods, and Section 4 is devoted to results and discussion. In that, simulation results and absolute differences between both methods are presented. Furthermore, comparison and curve fitting are done with real-world data. The study ends with a brief conclusion in Section 5.

. Methodology . . Formulation of the SEIR model
We consider the human population, which we split into four subpopulations, namely, Susceptible individuals S(t), Exposed individuals E(t), Infected individuals I(t), and Recovered individuals R(t). To build our system, the following assumptions have been made: Individuals are recruited in the region at a fixed rate A and join the susceptible compartment. The susceptible population become exposed to the infection when an infected individual comes in contact at the rate α. Furthermore, we assume that the exposed population become infected at a constant rate δ > 0. Here, we have incorporated   partially vaccinated population V p and fully vaccinated population V f into the model to make it more realistic. Therefore, those who are partially vaccinated may get exposed, and the fully vaccinated individuals directly move to the recovery compartment. Other than vaccinated individuals, the remaining infected individuals recovered due to treatment at the rate γ . By using these assumptions, a model is framed, which is described as follows: (3) is the total population. Tables 1-3 gives the description of the parameters, initial values of the variables and values of the parameter respectively.

. . Transformation of Euler equations for our SEIR model
For our model, the dependent variables are S, E, I, and R. So, from the general iterative formula for the Euler method, S(T), E(t), I(t), and R(t) can be modified as follows: From these iterative formulas, we have calculated the values for 55 days from 1 January 2022 to 24 February 2022 at Trivandrum city. But before this, we should fix the initial values for variables and parameters, which is discussed in the next section.

. . Transformation of Runge-Kutta equations for our SEIR model
From the general iterative formula for the fourth order Runge-Kutta method, S(T), E(t), I(t), and R(t) can be modified as follows: . . . . . . .
From the aforementioned derived equations, we obtain Similarly, from these iterative formulas, we have calculated the values for 55 days from 1 January 2022 to 24 February 2022 at Trivandrum city. But before this, we should fix the initial values for variables and parameters, which is discussed in the next section.

. . General algorithm for the Euler and Runge-Kutta methods
Here, we have formulated a simple algorithm for both methods. They are as follows: STEP: 1 Here, we define all the parameters for the system (Equation 3). In our case, we take real-world data for V p , V f , and µ 1 . STEP: 2 Next, define system (Equation 3) with the respective parameter values. STEP: 3 Here, we fix the initial conditions and step size. STEP: 4 Use the for loop and define the Equations (4)-(8) within the loop. As this loop repeats the process, we fix the loop for 55 days. So, this generates our results for 55 days. STEP: 5 By following these four steps, we obtain the solution for both the Euler and Runge-Kutta methods.

. Applications
We considered the COVID-19 outbreak, particularly in the capital of Kerala, Trivandrum city. We have solved our model by using the fourth order Runge-Kutta and the Euler method. We have collected vaccination-related data from Ministry of Health and Family Welfare . These data have been taken for 55 days from 1 January 2022 to 24 February 2022. Our system is formulated logically with the help of eight parameters. It is difficult to find all parameter values. So, we have used assumed data for some parameters, and on the other hand, we have taken real-world values from COVID-19 BHARAT .

. . Solution obtained by using the Euler method
For each day, we calculate S, E, I, and R using the Euler iterative formula (Equation 4). We take the initial value as S 0 = 1, 661, 989, E 0 = 16, 797, I 0 = 481, and R 0 = 487 with step size as 0.1. Using our model, the following values for S 1 , E 1 , I 1 , and R 1 can be calculated.
Here, by using MATLAB, we have generated the values for 55 days from 1 January 2022 to 24 February 2022 which is described in Supplementary Table 4.

. . Solution obtained by using the fourth order Runge-Kutta method
For each day, we calculate S, E, I, and R using the fourth order Runge-Kutta iterative formulas (5), (6), (7), and (8). We take the initial value as S 0 = 1661989, E 0 = 16797, I 0 = 481, and R 0 = 487 with step size as 0.1. Using our model, the following values for S 1 , E 1 , I 1 , and R 1 can be calculated.
− γ (I 0 + K I − γ (I 0 + K I = 1661989 + 0.1 6 (−883340 + 2(−872228) + 2(−888406) = 16797 + 0.1 6 (407780 + 2(386176) + 2(403435) + 391485) = 56438.4 = 481 + 0.1 6 (16386 + 2(35994) + 2(33724) + 53078) = 3962.6  Similarly, by using MATLAB, we have generated the values for 55 days from 1 January 2022 to 24 February 2022, which is described in Supplementary Table 4. . Results and discussion . . Simulation result of the Euler and Runge-Kutta methods Figure 1A demonstrates the solution to the SEIR COVID-19 outbreak with the effects of partially and fully vaccinated individuals by using the Euler method. Here, the exposed and infected population raises and then approaches close to zero. Clearly, from the graph and data, we can predict that during the 21st day, the rate of infection was going to peak position and then slowly approaches close to zero with respect to time, whereas the susceptible population drastically comes down and then move toward the equilibrium values. In the case of a recovered population, the rate of recovery increases gradually and moves toward the equilibrium values. Figure 1B shows the simulation result of the SEIR COVID-19 outbreak with the effects of partially and fully vaccinated individuals by using the fourth order Runge-Kutta method. Here, the exposed and infected population raises and then approaches near zero. Clearly, from the graph and data, we can predict that during the 20 th day, the rate of infection was going to peak position and then slowly approaches close to zero with respect to time, whereas the susceptible population decreases drastically at first and then slowly move toward stability. In the case of a recovered population, the rate of recovery increases gradually and moves toward the equilibrium values. Furthermore, from both Figures 1A, B, we can say that Figure 1B is more accurate than Figure 1A. This is because the Euler method has first order accuracy and the Runge-Kutta method has fourth order accuracy [15]. So, Figure 1B gives a more accurate result. So, overall from this, we can say that the incorporation of the V p and V f parameters into the model has worked well and successfully decreases the spread of COVID-19 in Trivandrum city. . . Absolute value di erence of SEIR model solution between the two methods Figure 2 demonstrates the absolute value difference of the SEIR model between the Euler and the fourth order Runge-Kutta methods. From this, we comment that the absolute value has a sudden raise in the beginning stage. This is due to the increase in the value of the SEIR model solution, which increases the absolute value difference up to the peak and then decreases over time. The difference between both solutions is large in the time interval [3,16]. Supplementary Table 5 shows the absolute value difference of the solution for the considered 55 days.
From Supplementary Table 5, the largest absolute value difference of the solutions of S(t), E(t), I(t), and R(t) are 70,931, 45,597, 27,276, and 13,548, respectively, at the time t = 10, 9, 12, and 18. From these data, we conclude that the absolute value difference between the two methods is large.

. . Comparison between the Euler and fourth order Runge-Kutta methods
In this subsection, we have introduced the comparison between the Euler and fourth order Runge-Kutta methods. Here, Figures 3A,  B, 4A, B demonstrate the comparison between these two methods for the cases of susceptible, exposed, infected, and recovered populations, respectively. The generated values between the two methods show the same behavior with a slight variation and produce similar results. Here, in Figure 3B, initially, the number of exposed individuals increases steeply and then decreases over a period of time. The increase in the exposed population is due to the incorporation of the fact that all partially vaccinated individuals are assumed to be getting exposed to the infection. In addition, in Figure 4A, initially, the number of infected individuals increases steeply over a period of time and decreases eventually. The decrease in infection is due to the increase in recovered individuals. Since those who recovered from the infection are been transferred to the recovered compartment. Furthermore, we assumed the fact that fully vaccinated individuals directly move to the recovered class. Similarly, in Figure 4B, the number of recovered individuals increases slowly and attains a peak on the 35th day. Since the incubation period is 5-14 days, this is one of the reasons for the slowness in the recovered population.
. . Comparing the model with actual data Using the generated data and actual data from Supplementary Tables 6, 7, we have plotted a graph that compares the model data with the actual data for the infected and recovered populations. Figures 5A, 6A demonstrate that the real data do not coincide or fit well with the generated results of the model. From these displayed figures, we observe that the generated values and the actual values do not match or coincide well. This may be due to the unexpected rise of the infected population in the real world, particularly Trivandrum. Here, the actual data curve remains at the bottom and looks like a straight line. So, to get a clear picture of actual data, we have plotted it separately in Figures 5B, 6B. This shows the daily variation of infected and recovered individuals over a period of 55 days in Trivandrum city.
. . Curve fitting with actual data By doing some modifications in the parameter values, we were able to fit the model with our real-world data, which are demonstrated in Figures 7A, B. It shows the comparison of curvefitted data from 55 days with the real-world data for the infected and      Table 8 shows the comparison of data of the fitted model to the real-life data for both the infected and recovered populations. Hence, from this, we were able to match the generated values with real-world data.

. Conclusion
The solution to the SEIR model with the effects of partially and fully vaccinated individuals are discussed in this study. Here, we solve our model by using the Euler and fourth order Runge-Kutta methods for the capital of Kerala, Trivandrum city. Using MATLAB, we have generated the values and graphs for 55 days from 1 January 2022 to 24 February 2022. The simulation result shows that both methods have the same behavior and produce similar results for all the population groups. Furthermore, we found that the fourth order Runge-Kutta method is more accurate than the Euler method. The absolute value difference between these two methods is obtained. This shows that the differences M et al. .
/fams. . of the solution between these two methods are large at the time interval [3,16]. Then, we have compared the infected and recovered data of the two methods with actual data, which is described in Figures 5A, 6A. We observed that the graph does not match with the actual data due to a huge rise in the infected and recovered populations and also overestimation of parameters such as γ and δ. Meanwhile fully vaccinated population plays a vital role in our model. It triggers the recovery rate. Eventually some studies and new articles [17] show that COVID-19 vaccine remains effective in preventing severe disease, but its effectiveness can wane over time. According to Dr.Rommel Tickoo, boosters are being recommended because data are showing that the protection of vaccine declines over time, particularly those who were vaccinated long before. Furthermore, he added that it is concern about new COVID-19 variant, such as Omicron. He suggests that getting a booster dose can decrease the risk of infection and severe illness from virus. In India, it has been 15 months of completion in vaccination drive. Still, 37% of eligible individuals are not been fully vaccinated yet, whereas in Trivandrum, 32% have been not fully vaccinated. So, this is also one of the reasons of mismatch of generated values with actual data in Figures 5A, 6A. Hence, in future, by doing parameter estimation, we can modify our model and can evaluate the flaws.

Data availability statement
The original contributions presented in the study are included in the article/Supplementary material, further inquiries can be directed to the corresponding author.