Discrete simulation analysis of COVID-19 and prediction of isolation bed numbers

Background The outbreak of COVID-19 has been defined by the World Health Organization as a pandemic, and containment depends on traditional public health measures. However, the explosive growth of the number of infected cases in a short period of time has caused tremendous pressure on medical systems. Adequate isolation facilities are essential to control outbreaks, so this study aims to quickly estimate the demand and number of isolation beds. Methods We established a discrete simulation model for epidemiology. By adjusting or fitting necessary epidemic parameters, the effects of the following indicators on the development of the epidemic and the occupation of medical resources were explained: (1) incubation period, (2) response speed and detection capacity of the hospital, (3) disease healing time, and (4) population mobility. Finally, a method for predicting the number of isolation beds was summarized through multiple linear regression. This is a city level model that simulates the epidemic situation from the perspective of population mobility. Results Through simulation, we show that the incubation period, response speed and detection capacity of the hospital, disease healing time, degree of population mobility, and infectivity of cured patients have different effects on the infectivity, scale, and duration of the epidemic. Among them, (1) incubation period, (2) response speed and detection capacity of the hospital, (3) disease healing time, and (4) population mobility have a significant impact on the demand and number of isolation beds (P <0.05), which agrees with the following regression equation: N = P × (−0.273 + 0.009I + 0.234M + 0.012T1 + 0.015T2) × (1 + V).


Introduction
SARS-CoV-2 is a novel coronavirus that has the ability of human-to-human transmission 1,2 .

Coronavirus disease 2019 (COVID-19) caused by SARS-CoV-2 has been defined by the World
Health Organization (WHO) as a pandemic (the worldwide spread of a new disease) 3 . As of April 5, 2020, more than 1100000 cases of COVID-19 have been reported in different countries and territories 4 . Currently, researchers around the world are making every effort to clarify the biological and epidemiological characteristics of SARS-CoV-2 and strive to explore effective coping strategies [5][6][7] . COVID-19 is extremely contagious, and its explosive growth in a short space of time has caused tremendous pressure on medical resources 8 . Conventional medical conditions have difficulty meeting the needs of the detection capability for suspected cases and the number of isolation beds for treatment and isolation [9][10][11] . The number of isolation beds is crucial to reduce the scale of infection and reduce the number of fatalities. Too few isolation beds can lead to the continuation of the epidemic, and too many isolation beds may cause waste and environmental damage [12][13][14] .
To explore a reasonable number of isolation beds, we established a discrete simulation model of epidemics based on COVID-19. By setting different epidemic indicators (incubation period, hospital response time, healing time, population mobility rate), we analyzed the changing laws of the epidemic situation, peak value, and scale of the epidemic in different situations. In particular, we pay attention to the occupation of medical resources during the outbreak. We summarized some epidemic indicators related to the number of isolation beds through multiple linear regression and estimated the number of isolation beds through these indicators.
The conclusion is practical, which can provide support for the reasonable scheduling of medical resources and the search for effective solutions in the current outbreak or in similar future outbreaks.

Impact of incubation period on the epidemic development
The incubation period is an asymptomatic stage in the early stages of disease development, at which point patients themselves will not suspect that they have been infected. We compared the infection situation of different incubation periods. ANOVA showed that the mean values of all indicators among groups were not exactly the same (P<0.05). The detailed differences among groups are shown in Table 1.
Further analysis was performed using multiple comparisons. The maximum number of incubation cases, the sum of infected cases and the corresponding date for the peak number of inpatients were significantly different between any two groups (P<0.05). The long incubation period promoted these epidemic indicators. The maximum number of newly confirmed cases and their corresponding dates, corresponding date of peak incubation cases, maximum value of Rt, duration of the epidemic, and maximum number of inpatients were not exactly equal among the groups in different incubation periods, and there were significant differences among some groups (P<0.05). The above indicators increased with the increase in the incubation period. (Figure 1 ANOVA showed that there were no significant differences in the corresponding date of the maximum number of incubation cases among different response time groups (P>0.05), and the mean of the other indicators among the groups was not exactly equal (P<0.05). The detailed differences among the groups are shown in Table 1.
The multiple comparisons showed that the sum of infected cases between any two groups was significantly different (P<0.05). The sum of the infected cases increased with the extension of response time. The maximum number of newly confirmed cases and its corresponding date, the maximum number of incubation cases, the maximum of Rt, the duration of the epidemic, the maximum number of inpatients and its corresponding date were not exactly equal among the groups at different response times, and there were significant differences among some groups (P<0.05). The above indicators increased with the extension of the response time ( Figure 2).  Table 1.
Further multiple comparisons showed that the maximum number of inpatients between any two groups was significantly different (P<0.05). The maximum number of inpatients increased with the extension of the healing time. The maximum value of Rt and the corresponding date of peak inpatient number were not exactly equal among the groups at different healing times, and there were significant differences among some groups (P<0.05). The extension of the healing period promoted the increase in the above indicators ( Figure 3).

Impact of the population mobility on the epidemic development
The population mobility rate refers to the proportion of people in motion to the total population.
We compared the infection situation of different population mobility rates. ANOVA showed that there were no significant differences in the maximum value of Rt and the duration of the epidemic among the groups (P>0.05), and the mean of other indicators among the groups was not exactly equal (P<0.05). The detailed differences among the groups are shown in Table 1.
The multiple comparisons showed that the sum of the infected cases between any two groups was significantly different (P<0.05). The increase in the population mobility rate caused a higher sum of the infected cases. The maximum number of newly confirmed cases and its corresponding date, the maximum number of incubation cases and its corresponding date, the maximum number of inpatients and their corresponding dates were not exactly equal among the groups in different population mobility rates, and there were significant differences among some groups (P<0.05). Among them, the maximum number of newly confirmed cases, the maximum number of incubation cases and the maximum number of inpatients increased with the increase in the population activity rate. At the extreme value of 0%, that is, when everyone was inactive, the corresponding date of peak incubation cases and the corresponding date of peak inpatient number were significantly advanced, which was significantly different from that of the other groups (Figure 4).
. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted July 14, 2020.  is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted July 14, 2020. .

Impact of the hospital isolation capacity on the infection situation
The hospital isolation capacity is defined by the proportion of the actual quantity of isolation beds to the demanded quantity for isolation beds. ANOVA showed that there were no significant differences in the maximum number of newly confirmed cases, the maximum number of incubation cases and the maximum value of Rt among different isolation capacity groups (P>0.05), and the mean of the other indicators among the groups was not exactly equal (P<0.05). The detailed differences among groups are shown in Table 2.
The multiple comparisons showed that the corresponding dates of the peak number of inpatients and the duration of isolation facilities at their full capacity between any two groups were significantly different (P<0.05). The corresponding date of the peak inpatient number was delayed with the decrease in isolation capacity. The duration of isolation facilities at their full capacity increased with the lack of isolation beds, which showed a quadratic relationship (Supplement material). In addition, the corresponding date of peak newly confirmed cases, the corresponding . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted July 14, 2020. . date of incubation cases, the sum of infected cases and the duration of the epidemic were not exactly equal among the groups, and there were significant differences among some groups (P<0.05). In the severely inadequate isolation capacity group (40%), the corresponding date of incubation cases, the mean value of Rt, the sum of infected cases and the duration of the epidemic were significantly increased (P<0.05) ( Figure 5).

Multivariate regression analysis
To further explore the rational setting of isolation beds in the medical system under multifactor epidemic conditions, we analyzed the relationship between different epidemic indicators and a reasonable number of isolation beds by multiple regression analysis. The t-test showed that the independent variables of incubation period, population mobility rate, hospital response time and . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.
Finally, we obtained the following regression equation (R 2 =0.841): N = P * (-0.273 + 0.009I +0.234M + 0.012T1 + 0.015T2) * (1+V) N indicates a reasonable number of isolation beds. P means population, which refers to the total population in the corresponding area. I means incubation period of the epidemic. M means population mobility rate, which refers to the proportion of people in motion to the total population. T1 means hospital response time, which refers to the time it takes for a patient to develop the first symptom until a clear diagnosis is obtained. T2 means healing time, which refers to the average time from admission to discharge. T1 and T2 can be estimated based on a certain number of cases.
Considering that a certain number of isolation beds should be reserved to cope with emergency situations, we set V as the reserve amount. This article suggests that it is generally reserved at 10% according to the simulation results. Table 3. Multiple-linear regression analysis of the reasonable number of isolation beds

Prediction of a reasonable number of isolation beds in different healing times
Here, the prediction method was applied to an example ( Figure 6). The predicted number of isolation beds were basically consistent with the model operating results. The parameter setting is the same as model 2.1.3.
. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

Impact of the incubation period on the epidemic development
According to result 2.1.1, we found that a longer incubation period significantly promoted the infectivity, scale and duration of the epidemic. By tracking this phenomenon, it was found that the patients in the incubation period and without mobility restriction caused a high level of transmission before displaying symptoms by contacting others, which was similar to the views of Li P and Jiang X et al. 15,16 . To contain an outbreak, early detection of suspected cases is critical 17 . Some studies have described that a longer incubation period may be beneficial for epidemic control 18 , as this allows the Centers for Disease Control and Prevention (CDC) to have more time to deal with the overall epidemic. This conclusion may be more applicable to some known diseases, but for unknown diseases, we believe that a longer incubation period represents a more dangerous signal, making the development of the epidemic uncontrollable 18,19 . Due to the reduced predictability of the disease outbreak scale, it is more difficult to track patients. As a result, the disease may spread to a wider range of people, making it difficult to control.
Our results showed that increasing hospital response speed could improve infectivity and scale of an outbreak, which is consistent with previous research [20][21][22] . Shortening the hospital response time depends on the public's awareness of epidemic prevention and the level of medical technology. On the one hand, the public needs to pay more attention to the epidemic and actively cooperate with early detection; on the other hand, medical technology determines the time it takes for the detection method to give an accurate result. In addition, if sufficient isolation facilities can be provided, the centralized isolation of all suspected patients who cannot be excluded can also help reduce the hospital response time 8,23 .
Compared with the hospital response time, the impact of the population mobility rate on the duration of the epidemic is not significant in the case of abundant medical resources. However, . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted July 14, 2020. . https://doi.org/10.1101/2020.07.13.20152330 doi: medRxiv preprint unrestricted population mobility can cause a large medical load and consumption of medical supplies and will generate a large number of infected cases, resulting in adverse socioeconomic impacts [24][25][26] . In reality, medical resources are not only limited, but also lack most of the time.
Therefore, it cannot be considered that the population mobility has no effect on the duration of the outbreak. The detailed consequences of inadequate medical resources are discussed in section 3.2. In extreme cases, all people stopped activities, i.e., when the mobility rate is 0%, the overall scale of the epidemic is dramatically reduced, and the corresponding date of the epidemic peak sharply advances. It is speculated that the disease may saturate in a small area after taking this extreme prevention and control measure; thus, the transmission will be completely blocked. Since there is no new-generation infection, different transmission laws are displayed.

Multiple regression analysis and parameter prediction of the reasonable number of isolation facilities
We summarized the related factors that affected the demanded quantity of isolation beds by multiple regression analysis. Furthermore, multivariate regression analysis was used to estimate the reasonable number of isolation beds: N = P * (-0.273 + 0.009I +0.234M + 0.012T1 + 0.015T2) * (1+V) The regression equation shows that the population mobility rate is the variable with the highest weight, which indicates that the restriction of population mobility is the critical factor to contain outbreaks and effectively reduce the load on the medical system 20,24,31,32 . We believe that reducing the epidemic scale by restricting population mobility can also help to provide time for the establishment of temporary isolation.
In practice, the incubation period (I) can be estimated from the time between traceable harmful exposure to the time of the first symptom 19,33 . The population mobility rate (M) can be roughly estimated by the ratio of the population in unrestricted mobility, including medical personnel and administrative personnel, to the total population. 20,34 . Hospital response time (T1) and healing time (T2) can be estimated based on a certain number of cases. In addition, we recommend V = 10% as a reserve to address emergency situations under actual conditions. The . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted July 14, 2020. . https://doi.org/10.1101/2020.07.13.20152330 doi: medRxiv preprint above indicators are easy to obtain and estimate, which provides a feasible guarantee for using this method to estimate a reasonable number of isolation facilities.
More importantly, estimating the number of isolation facilities based on the epidemic situation and relevant parameters of the medical system will help to predict the pressure of the medical system in different areas in advance. This will provide decision-making support for the rational arrangement of medical resources and epidemic control .
. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

Establishment of the discrete simulation model
In this discrete simulation model, we use the Java language to carry out object-oriented programming. The eight states of people were defined as normal, shadow, supershadow, suspected, confirmed, isolated, cured, and dead. At the same time, for the times of being infected, suspected, confirmed, isolated, cured, and died were independent attributes configured to simulate the process with the actual world process, so the program can produce all attributes, including each moment, and record, analyze and calculate the statistics for each simulation individual.
In the model, the length of the incubation period, the time from being a suspected case to being diagnosed, the length of isolation, the rate of population mobility, the probability of infection, and the probability of death after infection can be adjusted or fitted as the necessary parameters for simulation. Most of the time, the parameters follow the normal distribution model, and the mean and standard deviation are defined by the parameters. The probability follows the random number model and is set by the probability value. The simulation object state transition logic is shown in Figure 7.
. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted July 14, 2020. . https://doi.org/10.1101/2020.07.13.20152330 doi: medRxiv preprint c. There is a fixed response time interval between the onset of patient symptoms and the moment of hospital diagnosis. The hospital always has enough resources to make a diagnosis when the

The normal
The shadow The confirmed The suspected The quarantined The cured . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted July 14, 2020. . https://doi.org/10.1101/2020.07.13.20152330 doi: medRxiv preprint response time is reached. d. When exposed to an infected person within a dangerous distance, the probability of infection and death after infection is constant. e. After being cured, the hospital will discharge the patient and be released from isolation at once. f. Unless otherwise specified, these characteristics do not change over time during disease transmission.
g. The simulation model ends when all patients have been discharged.
h. The patient can not be contagious or infected again after being cured.

Parameter interpretation
Population mobility rate: The percentage of the population that has willingness to move.
Healing time: The mean time between being in isolation and being discharged.
Incubation period: The time from infection to self-detection of suspected symptoms.
Fatality rate: The probability of death after diagnosis.
Dead time：Mean time from diagnosis to death.
Hospital response time: The time from the patient's suspected symptoms to a definitive diagnosis.
Transmission rate: The probability of being infected by contact with an infected person within an unsafe distance.

Model parameters setting
In order to prevent deviations in the simulation process, each set of parameters was repeated 10 times. After removing outliers, the mean was used to draw the curve and analysis.

Impact of the incubation period on the epidemic development
This model is used to discuss the influence of the disease incubation period on epidemic infection and medical resource occupation. In this model, we make the assumption that the hospital's isolation capacity is strong enough to admit all patients.
To achieve a single variable, we assign the following parameters: the total population=5000, number of initially infected persons=20, population mobility rate=1, healing time=15 days (standard deviation=2 days), hospital response time=1 day, fatality rate=0.05, and dead time=10 days (standard deviation=5 days) remained the same during the simulation. The experimental groups were as follows: the mean incubation period was set at 3, 7, 10, 14 and 21 days.

Impact of the hospital response time on the epidemic development
This model is used to discuss the impact of the hospital response time on epidemic infection and medical resource occupation. In this model, the hospital's isolation capacity is strong enough to admit all patients.
To achieve a single variable, we assign the following parameters: the total population=5000, number of initially infected persons=20, incubation period=7 days (standard deviation=5 days), population mobility rate=1, healing time=15 days (standard deviation=2 days), fatality rate=0.05, and dead time=10 days (standard deviation=5 days) remained the same during the simulation.
The experimental groups were as follows: the hospital response time was set at 1, 3, 5, 7 and 10 days.

Impact of the healing time on the epidemic development
. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted July 14, 2020. . This model is used to discuss the influence of the hospital cure time on the epidemic infection and medical resource occupation. In this model, the hospital's isolation capacity is strong enough to admit all patients.
To achieve a single variable, we assign the following parameters: the total population=5000, number of initially infected persons=20, incubation period=7 days (standard deviation=5 days), population mobility rate=1, hospital response time=1 day, fatality rate=0.05, and dead time=10 days (standard deviation=5 days) remained the same during the simulation. The experimental groups were as follows: the hospital healing time was set at 5, 7, 10, 15 and 20 days.

Impact of the population mobility on the epidemic development
This model was used to discuss the influence of the hospital cure time on the epidemic infection and medical resource occupation. In this model, the hospital's isolation capacity is strong enough to admit all patients.
To achieve a single variable, we assign the following parameters: the total population=5000, number of initially infected persons=20, incubation period=7 days (standard deviation=5 days), hospital response time=1 day, healing time=15 days (standard deviation=2 days), fatality rate=0.05, and dead time=10 days (standard deviation=5 days) remained the same during the simulation. The experimental groups were as follows: the population flow rate was set to 0, 30%, 50%, 80% and 100%.

Impact of the hospital isolation capacity on the infection situation
This model was used to discuss the influence of the hospital isolation capacity on the epidemic infection.
To achieve a single variable, we assign the following parameters: the total population=5000, number of initially infected persons=20, incubation period=7 days (standard deviation=5 days), population mobility rate=1, hospital response time=1 day, healing time=15 days (standard deviation=2 days), fatality rate=0.05, and dead time=10 days (standard deviation=5 days) remained the same during the simulation. The experimental groups were as follows: the hospital isolation capacity was set to 40%, 60%, 80% and 100%.

Multiple regression analysis and parameter prediction of the reasonable number of isolation facilities
Multilinear regression (MLR) analysis was used to evaluate the impact of the simulation parameters on the dependent variable demand for the number of isolation beds. Meanwhile, the prediction method was applied to an example under different healing times to test the accuracy.

Statistical analysis
Continuous variables are compared using the average. Using SPSS v26.0 (IBM authorized Central South University to use) for data analysis, analysis of variance (ANOVA) was used to analyze the level of significant difference between the groups. When the variance is homogeneous, the least significant difference (LSD) method and multiple comparisons are used to analyze between any two groups; when the variance is not homogeneous, Tamhane's T2 tests and the multiple comparison are used to compare the mean between any two groups. The Grubbs method was . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.
R is used to represent the goodness of fit of the multiple regression to measure the fitting degree of the estimated model to the observed values. The table of regression analysis lists the results of the significance test of independent variables (using t-test) and the P value of t-test, indicating whether independent variables have a significant influence on dependent variables.

Data availability
The codes of the current study are available in the GitHub repository, https://github.com/coolleafly/COV_SIM/. The average data generated by 10 simulations for each model are included in this published article (and its supplementary information files). Other data are available from corresponding author upon reasonable request.
. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted July 14, 2020. . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted July 14, 2020. . https://doi.org/10.1101/2020.07.13.20152330 doi: medRxiv preprint  The eight states of people were defined as normal, shadow, supershadow, suspected, confirmed, isolated, cured, and dead. The times of being infected, suspected, confirmed, isolated, cured, and died were independent attributes configured. The length of the incubation period, the time from being a suspected case to being diagnosed, the length of isolation, the rate of population mobility, the probability of infection, and the probability of death after infection can be adjusted or fitted as the necessary parameters for simulation.   The data for each curve is the average of 10 simulations. In this model, the ability of hospital treatment had no effect on the number of cumulative and newly confirmed cases. But the maximum number of inpatients increased and its corresponding peak dates delayed with the extension of the healing time. , and (D) respectively represent the time-varying curves of the cumulative number of confirmed cases, the number of newly confirmed cases, the number of inpatient cases, and the daily effective reproductive number under different population mobility rates. The data for each curve is the average of 10 simulations. Restrictions on population mobility made the peak number of cumulative confirmed cases, newly confirmed cases, and inpatient cases decreased. Population mobility rate had no effect on the value of Rt. However, the different transmission laws are displayed in extreme cases. CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted July 14, 2020. . https://doi.org/10.1101/2020.07.13.20152330 doi: medRxiv preprint the daily effective reproductive number under different isolation capacities. The data for each curve is the average of 10 simulations. The peak number of cumulative confirmed cases and inpatient cases increased with the decrease in the isolation capacity. In addition, with the decrease in isolation capacity, the corresponding date of the peak inpatient number was delayed and the duration of isolation facilities at their full capacity increased. Isolation capacity had no effect on the newly confirmed cases and the value of Rt. . CC-BY-NC-ND 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted July 14, 2020. . https://doi.org/10.1101/2020.07.13.20152330 doi: medRxiv preprint