key: cord-0722850-trij72nt authors: Vyklyuk, Yaroslav; Manylich, Mykhailo; Škoda, Miroslav; Radovanović, Milan M.; Petrović, Marko D. title: Modeling and analysis of different scenarios for the spread of COVID-19 by using the modified multi-agent systems – Evidence from the selected countries date: 2020-12-09 journal: Results Phys DOI: 10.1016/j.rinp.2020.103662 sha: 561a38bf6a29a35a8c005ab7611182561b422699 doc_id: 722850 cord_uid: trij72nt Currently, there is a global pandemic of COVID-19. To assess its prevalence, it is necessary to have adequate models that allow real-time modeling of the impact of various quarantine measures by the state. The SIR model, which is implemented using a multi-agent system based on mobile cellular automata, was improved. The paper suggests ways to improve the rules of the interaction and behavior of agents. Methods of comparing the parameters of the SIR model with real geographical, social and medical indicators have been developed. That allows the modeling of the spatial distribution of COVID-19 as a single location and as the whole country consisting of individual regions that interact with each other by transport, taking into account factors such as public transport, supermarkets, schools, universities, gyms, churches, parks. The developed model also allows us to assess the impact of quarantine, restrictions on transport connections between regions, to take into account such factors as the incubation period, the mask regime, maintaining a safe distance between people, and so on. A number of experiments were conducted in the work, which made it possible to assess both the impact of individual measures to stop the pandemic and their comprehensive application. A method of comparing computer-time and dynamic parameters of the model with real data is proposed, which allowed assessing the effectiveness of the government in stopping the pandemic in the Chernivtsi region, Ukraine. A simulation of the pandemic spread in countries such as Slovakia, Turkey and Serbia was also conducted. The calculations showed the high-accuracy matching of the forecast model with real data. The COVID-19 epidemic has spread around the world [1] over the past six months. This virus can be transmitted from person to person by airborne droplets, similar to other viruses. Its feature is great resistance to external factors. It settles on plastic and metal surfaces and can exist in this state for several days [2, 3] . Similar to other viruses, COVID-19 is characterized by an incubation period during which the infected person does not experience signs of the disease, but may infect others. This period was estimated at 5.1 days [4] [5] [6] . There are no drugs that can treat this virus today. Therefore, the main means of combating this disease is a set of measures that reduces the likelihood of transmission of the virus from one person to another. Such measures include the use of masks, quarantine, discontinuing public and long-distance transport, blocking areas and settlements where there are outbreaks of the disease, border closures, restrictions on supermarkets, schools, universities, shops, bazaars, museums, restaurants, parks, gyms, etc. [7] . However, the impact of such measures is difficult to assess mathematically, because they are in most cases of a recommendatory nature and their implementation depends on individuals. It is advisable to simulate and assess organizing or planning any epidemic prevention measures before their implementation. In other words, all the possible ways of spreading a viral infection should be simulated in real time without the involvement of real people. This will determine the optimal strategy for the government to minimize critical losses among the population and prevent the economic downturn as a whole. At first, the goal of the investigation was to establish the relationship between the empirical parameters of the existing epidemic models-simulators and the real parameters of social systems, which will allow them to apply to the modeling of real territories (cities, regions, countries). The second task is to improve the models by taking into account the specific features of the spread of COVID-19 and the peculiarities of the functioning of different areas, which will simulate processes such as quarantine, mask regime, the impact of public transport, supermarkets, schools, churches, etc., and assess the impact of different measures to spread the epidemic. The third aim is to apply the developed model to assess the spread of COVID-19 and the impact of various factors preventing this epidemic for real cities, regions and countries. This problem can be attributed to the class of behavioral modeling problems in order to make both group and centralized decisions, as well as multi-agent optimization. [8] It is convenient to use epidemic models (SIR-model) to model the spatial spread of the viral infection. There are two approaches to modeling the following situations:  Analytical, which involves the solution of systems of differential equations. The advantage of this method is the speed of calculations (provided the existence of software). The disadvantage is that the result, as a rule, is a statistical data on the dynamics of the infection and does not allow to spatially represent the spread of an infection and is also difficult to improve the model [8] , [18] . There is a large number of modifications of these models. In particular, the SEIR model, which uses four classes of the population: susceptible-exposed-infectious-recovered [11] . These models are best suited to describe the spread of diseases with a long incubation period related to the COVID-19 outbreak. The dynamic influence of various factors on the SEIR model was investigated [12] . Sensitivity analysis of these models was performed [13, 14] . The power measures for the spread of COVID-19 were investigated [15] . A special model was developed and presented [16] in order to evaluate various control measures in China. It is known that many patients do not visit a doctor, or the lack of tests does not allow to assess the real statistics of the disease. This situation was modeled [17] . The paper [19] describes the mathematical modeling and the dynamics of a novel corona virus (2019-nCoV). Authors describe the brief details of the interaction among bats and unknown hosts, then among the individuals and the infections reservoir (seafood market). In the paper [20] , the authors develop a mathematical model to explore the transmission dynamics and possible control of the COVID-19 pandemic in Pakistan, one of the Asian countries with a high burden of disease with more than 200,000 confirmed infected cases so far.  Discrete, based on the theory of multi-agent systems, can be implemented either by cellular automata or molecular dynamics approach. Cellular automata well model the propagation of such spatial processes as fires, floods, etc. They are relatively fast. However, they cannot model the behavior and movement of an individual agent. Molecular dynamics approaches assume that each individual person represents an agent that moves within a limited area and interacts with other agents according to certain rules [21, 24] . This method is the most adequate, but slower, and shows the best results both in visualizing the spread of infection and in statistical results. The disadvantage is the dependence of the result on the random number generator, which leads to different simulation results under the same initial conditions. Therefore, the resulting model should be created as an ensemble of models that can be parallelized on different cores or computers. The advantage of these models is also easy adaptability, the ability to make changes during the experiment in real time and the ability to improve the simulation system without many changes in the program code [9, 10] . There are many different modifications of these models in particular: models of social force give a more accurate description of pedestrian traffic [25] . In these models, each agent tries to achieve the desired speed while maintaining a certain distance from other agents. The influence of neighboring individuals on the pathogen is described by socio-psychological force. This approach can be used to describe the complex dynamics of a crowd that involves several interacting people. Models of social force can be used to study the dynamics of infection in the crowd and in real conditions. For example, a model of social force was used to describe the spread of the infection in aircraft [26] . However, more complex agent-based models can yield results that are in good agreement with simpler ODE models [27] . A special type of multi-scale modeling has been developed that aims to combine mechanisms of different scales of space and time [28] to model large systems. A hybrid discrete-continuous model of agents was considered in the paper [29] . Such models are used to model biological systems [30 -34] Modern computer tools allow us to quickly model the system, which contains several thousand agents, by the molecular dynamics. Therefore, the last of the analyzed approaches is perhaps the most adequate for solving our problem. One of the most important aspects of simulation is the comparison of computer time and linear dimensions with the corresponding real-world data. When simulating a real city, such quantities as S and N are given empirically. All other parameters are calculated by scaling the real geographical scale and statistics of the settlement. In particular, if the city's population is , and its area -, then, on average, N people of the settlement live on area: = . If in the simulation model this area is presented in the form of a square with side L = 1, then it will correspond to the actual size: = . Then the distance required for the infection will be determined as: where -the real distance in meters needed to infect people. This value is known in medical directories and depends on the type of a virus being simulated. Similarly, the speed of people movement is calculated. Assuming that the average human speed is , in the simulation model it will correspond to the speed: The next step is to determine the duration of one iteration. It must be such that in one iteration a person cannot cover a distance greater than d, because in this case, the agents moving toward him will slip through each other without interaction. Too little time -significantly slows down calculations. This value allows us to compare the actual duration of the disease: where -the real average duration of the disease. The values of p and P R can be obtained from the analysis of medical statistics. They are known for most diseases. Either a virtual square area or the shape identical to the real one is created to analyze the spread of an infection on the basis of multi-agent systems. Next, the positions of the agents (L) within this area, their initial velocities and statuses are generated using the random number generator with a normal distribution: ), = = 1, ( , , , , , where -agent coordinates, -agent speed, -agent status, -number of people , , infected by this agent (r = 0 at the initialization stage). All the agents in the first step of the iteration have the status S, as a rule. One or more agents located in specific positions are given the status I (depending on the initial conditions of real inflammation). Depending on the type of a disease, some agents may have R status in the first iteration, which is interpreted as immune-susceptible (having immunity). The next step is to simulate the movement of people. To do this, according to the calculated time dt at each iteration, the agent is moved to a distance ). = ( + , + ) After calculating the position of the agents in the next step of the iteration, the following situations are possible: 1. The agent is near or crossed the simulation border. In this case, it is possible to either simulate the specular reflection (change the sign of one of the velocity components to the opposite), or direct the agent in the opposite direction (change the signs of both velocity components to the opposite) 2. The uninfected agent has entered the dangerous area of the infected agent. The following two situations are possible in this case: a. No action is taken to the agent if it has the status R. b. If the agent has the status S, the value z is determined by the generator of random numbers . If , then the person is marked infected and is assigned the status = [0,1] < I, and the value of r of the infected agent increases by 1. The future time of a particular agent illness is calculated , where -random number within : = + 2 • ( -0.5) , -possible range of illness duration, which is a known value for various viruses. [0,1] 3. People collided approaching at a dangerous distance. In this case, it seems most logical to ignore such a situation and allow the passage person through a person. Because, a person is more likely to avoid a collision and continue their movement in the previously planned direction in real life. At the same time, it is possible to simulate an "elastic collision", when velocity vectors change their signs to the opposite. This situation is possible with a large crowd of people, like near the stage, supermarket, schools, universities, transport, church, etc. 4. If agent status is I and time of illness a random number is determined: . If ≥ = [0,1] the agent is recovered, i.e. changes state to R, otherwise it dies and is removed from the > calculation. The simulation continues until all the infected agents recover or die. However, after each iteration step, we can change the model parameters. This allows us to simulate and analyze the impact of various measures to prevent the spread of a pandemic. Modification of the model based on mobile cellular automata provides: 1. Modification of the rules of the interaction of agents (infection, mask regime, etc.) 2. Modification of agents' behavior (isolation, quarantine, public places with close contact, conscious observance of safe distance by agents, movement between regions and international movements of agents, etc.) 3. Modification of the state of agents depending on the time (course of the disease, incubation period, etc.) Isolation involves the creation of conditions under which a sick agent cannot infect others. This can be realized either by additional status and verification at each iteration step, or by creating another simulation area (isolator, home quarantine) in which all sick agents will transfer, and allow them to move and interact according to classical rules. The agent will transfer to the initial simulation area after recovery. In real life, it is not possible to detect and isolate all sick agents due to the incubation period and the possibility of asymptomatic disease. It is necessary to enter an additional parameter -incubation period, to take these factors into account. During this time the infected person does not notice symptoms of the disease, is not isolated, and is able to infect others. The value of this parameter is determined taking into account the real and well-known time for various diseases : To take into account the asymptomatic course of the disease, it is sufficient at the time of initialization to assign each agent an additional binary status , which will determine how this agent will feel the illness in case of infection (True -asymptomatic, False -with symptoms). This status will be determined depending on the likelihood of asymptomatic disease , which is a known medical quantity for various diseases. where random variable. = [0,1] If the agent will not be isolated in case of infection. = Another important value is the number of infected agents at which isolation begins . If the total number of the infected agents is less than the isolation process does not begin. Quarantine assumes that a certain percentage of people will stay at home. However, the agent will be able to be in contact with people who buy products or who are their guests. To simulate this, it is sufficient during the initialization of the agent (or during the experiment) to assign its speed components to zero values =0. , A common feature of these facilities is that they are places with a large concentration of people in a short time, and where the distance between individuals is smaller than critical for the infection. This can be modeled as follows. An empirical probability of visiting public places for the agent is introduced. The not-quarantined agent moves to the center of a simulated cell with probability at each iteration step. This center simulates a public place (regardless of the type). Agent's previous coordinates are remembered. During the time , depending on the type of a public place, it is allowed to move freely around the center. After this time, the agent returns to its coordinates. The difference between these places from the previous ones is that in this case people simply slow down their speed, which leads to a greater concentration of people in a certain place. This can be simulated by reducing the velocity components in case the agent hits a certain area of the simulated cell. One of the most effective ways to prevent the spread of the infection is to consciously keep a safe distance. It is sufficient to introduce a "socio-psychological force" similar to Coulomb's law to simulate this. In this case, by charges we mean the degree of unwillingness of an individual to stand near each another, k -repulsion coefficient (determined empirically), r -distance between people. It is necessary to calculate the total force acting on the agent by all other agents to account for this force: . Next we need to calculate the acceleration: In this case, mass means the empirical inertia of a person. The displacement of the agent is defined as: ) . It is convenient to supplement the existing multi-agent system, which will simulate the capital with additional autonomous multi-agent systems with their own agents and rules of interaction to model large territorial associations such as regions or countries. These autonomousalone systems will simulate regions and can exchange agents. As a rule, agents move to the capital for a short time and then return. Agents located in the capital can visit any region. There is a small probability that agents can move directly from one region to another. These transfer data can be obtained from the relevant government agencies. For adequate modeling it is necessary to correctly determine the scale of multi-agent systems and their population: where -the number of agents in the simulated region, -population of the region, population of the capital. -the length of the capital multi-agent system edge (as a rule ), = 1 -area of the region, -area of the capital. The probability of transfer of a single agent at each iteration step is determined to model the traffic flow between regions. Also, the length of stay in the capital or other region is determined. As a rule, this time should be within the day of real time. The above probability can be determined from the analysis of traffic statistics in the relevant government agencies. It is known that a large number of people travel by bus, train, and other public transport. In the case of traveling by car, the goal as a rule is to visit a public place. Therefore, when simulating a transfer, the agent moves to the center of another multi-agent system that simulates a public place with close contact. Departures and arrivals of people from abroad are simulated by removing agents, or creating new agents directly in the center of the multi-agent system. The proposed model will simulate as long as there are no infected agents. It allows us to simulate different situations during one simulation. As mentioned above, model ensembles must be used to obtain a stable result. In the analysis of different scenarios, it is sometimes necessary to run a simulation model, not the first iteration, but from a certain fixed point in time. Therefore, the generation of multi-agent systems by object-oriented programming language allows us to save all the objects on the hard disk at any time during the simulation and use them as initial values in the subsequent analysis of various situations by methods of model ensembles. The output data of the model are the dynamics of the indicators such as the total number of the infected, healthy, diseased, and dead agents. Such statistics can be conducted both by individual regions and in general, for the whole model. The proposed model makes it easy to calculate these indicators by simply summing and checking the status of the agents. It is enough to proportionally increase the dynamic indicators to the real population data of the simulated system to compare the results. An important indicator of the dynamics of the epidemic is the basic and the effective 0 reproductive number . The basic reproduction number (R 0 ) is used to measure the transmission potential of a disease. It is the average number of secondary infections produced by a typical case of an infection in a population where everyone is susceptible. In general, for an epidemic to occur in a susceptible population R 0 must be >1, so the number of cases is increasing. In many circumstances not all the contacts will be susceptible to infection. This is measured by the effective reproductive rate (R). R is the average number of secondary cases per infectious case in a population made up of both susceptible and non-susceptible hosts. If R>1, the number of cases will increase, such as at the start of an epidemic. Where R=1, the disease is endemic, and where R<1 there will be a decline in the number of cases. The effective reproduction number can be estimated by the product of the basic reproductive number and the fraction of the host population that is susceptible (x). In General, the functional diagram of the algorithm for modeling and decision making is as follows ( Figure 1 ): As can be seen from the figure, the input variables can be divided into two types: characteristics of the territory (area, shape, number of agents) and characteristics of the agents -a set of agents with unique characteristics. You can dynamically influence the characteristics of the agents, enter new ones, or remove agents in real time during the simulation experiment, save and restore data. This will allow you to simulate and analyze in real time the effectiveness of certain actions. The output data are statistics on the number of the infected agents and effective reproductive number. The following simulations were performed to analyze the spread of COVID-19 from various factors. Simulation 1 (basic). People move freely in the city. The incubation period is about 10 days and the time during which a person fully recovers is on average 1 month from the onset of the disease are taken into account. It is estimated that 20% of people carry the disease asymptomatically, i.e. they move freely and can infect other people. Simulation 2. Increasing the distance between people at which infection is possible. This means a more active virus, which can affect twice the distance by airborne droplets. That is, one person can infect another at a greater distance. Simulation 3. Reducing the likelihood of infection in the case of close contact with an infected person. Simulate the improved hygiene (hand washing), adherence to the mask regime, etc. Simulation 4. Quarantine. It is estimated that 80% of people stay at home. The other 20% are free to move around the city and contact with all other agents. Simulation 5. The presence of points of mass close contact between people. This includes the presence of supermarkets, schools, universities, churches, transport, gyms, businesses such as construction sites, and so on. Simulation 6 Isolation of patients. Simulate that infected people will be isolated in hospital or at home which prevents contact with healthy people. Simulation 7 Increasing the number of people who carry the disease asymptomatically to 50%, i.e. those who do not seek medical attention and are able to infect others and taking into account the isolation of patients. Simulation 8. The presence of a center of attraction in the city. These are places where people tend to reduce their speed, which leads to forming crowds. For example, parks, bazaars, etc. Simulation 9. A conscious attempt by humans to maintain a safe distance equal to the distance from experiment 2. The coefficients of the models are present in the table 1. The simulation results are presented in Figure 2 . As it can be seen from the graph, an exponential increase in morbidity at the initial stage is observed there, which gradually reaches saturation for the basic experiment. Then there is a decline due to a decrease in the number of people who are not immune and can get sick. 61 91 121 151 181 211 241 271 301 331 361 391 421 451 481 511 541 571 601 631 661 691 721 751 781 811 841 871 901 931 961 991 1021 1051 1081 1111 1141 1171 1201 1231 1261 1291 1321 1351 1381 1411 1441 1471 Active cases Simulated time Sim3 Sim4 Sim5 Sim6 Sim7 Sim8 Sim9 Fig. 2 . Dynamics of the active cases, patients number for different simulations In the case of an increased virus activity (simulation 2), the peak incidence increases almost twice. Moreover, the peak of the incidence also occurs twice as early. That is, there is a critical epidemic with overcrowding, and critical mortality. Conscious hygiene and mask regime are one of the best key deterrents to the pandemic (Simulation 3). As can be seen from the graph, the maximum number of patients is reduced by about half, and the epidemic process itself stretches over time. The peak of the epidemic is shifted in time by 1.5 times. This allows us to prepare and unload doctors. A similar effect from the quarantine measures implementation (experiment 4). Despite the 20% of people who are able to move freely, the effect of quarantine is similar to conscious hygiene. The presence of supermarkets, schools, universities, churches, public transport and others (simulation 5) has an effect similar to Simulation 2. The greater the opportunity to have close contact with other people, the more critical the pandemic will be. Therefore, the elimination of such phenomena is one of the main factors controlling the disease. The possibility of isolating sick people is a primary factor in stopping the disease (simulation 6). This can significantly reduce the number of the infected and reduce the time of the pandemic. However, the presence of an incubation period and a large number of people who do not seek medical attention can completely offset the effect of isolation (simulation 7). Therefore, informing people about the symptoms and preventing self-medication is an important factor. The presence of parks, bazaars, etc. creates an effect similar to the functioning of supermarkets and public transport (simulation 8). Therefore, the isolation of parks and crowded places is also an important deterrent to the pandemic. However, the most effective way to prevent a pandemic is for people to keep a safe distance from each other. In this case, the number of active cases of sick patients will not exceed 4% of the population. And this is only due to the random fluctuations for all the indicators. If they are eliminated or the distance is greater than allowed for the spread of the virus, the epidemic will stop without starting after recovery (or death) of the first patient. Statistics shows interesting results too (Table 2 ). So the presence of supermarkets or parks will lead to the fact that about 70% of people get sick, as well as in non-compliance with the mask regime. However, the peak number of patients will be halved. It should be noted that in these three simulations (2, 5, 8) , the highest mortality is observed. The most effective way to prevent infection after Sim 9 is to isolate patients in any way (Sim 6). At the same time the minimum both on the maximum number of patients, and on the number of not sick people is observed. Similar results are for quarantine simulations (4). The maximum number of patients is low, but a large number of people will get sick. The next step was a series of simulations using a set of measures to stop the pandemic. To do this, a critical pandemic was simulated as a baseline scenario in the absence of any prevention measures (Simulation 1). The work of transport, hospitals, supermarkets, schools, universities, churches, bazaars, etc. was taken into account. Next, the cumulative impact of the alternate involvement of different sets of measures to stop the pandemic was analyzed. In particular: Simulation 2. Influence of only a mask regime and strengthening of hygiene. Simulation 3. Additionally, public transport stops, and restrictions are imposed on the operation of supermarkets, schools, universities, and churches. Simulation 4. Additional ban on visiting crowded places, such as bazaars, parks, squares, gyms, etc. Simulation 5. Adding strict quarantine measures, where the vast majority of people have to stay at home. Simulation 6. People keeping a distance greater than the distance of the virus from the infected person. The impact of these simulations was studied for three cases: 1 -if they were used at the beginning of the pandemic (Fig. 3) , 2 -in the midst (Fig. 4) , and 3 -just before the maximum incidence (Fig. 5) . The coefficients of the models were chosen analogously to 37 55 73 91 109 127 145 163 181 199 217 235 253 271 289 307 325 343 361 379 397 415 433 451 469 487 505 523 541 559 577 595 613 631 649 667 685 Active cases 1 18 35 52 69 86 103 120 137 154 171 188 205 222 239 256 273 290 307 324 341 358 375 392 409 426 443 460 477 494 511 528 545 562 579 596 613 630 647 664 681 698 Active cases Simulated time Simulation 1 Simulation 2 Simulation 3 Simulation 4 Simulation 5 Simulation 6 Figure 5 . The dynamics of the active cases of sick people depending on the set of measures that begin at the max of the pandemic As can be seen from the figures, in all the three cases, the use of only the mask regime in the event of a pandemic has little effect on the dynamics of the number of active cases on sickness. As these and previous experiments have shown, one of the most effective prevention measures has been to stop traffic and restrict the operation of supermarkets, schools, universities, and churches in conjunction with the mask regime. Involvement of such measures slows down the spread of the virus. However, adding additional blocking of places of congestion (parks, bazaars, gyms) to these measures practically did not affect the pandemic. That is, it is quite effective, if you apply only this measure, as shown in previous experiment. However, if we consider the cumulative effect of various measures to stop the pandemic, the latter was not effective in such a complex. The involvement of additional measures of strict quarantine halves the speed of the virus's spread. This set of measures is extremely effective, reducing the spread of the virus by four times. The involvement of an information resource, the result of which is the conscious observance of distances between people, almost immediately stops the pandemic. If we estimate the beginning of the measures application, as can be seen from the figures, their application at the beginning of the pandemic can significantly reduce the number of sick people and not overload hospitals. The sooner these measures start, the more efficient they will be and the fewer they need to use. If you start to prevent pandemic at its midst, it is necessary to use maximum effort to stop it. Conversely, if we start preventing the pandemic, when it comes to the maximum of active cases -none of the methods will give a significant effect, because most people would be sick and it would be too late to do anything. The disease stops itself with the maximum number of fatal cases. An interesting conclusion is that regardless of the set of measures and their onset, the duration of a pandemic is almost unchanged. Only the absolute number of active cases changes. This is due to the duration of illness and the presence of an incubation period. Therefore, the following conclusions can be drawn: 1. The most effective complex of activities is: public transport stops, restrictions on the work of supermarkets and churches, strict quarantine and conscious observance of safe and secure distance. It is ineffective in the closure of places where people will slow their movement, but adhere to a safe distance: parks, bazaars, etc. Regardless of the set of measures, the total duration of a pandemic is almost unchanged. The next important step is the completion of quarantine measures. After all, it is important to remember that there are always unregistered infected people who can cause a second wave of a pandemic. Such infections include people in the incubation period and people who carry the disease asymptomatically or in a mild form and do not seek medical attention. To test this hypothesis, the situation was simulated when quarantine measures were initiated at the beginning of the pandemic, and were completed when the vast majority of patients were discharged from hospital. The data for the experiment are presented in Table 3 . The missing data in the table are similar to the base model of Table 1 . The results are presented in Figure 6 . It should be noted that the presence of sick people in hospitals means the presence of unregistered carriers of the disease beyond. The abrupt abolition of quarantine instantly leads to a second wave caused by these people. This wave will be 1.5-2 times larger than the previous one and will last the same as the first wave. After the second one, a small third wave is possible, as can be seen from the graph. However, it will no longer be significant. Therefore, the exit from quarantine should be gradual with the constant fixation of new diseases. The following were taken into account to model the spread of COVID-19 virus in Chernivtsi region Population of Chernivtsi City and all the districts of the region; 2. Density population of the regional center and districts; 3. Social distance between people; 4. Duration of illness; 5. The probability of disease in people's contacts; 6. Mortality rate; 7. Presence of places of the accumulation of people (supermarkets, schools, universities, pharmacies, markets, construction objects); 8. Percentage of people who tolerate disease asymptomatically; 9. The presence of isolation procedures for sick people; 10. The possibility of moving people from the district to the regional center and back; 11. People's observing of the necessary distance. The regional center, which recorded the first case of the disease, and Khotyn District, which made the second source of the disease according to statistical data, acted as the start-up infection. A strict mask regime, restrictions on shopping, closure of schools and universities, quarantine, the ban of all the public events, gyms, cinemas, cafes and restaurants were applied to prevent the coronavirus epidemic in Chernivtsi region. Chernivtsi region is a border region, so the main sources of the infection arose in those villages where workers returned from Europe. Therefore, the question of the effect of closing villages where there were cases of coronavirus was investigated. Two scenarios for spreading of the infection were modeled: 1. Between villages and districts, people can freely move around 2. 10-Times movement restrictions (10 cars or people) The models coefficients of Chernivtsi region are similar to the ones in Table 3 . In addition, autonomous 11 multi-agent systems were initialized, modeling the districts of Chernivtsi region (Table 4 ). Their population and size was defined according to the above formulas. The probability of transfer in quarantine was , accordingly, when the transfer was restored, it was = 0,001 increased 10 times. The results of the active cases dynamics are presented in Fig.7 and in Table 5 . The graph presents the relative number of sick people (vertically). Time (horizontal axis) -The computerized time of simulation. The table presents the grouped statistics obtained by simulating the spread of the virus. It should be noted that the values of the columns "Open villages", "Closed villages" may change slightly after agreeing with the real statistics, as these calculations were made at the beginning of the epidemic. However, this will have little effect on the overall conclusion (columns "Relative change of indicators"). When calculating the values in the case of limited movement of people were taken as 100%. That is, we analyzed how much the situation will change when the restrictions on movement are removed. (That is, if the number of people, for example, increased from 10 to 30 -3 times, the relative number is ) 30 -10 10 = 200% During the simulation, the following was found: 1. In open traffic -about 76% of the population gets sick. With limited traffic, residents of Chernivtsi and large communities will be affected. Most small villages either completely avoid the disease or quickly curb its spread due to self-isolation and low population density. In total, 28% of the region's population will fall ill. That is, 175% more people will get sick with no traffic restrictions, which is 2.7 times more; 2. The peak load of the infected will increase by 360%, i.e. 4.6 times. Given this peak, it must be understood that hospitals will be overcrowded and most people will be treated at home. This will significantly increase mortality; 3. The total mortality will increase by 164%, i.e. 2.6 times (!); 4. With restricted traffic, the number of people who avoid infection will increase from 24% to 72% 5. As can be seen from the graph -when traffic is restricted (red curve), the dynamics of the incidence will last longer, but without a significant load on hospitals. During the month of quarantine, the Chernivtsi region suffered great economic losses, so one of the first steps in easing the quarantine was to open a construction business. It should be noted that this occurred at a time of sharp increase in the infection. According to UkrStat, 18.9 thousand people are involved in the construction industry of Chernivtsi region, which is 2.1% of the region's residents. The specified number of people will move to regional and district centers in case of the resumption of this business. This, in turn, will increase contacts between people. A series of simulations on the development of morbidity was carried out, both taking into account the restoration of construction and without restoration with the help of ensembles consisting of 5 simulations of each of the models to assess the consequences of such actions. The simulation was performed as follows: according to the model of the previous experiment, the scenario of closed villages was modeled. At the computer time, which corresponded to the date of April 6, 2020, 2.1% of agents were allowed to move daily to the center of a multi-agent system that simulate the capital of the region. At the end of the day, the agents returned to their regions, or to the place of the previous location, if the agent lives in the capital. The simulation took into account the compliance with sanitary norms in the workplace, in particular, the compliance with the mask regime. The simulation results are presented in the figure 8. As can be seen from the figure, according to the results of modeling without resuming construction, the number of patients per week will increase from 246 to 382 (136 people). The restoration of the construction business without the compliance with sanitary norms will increase from 246 to 638 (392 people). That is, in the case of the resumption of construction, the total number of patients at the end of the week (04/12/2020) will increase by 67% (from 382 to 638). Therefore, the construction was resumed with the obligatory observance of the mask regime and checking the temperature of the workers. Despite this, as can be seen from the figure, this led to an increase in the infection, although not as rapid as in the case of non-compliance with epidemiological norms. One of the strategies that was practically used to prevent the spread of the virus in Chernivtsi was to declare a strict quarantine for 1.5 days. According to this strategy, people stay at home at the weekends and do not visit grocery stores. This leads to the elimination of contacts and, consequently, to the emergence of new infected cases these days. However, in practice, there were long queues noticed in front of grocery stores and supermarkets on Fridays and Saturdays, which greatly increased the likelihood of human infection. Three scenarios were simulated to assess these restrictive measures: Simulation 1. No additional restrictions are imposed at weekends. Simulation according to the basic experiment of Table 1. = 0.8 Simulation 2. Additional restrictions are applied. (There are no queues in stores the day before). At the time corresponding to 13:00 on Saturday and until 8:00 on Monday, the coefficient is assigned the value 1 (100%). Simulation 3. Additional restrictions are applied and queues in stores the day before are simulated. To do this, on Friday and Saturday at 13:00 the infection rate is doubled p=0.2. The simulation results according to the data on 04/09/2020 are shown in Figure 9 . Unfortunately, there is no information in the statistical information resources about the residents of Chernivtsi, as the city's hospitals were overcrowded with the residents of the regions. Therefore, it was not possible to compare the forecast data with the statistics. As can be seen from the figure, the dynamics of patients is almost the same in the absence of queues on the eve of the weekend and on Saturday (red curve), from the situation when no additional restrictions are introduced (blue curve). Deviations are within the allowable error. However, the presence of queues on the eve of the weekend leads to an increase in the incidence rate (gray curve). In particular, at the end of the week, according to Simulation 1, the number of patients will increase from 44 to 49 (5 people per week). In the case of Option 3 -from 45 to 60 (15 people per week). That is, the introduction of such restrictive measures will increase the number of patients by 21% per week. So we can conclude that even if the residents are informed in advance about the closure of supermarkets at weekends (i.e. the elimination of excitement and queues) and curfew -such actions will not lead to any effect. Figure 10 shows the results of modeling the spread of COVID-19 virus in the Chernivtsi region during the Easter holidays. It is known that at this time the church of the Moscow Patriarchate encouraged the faithful to visit the church despite the height of the pandemic. To assess the consequences of such actions, a simulation of 2 scenarios was performed: 1. Scenario in case of a complete ban on church attendance 2. Mass church attendance on Palm Sunday and Easter It was taken into account that according to SBU estimates, about 12,500 residents visited the region on Palm Sunday and 8,500 on Easter, to take these factors into account. It is enough to increase the probability of the infection to p = 0.2 in these 2 days, to model such events. In this and subsequent experiments, the choice of empirical parameters was determined by minimizing the root mean square error between model predictions and real data. As can be seen from the figures, the dynamics of the incidence would gradually begin to saturate in the absence of church attendance. The massive involvement of people in church attendance, and consequently the lack of safe distances and the sharp weakening of the hygienic norms that people adhered to these days, has led to a catastrophic increase in morbidity. Thus, the chart clearly shows the sharp jumps in the number of new patients directly related to holidays. The total number of patients due to these events as of April 29, 2020 doubled (from 686 to 1,418 people) compared to if the conditions of quarantine were not violated on holidays. In Slovakia, on April 15, there were 863 infected people, 6 people died, and 159 already recovered, 121 people were in hospital, 16 in critical state, 5 of them on ventilation machines. Generally, the biggest problems were in two groups: 1. Gypsy communities. Many of them came back from abroad (especially from the UK), they live in gypsy villages, they do not have hygienic standards. They do not follow rules that are set (about rules later in this document); 14 gypsy villages are completely locked out, controlled by soldiers and the police. They can go in, but they cannot go out. Nearly half of the infected people are from gypsy communities. 2. Nursing homes. There are two nursing homes in Slovakia (both in the city of Pezinok, 30 km from Bratislava). There was an infection that widely spread among the senior citizens from these homes; 4 of 6 documented deaths were from these two nursing homes. The first case of coronavirus in Slovakia was registered on March 6, 2020. It was a man, 52 years old, who came back home from skiing in Italy. He lives 20 km from Bratislava, in the city called Malacky [36] . The following development of cases you can see on the web page From March 8, all sport events, public events, shops, shopping malls were closed. The only stores that remained opened were grocery stores, pharmacies, gas stations and drugstores. After some pressure from entrepreneurs, on March 22, stores with gardening equipment were also opened. From March 15, it was obligatory to wear face masks outdoors, and in the stores as well. The areas of stores were divided by 25 m 2 . For example, if a store has 75 m 2 , the maximum number of people allowed in the store is three. Cash is avoided, and the use of credit cards is preferred. If they went outside, there were no other strict restrictions. Citizens were asked to stay at home if possible. They were not locked in their flats and houses like Italians or Spaniards. They could go for a walk to the nature (the distance of two meters between two people was recommended), and could travel to work or go shopping. The only lockdown was during the Easter weekend. It was not allowed to travel outside the border of counties from Wednesday, April 8, till Monday midnight, April 13. Unfortunately, the prime minister made a big mistake. He informed the people two days before, so the people left Bratislava on Tuesday (the day before the announced lockdown). The borders of Slovakia were closed. The only possibility to travel was for pendulaters, who work at the maximum distance of 30 km away from the borders (especially in Hungary, Austria, and Czech Republic). The people who came back home from abroad had to go to 14 days' quarantine. This rule was in force from March 13. It was not possible to stay in quarantine at home. There were two main epicenters in Slovakia -Bratislava (approximately 20% of the infected people) and gypsy communities (approximately 50% of the infected people -travelers). The simulation model was divided into 7 regions and the capital to model the situation in Slovakia: Bratislava, Trnava, Trenčín, Nitra, Žilina, Banská Bystrica, Prešov, Košice. The population of the agents and the dimension of autonomous cells were selected in proportion to the actual data (table 6). The largest population of Gypsies lives in the regions of Košice, Prešov, and Banská Bystrica. As mentioned above, they are poorly compliant with hygiene standards, so in the model for these regions, the probability coefficients of infection p were increased in proportion to the percentage of the Roma population in these regions. In Bratislava, as the capital with the highest control, the probability of infection was halved. The initial infection was modeled in these regions and the capital. Other coefficients of the model are shown in table 7. Four experiments with five simulations were performed. The results of forecasting patients as of 05/06/2020 are shown in the Figure 11 . As it can be seen from the figure, the results of the growth of the number of patients are almost identical to the real data. The dynamics of the decline in the forecast data is somewhat slower. This can be explained by the fact that the model takes into account all the 100% of patients. In practice, it is not possible to test 100% of the population, so the actual rates of the active cases will be lower. An additional experiment was conducted to allow free movement of people between regions of the country to compare the effectiveness of quarantine measure. To do this, the traffic flow was increased 10 times. As it can be seen from the figure, the number of active cases will increase about three times in this simulation. The peak of the disease would fall on April 1, and the recovery process itself would stretch in time. Similarly, the effectiveness of other measures can be explored. Open Region Fig. 11 . Dynamics of active cases in Slovakia in comparison with real data Coronavirus control methods in Turkey were similar to those in Slovakia. Details can be found on the website of the Turkish embassy [37] . Therefore, the main difference is the size and population of the regions, as well as the initial source of ignition. As it is known, Turkey is divided into 11 administrative regions (West Marmara, Aegean, East Marmara, West Anatolia, Mediterranean, Central Anatolia, West Black Sea, East Black Sea, Northeast Anatolia, Central East Anatolia, and Southeast Anatolia) and the capital -Istanbul (Table 8 ). It is well-known that Istanbul airport is a huge terminal that could be a source of the virus in this country. Therefore, as the initial conditions of infection began in the agent system that simulates the capital, all other systems were infected by exchange agents. The coefficients of the model are given in Table 7 . Two experiments with five simulations were performed. The simulation results are presented in the Figure 12 . As it can be seen from the figure, the simulation results quite well match the real data. A feature of the resulting forecasting is the presence of the second wave of the disease. This may have happened due to the difficult terrain, connections between regions are difficult, and are carried out in most cases through Istanbul airport. That was taken into account in the model. This leads to high autonomy of the regions, due to which some of them will be able to avoid infection completely. The second peak occurs due to the fact that at the time of the decline of the epidemic and the weakening of quarantine conditions, one of the uninfected regions, where there are many non-sick agents, becomes infected. This leads to a local outbreak in one area. This can happen especially at the opening of the tourist season. The information about the status of the spread of COVID-19 and the main measures to prevent its spread can be found on a special website [38] . It should be noted that Serbia is a small country with four administrative regions: The Autonomous Province of Vojvodina (northern part of Serbia), Šumadija and Western Serbia, Southern and Eastern Serbia, the Autonomous Province of Kosovo and Metohija and the capital region -Belgrade (Table 9 ). The regions are connected by buses and have good transport links, which leads to the rapid spread of coronavirus throughout the country. The capital of the country, which is a tourist center and a major transport hub, was chosen as the source of ignition. The main coefficients of the simulation model are presented in Table 7 . The results of the simulation are presented in the Figure 13 . Fig. 13 Dynamics of active cases of infections for Serbia As it can be seen from the figure, the initial dynamics of the incidence completely repeats the real statistics. The difference, as in other calculations, is the slower decline of the predicted pandemic, which is due to both the delay in the detection of patients and the failure of many of them to see a doctor, and the presence of asymptomatic patients. The paper proposes methods for improving the multi-agent system for simulating the spread of a viral infection such as COVID-19. In particular, methods for comparing computer calculation time, dynamic parameters of a multi-agent SIR model with real time and such indicators as the number of active patients, mortality rate, effective reproductive number are proposed. This made it possible to build a simulation model as realistically as possible, which showed a sufficient level of adequacy and accuracy in predicting the spread of the pandemic. A modification of the classic multi-agent SIR model is proposed, which allowed to take into account the incubation period, people's keeping a safe distance when moving, simulated quarantine, isolation, visiting public places such as supermarkets, parks, churches, schools, gyms, model transport, construction sites, gyms, etc. A method of modeling large regions consisting of several administrative units by simulating a set of autonomous multi-agent systems is proposed. Ways to model the traffic flow between regions and taking into account the spread of the virus between them are proposed. The sensitivity of the model to various measures to prevent infection was analyzed, and both the absolute and complex effectiveness of these measures were determined. The most effective complex of activities is: public transport stops, restrictions on the work of supermarkets and churches, strict quarantine and conscious observance of safe and secure distance. It was shown that the closure of places where people will slow their movement, but adhere to a safe distance: parks, bazaars is ineffective. Regardless of the set of measures, the total duration of a pandemic is almost unchanged. The improved model made it possible to simulate and conduct forecasting of the spread of COVID-19 in Chernivtsi and Chernivtsi region and to evaluate the effectiveness of various measures of the regional state administration to prevent its spread, including opening construction sites and imposing strict quarantine at weekends. It was shown that in the case of the resumption of construction, the total number of patients at the end of the week will increase by 67%. It was obtained that if the residents are informed in advance about the closure of supermarkets at weekends and about the curfew -such actions will not lead to any effect. A simulation of the consequences of mass church attendance on Easter and Palm Sunday was conducted. It was obtained that the massive involvement of people in church attendance, and consequently the lack of safe distances and the sharp weakening of the hygienic norms that people adhered to these days, led to a catastrophic increase in morbidity. The total number of patients due to these events as of April 29, 2020 doubled compared to if the conditions of quarantine were not violated on holidays. The developed model made it possible to predict the spread of COVID-19 in the selected countries, such as Turkey, Slovakia, and Serbia. The obtained results showed good agreement with the experiment and allowed to predict the next wave of the disease spread. Thus, as an outcome of the research, it was possible to create and programmatically implement a unified SIR-model, which allows us to evaluate and simulate the processes of COVID-19 spread on real social systems of different sizes and structures (cities, regions, countries). The developed model allows taking into account various factors and features of the virus itself (incubation period, mortality rate, infection rate, etc.) and the peculiarities of the functioning of territories (traffic, public institutions, mask regime, transfer between territories, etc.). The great advantage of this method is the ability to adapt and to easily expand by taking into account new factors. The main disadvantages of this model include the inability to accurately compare the simulation results with the real data because the model makes it possible to accurately determine the number of patients in a computer model at any time. In real systems, this is impossible to do, since the tests are usually conducted by people with suspected disease, contact persons, travelers, or other small sections of the population. A huge percentage of people are untested. In addition, for a real complete comparison of the real data with the model, it is necessary for 100% of people to take tests several times per day. Despite this, the results showed both the adequacy and accuracy of the model. The continuing 2019-nCoV epidemic threat of novel coronaviruses to global health-The latest 2019 novel coronavirus outbreak in Wuhan Early transmission dynamics in Wuhan, China, of novel coronavirus-infected pneumonia Aerosol and surface stability of SARS-CoV-2 as compared with SARS-CoV-1 2020 The incubation period of coronavirus disease 2019 (COVID-19) from publicly reported confirmed cases: estimation and application Transmission interval estimates suggest pre-symptomatic spread of COVID-19 The epidemiological characteristics of an outbreak of 2019 novel coronavirus diseases (COVID-19) in China. Zhonghua liu xing bing xue za zhi= Zhonghua liuxingbingxue zazhi 41 models in epidemiology Some discrete-time SI, SIR, and SIS epidemic models On a quarantine model of corona virus infection and data analysis Global dynamics of a SEIR model with varying total population size Transmission dynamics of the COVID-19 outbreak and effectiveness of government interventions: A data-driven analysis 2020 The reproductive number of COVID-19 is higher compared to SARS coronavirus COVID-19 outbreak on the Diamond Princess cruise ship: estimating the epidemic potential and effectiveness of public health countermeasures Mathematical modeling of COVID-19 transmission and mitigation strategies in the population of Ontario 2020 Modeling the epidemic dynamics and control of COVID-19 outbreak in China Understanding Unreported Cases in the COVID-19 Epidemic Outbreak in Wuhan, China, and the Importance of Major Public Health Interventions On spatially explicit models of cholera epidemics Abdon Atangana Modeling the dynamics of novel coronavirus (2019-nCov) with fractional derivative Muhammad Altaf Khan Modeling the impact of non-pharmaceutical interventions on the dynamics of novel coronavirus with optimal control analysis with a case study Modeling infection with multi-agent dynamics largescale computational approaches to epidemic modeling: agent-based versus structured metapopulation models A cellular automaton model for the effects of population movement and vaccination on epidemic propagation A cellular automata model of epidemics of a heterogeneous susceptibility Social force model for pedestrian dynamics Self-propelled pedestrian dynamics model: Application to passenger movement and infection propagation in airplanes Survival dynamical systems: individual-level survival analysis from population-level epidemic models From within host dynamics to the epidemiology of infectious disease: scientific overview and challenges A hybrid epidemic model: combining the advantages of agent-based and equation-based approaches Hybrid approach to model the spatial regulation of T cell responses Bone marrow infiltration by multiple myeloma causes anemia by reversible disruption of erythropoiesis A complete categorization of multiscale models of infectious disease systems A complete categorization of multiscale models of infectious disease systems Multiscale, resurgent epidemics in a hierarchical metapopulation model A Contribution to the Mathematical Theory of Epidemics