MATHEMATIcAL AND cOMPUTEr MODELS OF THE cOVID-19 EPIDEMIc

: The COVID-19 epidemic has gone down in history as an emergency of international importance. Currently, the number of people infected with coronavirus around the world continues to grow, and modeling such a complex system as the spread of infection is one of the most pressing problems. Various models are used to understand the progress of the COVID-19 coronavirus epidemic and to plan effective control strategies. Such models require the use of advanced computing, such as artificial intelligence, machine learning, cloud computing, and edge computing. This article uses the SIR mathematical model, which is often used and simple to model the prevalence of COVID-19 infection. The SIR model can provide a theoretical basis for studying the prevalence of the COVID-19 virus in a specific population and an understanding of the temporal evolution of the virus. One of the main advantages of this model is the ease of adjusting the sampling parameters as the study scale increases and the most appropriate graphs between the data and the resulting assumptions. Computer models based on the mathematical SIR model of the spread of the COVID-19 epidemic make it possible to estimate the number of possible deaths in the future. In addition, on the basis of the proposed models, it will be possible to assess the effectiveness of measures taken to prevent infection by comparing published data with forecasts. Computer models in Python are created on the basis of the proposed mathematical apparatus of SIR. The following libraries were added in the Python high-level programming language for the numerical solution of the system of differential equations for the SIR model: NumPy, Matplotlib PyPlot and the Integrate module from the SciPy library.


Introduction
The COVID-19 epidemic has gone down in history as an international emergency. At present, the number of people infected with coronavirus continues to increase day by day around the world and modeling a complex system such as the spread of infection is one of the most pressing problems. The prevention, diagnosis, and treatment of a new coronavirus infection [1], as well as the etiology, epidemiology, and clinic of Covid-19 have been studied [2]. In [3], the authors describe in detail the features of the clinical course, the possibilities of diagnosis, treatment, and prevention of infection in adults and children. Modeling the spread of infection is one of the effective ways to predict the epidemic situation in society. In order to determine the best strategies to reduce the impact of the COVID-19 epidemic, all countries of the world and the World Health Organization are widely using simulations of the spread of this infection. Basically, these are epidemiological models aimed at studying the spread of the disease and the impact of various interventions [4].
The purpose of the research developed within the framework of the scientific article is to create a computer model based on a mathematical model that is well adapted to the COVID-19 epidemic, considering the main characteristics, allowing predicting the spread of the epidemic.
Research objectives: • Study of indicators of the spread of the COVID-19 epidemic; • definition of a mathematical model that calculates the spread of the epidemic; • creation of a computer model of the spread of the COVID-19 epidemic based on a mathematical model. The novelty of the study lies in the application of the SIR mathematical model for modeling the spread of the COVID-19 disease and its software implementation in the Python language. The software implementation makes it possible to visualize the mathematical model for detecting the primary case of infection, considering epidemiological features.

Materials and research methods.
Coronavirus is a whole group of viruses, covering more than 30 species [5]. The species are grouped into 2 subfamilies. They can be transmitted not only to people but also to animals -cats, dogs, birds, pigs and cattle. The virus was discovered in 1960. It got its name because of the villi on the bark, which move in different directions and resemble a crown ( Figure 1). Coronaviruses can cause a range of illnesses, from the simple flu to severe acute respiratory syndrome (SARS or «atypical pneumonia»). To summarize what is known about the coronavirus and the current outbreak, the study conducted a literature review of publicly available materials. In work [6], the protein of coronavirus, its life cycle, non-structural proteins, symptoms, and techniques for doing insilico research on COVID, its relationship with the neurological system, detection strategies, and current treatments are all discussed. In the paper [7], the authors provide reports and analyses based on data that describe an important and methodologically sound vulnerability 91 map for this disease. Authors of [8] summarize current knowledge about COVID-19, such as the transmission process, diagnostic methods, clinical signs, pathological characteristics, and treatment measures. In the [9], a group of scientists provides a detailed overview of the disease Covid-19.
COVID-19 is short for the words «coronavirus disease» («disease caused by coronavirus»). In this name, «CO» means «corona» (corona), «VI» -«virus» (virus), «D» -« disease «(disease), and «19» is the year when the disease was first discovered. And the virus that causes the disease COVID-19 is called SARS-CoV-2. The name is given because the virus is genetically identical to the SARS-CoV virus [2].
The dynamic nature of the COVID-19 epidemic is critical to the implementation of effective response or prevention measures. Most people in general become vulnerable to infection in the early stages of an epidemic [3]. The spread of disease from person to person can be modeled as a stochastic «branching process». If an infected person infects an average of two people, the number of people infected at each stage doubles, and this process grows exponentially. Figure  2 graphically describes the process of spreading the virus. There are 29 654 212 people in the active phase of the coronavirus infection. The total number of deaths from coronavirus is 5 339 847 people, which is 2% of all cases. The number of people who have completely recovered from the COVID-19 coronavirus worldwide is 245 995 205. This is 87% of all infected people.

Mathematical models of the spread of the COVID-19 virus epidemic
The mathematical modeling of diseases is an urgent problem in the modern world. Many researchers resort to mathematical models to predict a particular disease [4], since they help to investigate changes correctly and accurately in certain processes occurring in society. Mathematical modeling is necessary in certain areas of medicine, for example, in epidemiology, where specific experiments are impossible or difficult [10].
The principles of mathematical models in the epidemiology of diseases differ from the models used in other sciences, since there are no certain invariable dependencies proven by practice [11]. In order to correctly model an epidemic, in addition to the appropriate basic model, it is necessary to choose its correct quantitative parameters. Some of these parameters are related to the biology of the virus. Other parameters are specific to a particular city or region and should be selected based on local data.
In the early stages of an epidemic, its spread occurs exponentially, i.e., with every N Day (the worse the situation, the smaller N), the number of patients' doubles [12]. This means that the doubling period gradually increases over time, which means that the exponential function best describes an epidemic only in its early stages and in the short term.
COVID-19 is an acute global problem due to its contagious nature and frequently changing characteristics. The rapid growth of this disease has forced scientists to take urgent countermeasures to stop the epidemic. Scientists have proposed and implemented various technologies to reduce the negative impact of the pandemic and speed up the recovery period. The authors of the article [13] describe a model whose results for the most important epidemiological parameters, such as the number of active cases, cumulative deaths, daily new deaths and daily new cases (among others), are consistent with the available real data on the first and subsequent waves of COVID-19. Since mathematical modeling of the COVID-19 epidemic based on system dynamics and SIR models is considered inadequate. The authors of work 14 propose a non-classical discipline of epidemic dynamics to overcome the shortcomings of modeling [14]. The article [15] provides a brief overview of the results of the classical SIR model and variants that consider contact frequency heterogeneity. It notes that calibrating a classical model against data generated by a heterogeneous model can lead to forecasts that are biased for several reasons and underestimate forecast uncertainty [15]. These technologies include artificial intelligence; machine learning; deep learning; fog computing; internet tools; cognitive computing; wireless connection.
Modeling of the coronavirus spread prediction based on data from the beginning of 2020 was made by the authors of the works. For example, the authors of the work provide a simulation of the spread of the disease on real data in the conditions of March 2020 [16]. The article [17] examines the SEIAR (Susceptible, Exposed, Infected, Symptomatic, Asymptomatically Infected and Recovered) COVID-19 infection model with a constant advection rate for disease spread. In [18] proposed a mathematical model to describe the dynamics of the spread of the Middle East respiratory syndrome.
Smart health services require formal processes to assess, prevent, and manage the spread of COVID-19. These technologies can be used to reduce the negative impact of this pandemic and speed up the treatment period for infection. The following models were used to study the spread of the virus in the population: • susceptible-infected (SI); • susceptible-infected-cured (SIR); • sensitive-incubation period-infected-cured (SEIR); • susceptible-infected-susceptible (SIS); • susceptible-infected-cured-susceptible (SIRS) models. These models offer two possible outcomes. First, if new infections are not monitored, the disease could eventually become an epidemic. The second result is that if the necessary measures are taken to protect susceptible people from infection, the virus will die. COVID-19 disease is the same as other infectious diseases and requires contact tracing to reduce new infections.
The basic model for characterizing the spread of an epidemic, the SIR model, which is considered the «gold standard» of epidemiology, was first proposed by the Scottish epidemiologists Kermac and Mackendrick in the 1920s. The SIR model aims to predict the number of people who are susceptible to infection, actively infected, or cured of infection at any given moment [19]. The article [20] provides mathematical and numerical analysis to solve important questions on the COVID-19 disease. Reviewed studies allow the models to predict disease behavior by evaluating a small number of parameters. There, each person in the study population can be in one of three cases: • Susceptible (susceptible to infection); • Infected; • Removed (cured of infection and not susceptible to infection). It is assumed that people can be immune to infection only after complete treatment for infection, which means that the sequence Susceptible → Infected → Removed can pass for each person at any time.
The SIR model is designed to solve many problems related to the evolution of the spread of the virus in real time, both quantitatively and qualitatively in a useful way. This is a dynamic system represented by three related codes describing the temporal evolution of the following three populations [21]: • Sensitive people: These are people who are not infected, but may become infected. As the virus spreads, a large number of people infect it, so that the sensitive population increases over a certain period of time (growth period). • Infected people: These are people who are infected with the virus and can transmit it to sensitive people. An infected person can remain in this population, and he will be removed from the infected population in case of his treatment or death. • Cured people: These are people who have recovered (or died) from the virus. The general scheme of a person's transition from one state to another is shown in Figure 4. As shown in the graph shown in Fig. 5, if the number of infected people during a certain period of time exceeds the number of people cured of the infection, this means that this period is characterized by the spread of the epidemic. Otherwise, we can say that the epidemic will disappear. Figure 5. Graph of the SIR model It is obvious that before the outbreak of the epidemic, 100% of people were in group S (susceptible to infection) and no data was recorded in the remaining groups. For convenience, we calculate the population of 100 people, respectively S = 100, I = 0, R = 0. In such cases, of course, the epidemic does not spread, since there must be at least one patient to start it. Therefore, consider the following case: S = 99, I = 1, R = 0. Now the epidemic is spreading, and its modeling consists in sequentially calculating the state of the population at the next step [20].
To understand how many people are infected at every step, it is important to understand the presence of two probabilities: the probability of contact between two people and the probability of infection of an infected person by contact with a sensitive person (β). Most often, 1/N (N is the volume of the population) is used in the model to represent the first probability, which means that each person contacts one random person in the population every time. The second probability (β) provides an accurate biological indicator of the infection of a particular pathogen (with all the influencing factors: temperature, the presence of a mask, etc.).
An infected person infects a person at a certain time, sensitive to a particular infection, when meeting with such a probability (1): (1) Then he will infect all sensitive people as follows (2): All infected together infect susceptible people (3): Thus, at the second step of the model, the number of people susceptible to infection decreases by 0.99 * β.
In addition, with a certain probability (γ), the infected, which are considered as the number of the inverse time of the disease, are cured of the disease. If the disease lasts 10 days, then the patient is treated on a certain day with a probability γ = 1/10. At each step, the number of cured of the infection will be equal to the following equation (4): At the second stage, the number of infected people decreases by 1 * γ and also increases by 0.99 * β. The number of people cured of the infection is increased by 1 * γ. The resulting relative state is calculated by the next step of the model. Thus, the model is formulated using the following system of equations (5): (5) where: S(t) -the number of people susceptible to infection per unit of time t; I(t) is the number of infected people per time unit t; R(t) is the number of people treated for infection per time unit t; β is the coefficient of intensity of human infection; γ-intensity coefficient of treatment of infected persons; N is the total population size.
The first equation of system (5) means that the change in the number of healthy people (as well as those susceptible to disease) decreases over time in proportion to the number of contacts with infected people. After contact, infection occurs, a person sensitive to the disease passes to the infected.
The second equation of system (5) shows that the growth rate of the number of infected people increases in proportion to the number of contacts between healthy and infected people and decreases as the latter are treated for the disease.
The third equation of system (5) shows that the number of people cured of a disease per unit of time is proportional to the number of infected people. In other words, each sick person should be treated after a certain time [23].
In general, the SIR model makes it possible to estimate at least the approximate dynamics of the spread of the epidemic in a first approximation. But the real process of the disease is somewhat complicated, and a number of factors must be taken into account when modeling. First, this disease process can consist of at least two stages: an incubation period (without external signs of the disease) and a period of immediate disease (with external signs of the disease and isolation of the infected person) [24]. In addition, the disease of each person can take different forms: Mild (when a person can carry the disease at home), moderate (when there is a need for hospitalization) and severe (in the COVID-19 example, the disease turns into coronavirus pneumonia, when there is a need to transfer patients to the intensive care unit and use ventilators).
Results and its discussion. Examples of visualization of the spread of Covid-19 in Python based on the SIR mathematical model.
The following libraries were added in the Python high-level programming language for the numerical solution of the system of differential equations for the SIR model: NumPy, Matplotlib PyPlot and the Integrate module from the SciPy library [25]. Now the function that determines the right-hand side of the system of differential equations, indicated above, is called sir_model. This brings up solutions that use this function in the following. Therefore, there are certain agreements on the parameters of this function. The function of the IR model, which calculates the right-hand side of the system of equations, is shown in Figure 6. t and y are the first two required parameters of this function. t is the value of the moment of time required to calculate the right-hand side of the system. the y parameter is a NumPy array with three lengths. Each component of this array stores the value of the functions S, I and R per time unit t. For convenience, we simply write these values as S, I, R = y. In addition, this function uses three additional parameters. These are: N (total population size), beta (speed of spread of β-infection) and gamma (rate of treatment of γ-infection).  The following sir_model parameters are now displayed: t, y, N, beta, gamma. As the second argument, we must specify the integration interval that is looking for a solution. For example, from 0 to T. The third argument is the initial conditions S0, I 0, R0. These are the three required arguments for solving solve_ivp. Finally, the value True is used for the dence_output argument. The result of the code is shown in Figure 8. The resulting corresponding solution is stored in the sol variable, as shown in the following figure. Sol is a solver, i.e. a function created by solve_ivp. It allows you to calculate all the necessary equations S, I and R from the value of T. The code for saving the solution to the variable sol is shown in Figure 9. You can change the input parameters of a task using the interaction function from the IpyWidgets module of the Python programming language. The sliders that change the value of the S, I, and R equations have a def react_sir function with beta and gamma arguments. The interaction function has three arguments. The first is the name of the function (interact_sir), the next two arguments are defined as beta and gamma. The interactive activation code is shown in Figure 11.