Smart testing and critical care bed sharing for COVID-19 control
Paulo J. S. Silva, Tiago Pereira, Claudia Sagastizabal, Luis Nonato, Marcelo Cordova, Claudio J. Struchiner
SSmart testing and critical care bed sharing for COVID-19 control
Paulo J. S. Silva , Tiago Pereira , , Claudia Sagastiz´abal , Luis Nonato , Marcelo Cordova , Claudio J. Struchiner Instituto de Matem´atica, Estat´ıstica e Computac¸ ˜ao Cient´ıfica, Universidade de Campinas, S˜ao Paulo, Brazil Instituto de Ciˆencias Matem´aticas e Computac¸ ˜ao, Universidade de S˜ao Paulo, S˜ao Paulo, Brazil Department of Mathematics, Imperial College London, London, UK Departamento de Engenharia El´etrica, Universidade Federal de Santa Catarina, Florian´opolis, Brazil Fundac¸ ˜ao Get´ulio Vargas, Rio de Janeiro, Brazil
During the early months of the current COVID-19 pandemic, social-distancing measures effectively sloweddisease transmission in many countries in Europe and Asia, but the same benefits have not been observedin some developing countries such as Brazil. In part, this is due to a failure to organise systematic testingcampaigns at nationwide or even regional levels. To gain effective control of the pandemic, decision-makers indeveloping countries, particularly those with large populations, must overcome difficulties posed by an unequaldistribution of wealth combined with low daily testing capacities. The economic infrastructure of the country,often concentrated in a few cities, forces workers to travel from commuter cities and rural areas, which inducesstrong nonlinear effects on disease transmission. In the present study, we develop a smart testing strategy toidentify geographic regions where COVID-19 testing could most effectively be deployed to limit further diseasetransmission. The strategy uses readily available anonymised mobility and demographic data integrated withintensive care unit (ICU) occupancy data and city-specific social-distancing measures. Taking into account theheterogeneity of ICU bed occupancy in differing regions and the stages of disease evolution, we use a data-driven study of the Brazilian state of Sao Paulo as an example to show that smart testing strategies can rapidlylimit transmission while reducing the need for social-distancing measures, thus returning life to a so-called newnormal, even when testing capacity is limited. a r X i v : . [ phy s i c s . s o c - ph ] F e b ntroduction Brazil has struggled deeply to curb the transmission of COVID-19. The first case in Brazil was officially reported inlate February 2020, after which the number of daily deaths increased rapidly in April and May, plateaued for severalmonths, and then slowly declined in October before resurging in November and December [1–3]. Meanwhile, thenumber of daily new cases has risen sharply, and more than 6 months into the crisis, the country has failed to controltransmission. A key reason for this failure is the lack of testing strategies and infrastructure. For example, the totalstock of RT-PCR test kits for the entire first month of the pandemic, March 2020, was 27,000 for a country with 210million inhabitants [4]. At a similar stage of the pandemic, roughly the same number of tests were performed dailyin Germany, with a population of about 83 million. A similar pattern of daily cases and deaths has been observed inother countries where the availability of intensive care unit (ICU) beds is limited and an efficient and organised testingprogram has been slow to come into effect.One major unresolved question is whether such a low testing capacity has any utility in helping to curb thespread of COVID-19 and reduce the need for restrictive social-distancing measures. Another handicap faced in manycountries is the lack of reliable mechanisms for contact tracing. To be effective, tracing needs massive digital dataintegration as well as measures to ensure the training and safety of personnel [5, 6]. The heterogeneous society typicalin developing countries adds another layer of complexity. In most countries, the requisite infrastructure is concentratedaround hub cities, far from commuter towns. In this situation, nonlinear effects resulting from the high degree ofpopulation mobility makes the decision of optimal test distribution a real challenge [7, 8]. In their efforts to controltransmission, policymakers struggle to choose where, when, and how many test kits should be distributed when onlya limited number is available. In the present report, we describe a strategy based on readily obtainable data to assistdecision-makers in this process.We designed a data-driven smart testing strategy capable of exploring population mobility patterns and ICUbed allocation methods to plan the spatiotemporal distribution of test kits throughout Sao Paulo, a state in Brazil. We2ntegrate anonymised data from mobile devices, census records, and ICU bed usage across multiple areas of the stateinto an optimisation framework in a complex network of cities. The approach generates a city-to-city interaction modelof COVID-19 transmission and uses testing to alleviate the intensity of social-distancing measures and to decrease thepressure on the healthcare system through ICU bed occupancy. Smart testing explores the heterogeneous evolution ofviral transmission and can take advantage of mobility patterns in such a way that it efficiently controls spreading inlarge populations, even when little to no testing is done in population hubs. Indeed, we show that the smart testingstrategy is far superior to hub-focused or on-demand testing at reducing the need for mitigation measures.We provide an analysis for the state of Sao Paulo in Brazil, where all relevant data were collected. Sao Paulostate has a population of 44 million, and as is common in developing countries, its inhabitants are heterogeneouslydistributed with a major concentration in and around its capital, the city of Sao Paulo. We first assumed that no testswere available and that spreading must be controlled solely by social distancing, thus requiring closure of nonessentialservices to attain the desired reproduction number. Then, we compared three testing strategies by analysing howeach one could help to relax social-distancing measures while concurrently reducing the burden on the healthcaresystem. Smart testing was the superior strategy among those considered. Finally, we analysed a scenario similar tothe experienced situation in many countries in which mitigation measures are abandoned after 5 months of control andinhabitants live freely but following sanitary measures. We found that while smart testing alone may be insufficientto completely safeguard the healthcare system, this could be achieved by introducing a policy of ICU bed sharingbetween three regions of the state (Sao Paulo city, metropolitan area, and state interior) and by exploiting the differentrates at which the disease evolves in these regions. Thus, smart testing succeeds in maintaining an effective healthcaresystem in a control-free society. 3 esults
Assuming that a positive test for COVID-19 alters an individual’s behaviour, testing programs affect the mobilitypatterns of infected individuals who commute between home and work and thus generates nonlinear interactionsbetween regions of the state. Smart testing is capable of exploring the mobility network, heterogeneous stages ofdisease spreading, and ICU occupancy to plan timely targeted tests in areas that will benefit the whole state. To enablesmart testing, we need data on: (i) epidemiological trajectories in each region, (ii) time series of ICU occupancy ineach area, (iii) a mobility matrix between regions of the state, (iv) number of daily tests that can be performed, and(v) social-distancing criteria. Smart testing then solves an optimisation problem and the output of the algorithm isa spatiotemporal distribution of tests in the state. Supplementary Note 1 provides a flow chart of the required data,and more details on the input data and model are given in the Methods. While the data associated with items (i)-(iv)can be collected easily, the input (v) is flexible and can be tailored in response to specific situations. Mathematically,this translates into a certain objective function that mirrors the measures the government wishes to impose. Here, theobjective function study was defined as follows.The main goal of mitigation measures is to prevent healthcare system collapse by decreasing the value of r i ( t ) ,the effective reproduction number in the i th area, for all areas. This can be achieved by applying various mitigationmeasures [9,10]. The setting casts r i ( t ) as a control variable in an optimal control framework that is then approximatedby an optimisation problem. We model each area of the state as an SEIQR model coupled via a mobility matrix (seeMethods for details), and a variant of the SEIQR model where the effects of quarantine are described as an effectivereproduction number is discussed in Supplementary Note 5.With the given data, the platform calibrates a time series to predict the fraction of infected individuals whowill require an ICU bed for each day. Based on a probabilistically constrained approach with a confidence level of %, maximum ICU bed occupancy remains below the local capacity in all regions. The objective function combinesdifferent terms to achieve a balance that provides the most relaxed mitigation measures after the minimisation process.4ypical terms are the mean deviation between r i ( t ) and r (basic reproductive number), a total variation term to avoidtoo abrupt changes in the control, and terms promoting an alternation of strict measures in nearby cities (see Methods).To assess the impact of testing strategies, we calibrate the model to the region of interest, as described inSupplementary Note 2. Here, we provide a full analysis for the state of Sao Paulo, where we gathered all necessarydata (see Methods). In Supplementary Note 3, we also discuss the impact of a smart testing strategy in the early stagesof spreading in New York City (NY, USA). Smart testing in the state of Sao Paulo
Sao Paulo is the largest and richest state of the Brazilian federation and declared full statewide social-distancing mea-sures in late March, . By the end of September, the government-driven testing infrastructure could perform dailyCOVID- RT-PCR tests at the rate of per million inhabitants, which is about % of the capacity of most Eu-ropean countries. Thus, whether such a low per capita testing rate can help to reduce transmission is unclear. Thehealthcare system in Brazil is organised into local health administrative areas composed of several closely situatedcities that share an ICU bed administration system to facilitate allocation. For our study, Sao Paulo state was dividedinto local health care areas, and we estimated the flow of inhabitants travelling between them by using geolocalisedmobile phone data between cities. Combined with demographic information, these datasets enable interactions be-tween areas to be described in the context of COVID- spreading. The location of the administrative areas in SaoPaulo state are presented in Figure 1, along with snapshots of the actual epidemic trajectory and actual ICU occupancyon the first day of our study, which spanned approximately 390 days between July 1, 2020 and July 31, 2021.The disease evolution within the state is captured by the epidemiological model in Figure 1. At any given time,inhabitants are considered to be in one of five states: susceptible (green), incubating (pink), infected (red), quarantined(blue), and recovered (grey), and possible transitions between these states are also indicated in Figure 1. Duringworking hours, the flow of workers commuting into (or out of) the i th city can increase or decrease the effective5opulation compared with the city’s stable resident population. Other than those in quarantine, we assume individualscontinue with their daily commutes between cities. See Methods and references therein for further details. Figure 1:
Smart testing input data for the distribution of COVID-19 test kits for Sao Paulo state . (a) The geographical outlineof Sao Paulo state is shown with a complex network of scattered local hubs created by daily commuting between cities. Sao Paulocity is shown as the red circle. The model integrates the mobility and demographic data shown in (a) together with the dynamicsof ICU bed occupancy (b) and the epidemic trajectory (c), for each local health administrative area shown in the maps. Theoptimisation framework can curb disease spreading by coordinating social-distancing measures and test distribution. (d) Withineach city, inhabitants are considered to be in one of five states: susceptible (S, green), incubating (E, purple), infected (I, red),quarantined (Q, blue), and recovered (R, grey). If the local health administrative area has been targeted for testing, inhabitants withCOVID- symptoms who seek healthcare are isolated, tested, and only allowed to leave quarantine if the test result is negativeor they regain health. (e) By optimising the distribution of tests together with targeted social-distancing measures, we succeed inalleviating the burden on the healthcare system and at the same time allow relaxing of travel restrictions throughout the whole state. The model assumes the basic reproductive number with sanitary measures is r = 1 . (the value observed for6he second wave in Germany [11]). We provide full model details and the parameter values in Methods. SupplementaryNote 2 explains the calibration process. We assume that (i) individuals with COVID-19 symptoms seek healthcare andreceive the RT-PCR test (if that local health administration is currently testing); (ii) the success detection probabilityof the test is % [11]); (iii) individuals seek healthcare within 3 days after they become infectious ( τ = 3 ); (iv) testedindividuals await the test result in isolation and are allowed to leave quarantine only if the test result is negative orthey regain health, in which case they join the recovered compartment; and (v) the proportion of false positive tests(uninfected individuals who tested positive) is negligible and has no impact on our results.The model assumes the basic reproductive number with sanitary measures is r = 1 . (this is the value for thesecond wave in Germany [11]). We provide full model details and the parameter values in Methods. SupplementaryNote 2 explains the calibration process. It is considered that individuals with SARS symptoms seeking the healthcaresystem take the RT-PCR type test if the local health area has been targeted for testing. We assume that the tests havean efficiency of , that is, of infected individuals can be detected [12]. We also assume that individuals seekhealth assistance τ = 3 days after they become infectious. Tested individuals wait for the result in isolation and areonly allowed to leave quarantine either if the result is negative or once healthy again (in both cases, they join therecovered compartment). The size of the contingent of uninfected individuals who tested negative is negligible andhas no impact on our results.Our key proposal is to coordinate social-distancing measures with the geographical and temporal distribution oftests. The base case, taken as reference, considers the evolution of the viral transmission rate if no tests are performedand the sole mitigation measure is social distancing [13].In the absence of tests, we compute r i no test ( t ) , the maximum value that the reproduction number attains whilekeeping ICU occupancy below % of the capacity in the ith area. When r i no test ( t ) = r , the basal reproductionnumber of the new normal, there are no travel restrictions. Next, we compute the reproduction number r i test ( t ) of anarea under a testing protocol. If testing reduces the need for mitigation measures (i.e., relaxing mobility restrictions7ithout burdening the healthcare system), then r i test ( t ) > r i no test ( t ) (1)When the computed values of r i test ( t ) remain close to r , this means that testing alone is sufficient to control transmis-sion. However, this is still dependent to a large extent on the history of ICU occupancy and the time between infectionand receiving a positive test result. We will address this scenario later by analysing synergy between smart testing andbed sharing.To compare different strategies, we define the efficiency of a testing protocol as follows. Given the reproduc-tion number r i test ( t ) of the i th local health area under a testing protocol at time t , improvement (i.e., openning ofnonessential services) due to testing can be measured in terms of an increase in the reproduction number, relative tothe base case, without testing: ( r i test ( t ) − r i no test ( t )) /r i no test ( t ) . These values are weighed by the population N i ofthe local health area with respect to N state , the state population, so that the efficiency µ i ( t ) = (cid:18) r i test ( t ) r i no test ( t ) − (cid:19) N i N state (2)will be positive if testing improves mitigation measures in the i th area at time t . It might happen that µ i ( t ) < fora particular day t . However, the goal of the smart testing strategy is to increase the reproduction number of the stateas a whole. Therefore, we introduce the efficiency q for the state. Suppose that K represents all regions and that thetesting protocol was conducted during D days, totalling M months. The overall efficiency of the testing protocol isthe mean of the individual efficiencies, averaged over the regions and months: q = 1 M (cid:88) i ∈ I D (cid:88) t =1 µ i ( t ) . (3)In our calculations, each protocol is applied for M = 6 months and D is about . Since µ i ( t ) was weighted by thepopulation, the overall efficiency q requires no further normalisation.We assume that the state of Sao Paulo performs 750 tests per million inhabitants per day. Under this cap wecompare three scenarios: (i) smart testing; (ii) testing on demand; that is, the number of tests is proportional to thepercentage of infected individuals in the local population; and (iii) testing only in large urban hubs. The last two8onfigurations capture nonlinear effects induced by the concentration of the economic infrastructure in the large cities,which forces a large portion of the population to commute to work daily.Figure 2 summarises our results. Testing in all three scenarios leads to improvement; however, the efficiency q of testing only in hubs and testing on demand are both %, whereas the efficiency of smart testing is vastly superiorat . Nonlinear collective effects of smart testing
Testing on demand places the greatest pressure on the hubs such as Sao Paulo city, where the majority of cases areconcentrated (Figure 2d-f), whereas smart testing exploits the mobility network and finds optimal solutions that requirevirtually no testing in the hubs (Figure 2a-c). Instead, the smart strategy focuses on testing key areas while consideringICU occupancy. Remarkably, this strategy leads to an efficiency in the main hub Sao Paulo city as high as when onlythe hubs are tested. A notable effect of smart testing is that it synergistically generates a collective improvement in theefficiency of testing for the whole state. This results from exploiting the mobility between local health areas and thenonlinear effects emerging from the different stages of the evolution of the disease across the state. It is also strikingthat the decisions taken with smart testing are not straightforwardly explained by mobility alone.
Sharing ICU beds and smart testing
We now focus on a pressing societal issue by analysing whether it is possible to reduce or eliminate social distancingcontrol measures, which often leads to the re-emergence of infectious diseases [14]. Here, we aim to control diseasespreading after relaxing social distancing by deploying smart testing and coordinated ICU bed sharing alone.Starting from July 1, 2020, we impose mitigation measures for 140 days and then compare the epidemic trajec-9 igure 2: Effects of testing under different test distribution protocols in the state of Sao Paulo. The three protocols have a maximumcapacity of 750 daily tests per million inhabitants. Sao Paulo city is highlighted with thickened borders in all insets. The panelsshow the efficiency µ i ( t ) results for local health area (a, d, g), the number of tests per million inhabitants per month (b, e, h), andthe total number of tests sent to each area in a -month period (c, f, i) for the three protocols: smart testing protocol (a, b, c),on-demand protocol (d, e, f), and hub-only protocol (g, h, i). The numbers on the left report the efficiency q for the entire state. Thegreen colour code indicates efficiency µ i ( t ) in (a, d, g), tests per million in (b, e, h), and total tests performed in each area in (c, f,i) in a period of six months. Note that testing on demand concentrates the tests in Sao Paulo city, while smart testing focuses on thenearby neighbouring regions with little to no testing in Sao Paulo city. Even in this scenario, however, the efficiency in Sao Paulocity is high. Indeed, efficiency is high throughout the state, indicating that exploiting the network structure with testing coordinationis beneficial for the entire state. tories for the subsequent 250 days in two new normal scenarios; one in which all distancing restrictions are removed(while considering sanitary measures), and one in which social-distancing restrictions are removed and control occursthrough smart testing alone. In the social-distancing alone scenario, full capacity of the healthcare system is reachedwithin 30 days and saturation is maintained for nearly 2 months thereafter.10or the smart testing alone scenario, we simulated the number of tests required to control spreading. For τ = 3 ,testing alone cannot control spreading of the virus without overwhelming the healthcare system. See further details inSupplementary Note 4.Next, we consider τ = 1 ; that is, when infected individuals are identified and isolated 1 day after they becomeinfectious. Note that such early detection of cases would require adoption of new technologies [15]. In this scenario, adaily cap of 5000 tests per million inhabitants suffices to control spreading, as shown in Supplementary Note 4. Thisnumber is about 7-fold higher than the actual state testing capacity; nevertheless, this number of tests per day alonewould contain disease spreading, thus protecting the healthcare system.For the state of Sao Paulo, however, there are some nuances that deserve a more detailed analysis. The cityof Sao Paulo and its metropolitan area is home to about % of the state’s population but harbours about % of thestate’s ICU beds. In this situation, pooling and sharing of ICU beds can be effective. Additionally, as in many othercountries, the disease evolution in Sao Paulo state has not been uniform. The first cases were detected in the city ofSao Paulo in late March, almost months before it began to spread to the rest of the state. As a result, by the time thecase rate was peaking in rural areas, the rate was stabilising in Sao Paulo city (see more information in SupplementaryNote 4).Based on the low daily test capacity and the temporal lag between disease emergence in Sao Paulo city andthe interior regions, the smart testing strategy would suggest that testing in rural areas can begin later than in themetropolitan area. Our experiments show that, even allowing for the lag in regional transmission, increasing the dailytest capacity up to 7-fold would still be insufficient to prevent the overload of the health system. Thus, a mechanism inwhich ICU beds are shared between Sao Paulo city and hospitals in the state interior might offer a potential solution.Indeed, we observe a significant improvement in the ICU usage when simulating a partnership between hospitals toshare ICU beds for exclusive use by patients with suspected or confirmed COVID-19 infection [16, 17].The three macro regions of Sao Paulo state to be considered are: Sao Paulo city (population 11.9 million), Sao11aulo metropolitan area (9.4 million), and the interior of the state (23 million), which account for 27%, 21%, and 52%of the state’s population, respectively (Figure 3a). Under normal conditions, there are 4310 ICU beds in Sao Paulostate, of which 80%, 11%, and 9% are located in Sao Paulo city, the metropolitan area, and the interior, respectively.Considering this unequal distribution of total ICU beds available, we assume that (i) only ICU beds in Sao Paulo cityare shared with the other two regions, which reduces the ICU capacity for Sao Paulo city itself; and (ii) the mechanismof ICU bed allocation from Sao Paulo city to the other two regions is based on demographic data. Thus, under theICU bed sharing agreement, 71.2%, 13.4%, and 15.4% of the total ICU beds are available for Sao Paulo city, themetropolitan area, and the interior, respectively (Figure 3b, c).In this ICU bed sharing scenario, smart testing with a low daily cap of 750 tests per million inhabitants sufficesreduce a peak in the ICU usage for the metropolitan area. For the interior area, having shared beds is more relevantthan testing, resulting in a 50% increase in the ICU capacity. Thus, combining smart testing and ICU bed sharingto accommodate the heterogeneous infrastructure of the state is not only beneficial to prevent the overload of thehealthcare system but can control disease spreading without additional social-distancing measures.The results reported in Figure 3 were obtained under the premise that susceptible individuals seek healthcareassistance and are tested by RT-PCR τ = 1 day after experiencing symptoms. If, in contrast, there is a delay of τ = 3 days between symptom emergence and testing, our simulations show that testing and ICU bed sharing combined willnot be sufficient to halt disease spreading. In other words, if τ = 3 , restricting travel becomes mandatory. This analysisis in agreement with the efforts being made worldwide to urgently deploy rapid and reliable COVID-19 tests [18]. Discussion
Control of COVID-19 transmission in low- middle-income societies has been hampered by a scarcity of key resources,including ICU beds, RT-PCR kits, and qualified testing facilities. Although the imminent arrival of effective SARS-12 igure 3:
Sharing of ICU beds and smart testing can control the spread of COVID-19 without restricting travel. (a) The threemacro regions in the state of Sao Paulo are shown: Sao Paulo city (blue), metropolitan area (white), and rural/interior region (grey).(b) The original distribution of the 4310 ICU beds in Sao Paulo state in each of the macro regions. (c) Redistribution of ICU bedsafter sharing. (d-f) ICU bed occupancy in the three macro regions under the smart testing protocol (blue lines) and without smarttesting (grey dotted lines). The shaded rectangular areas represent the ICU bed capacity before and after implementation of bedsharing: 12% loss in Sao Paulo city (d), 18% gain in the metropolitan area (e), and 70% gain in the interior (f). The reductionis acceptable for Sao Paulo city, which remains far below maximum local ICU occupancy. The yellow areas show the shared ICUbed use when the testing capacity is 750 daily tests per million inhabitants, and the red areas show the deficit in ICU beds in themetropolitan area when no smart testing is implemented.
Cov-2 vaccines is expected to reduce transmission, it is unlikely that they will be distributed worldwide until the endof 2021. In the meantime, vaccination distribution strategies will initially focus on reducing morbidity and mortalityof key subpopulations (healthcare workers and older adults) while maintaining the most critical essential services(healthcare workers engaged in vaccine delivery, teachers, and school staff). Assuming these expectations are satisfied,smart testing strategies of vulnerable populations remain our best hope to curb COVID-19 transmission and preservethe economic health of these societies.The World Health Organization first called for massive COVID-19 testing in March 2020, and in line with this,13e analysed the effect of smart testing in the state of Sao Paulo, Brazil. Our study explored how smart testing canassist in reducing transmission despite challenges due to a low daily testing capacity, unequal healthcare infrastructure,and the evolution of COVID-19 in different areas of the state. Under these adverse conditions, it is critical that wedetermine how best to handle test distribution in terms not only of where to send kits but also how many and when. Tobe most effective, these scarce testing resources must be properly deployed. As described in this study, we proposed asmart testing strategy based on mathematical optimisation of test distribution and compared its effectiveness with thatof other mitigation protocols.In all of the configurations considered, the contribution of testing to control of COVID-19 was significant. In-terestingly, the smart testing option was far superior to the on-demand testing and hub-only testing scenarios, reachingan efficiency of 65% compared with 35%. This level of improvement was obtained by considering travel patterns,the state infrastructure, local heterogeneities in disease spreading, and stress imposed on different regional healthcaresystems. Our analysis highlights the importance of tests that can deliver results rapidly and also reveals that, evenwith rapid and reliable testing, not all surges in infection could be controlled by increasing the number of daily testsalone, and that an ICU bed sharing policy may be necessary, especially if daily testing capacity is low. The results andconclusions of this study are robust across models.By employing data integration and optimisation over a complex network, smart testing provides a strikingimprovement in the quality of transmission mitigation measures, thereby allowing populations to more rapidly returnto pre-pandemic activities. The methodology is applicable to any country facing similar challenges of limited testingcapabilities and a highly mobile workforce. The approach can also be easily adapted to accommodate new wavesof spreading, and can incorporate more precise medical data on the mechanism of COVID-19 transmission as thatbecomes available.In countries such as Brazil, where control of the pandemic is in the hands of local state and city administrationsrather than the federal government, some relatively affluent cities invested heavily in testing as a means to curb localtransmission. This effort was in vain, however, and our analysis using smart testing delivers a strong message; namely,14t is better for all citizens if resources are shared with neighbours, and efforts to reduce transmission at individual andlocal levels are not nearly as effective as collective strategies that concomitantly address all regions. The superiority ofsmart testing is clear in multiple scenarios, such as financial investment in test kits, stress on the healthcare system, andstress on the population due to restrictive social-distancing measures and travel limitations. It is notable that targetedand orchestrated solutions such as smart testing represent a sharp contrast to the local-level solutions currently beingimplemented in many countries.
Methods
An SEIQR model with mobility
We use the same notation as in [13]. Suppose there are k areas gathered in a set I , the time horizon being defined byinitial and final times T and T . The epidemiological state of an area is characterized by compartments, of S usceptible, E xposed, I nfected, Q uarantined, and R ecovered individuals, considered as percentages of the total population in eacharea. The coefficient α ( t ) ∈ [0 , weighs the portion of the considered time t that corresponds to the time spentoutside their home city, so α ( t ) = 1 / . Moreover, r ( t ) ∈ [0 , r ] K ⊂ R K is the disease reproduction number, while T inc and T inf are the incubation and infection periods. For each area i , given an initial condition at time T the diseaseevolution during the night is described by the classical SEIQR model [13].We model mobility by incorporating the impact of commuting. First, for those nodes with values r i ( t ) is smallerthan the natural reproduction number of the disease without intervention, it is reasonable to assume that inbound travelwill be discouraged, say by a factor ζ i ∈ [0 , . Letting N i represent for the total population of node i , this is reflected15y the entries of the effective mobility matrix and the effective population, defined by p ki ( t ) := ζ i r i ( t ) p ki and N i ( t ) := (cid:88) k ∈ I p ki ( t ) N k for i ∈ I , (4)respectively. We consider ζ i = 1 , which is the worst case and captures the fact that symptoms might appear after theindividual becomes infectious [19]. Our simulations show that the results are stable in a range ζ ∈ [0 . , .Commuting modifies the population circulation, thus, we consider the products p ij ( t ) S i ( t ) I j ( t ) , (5)where: I j ( t ) := 1 N j ( t ) (cid:88) k ∈ I p kj ( t ) I k ( t ) N k for j ∈ I . (6)Next, consider F i = α ( t ) T inf r i ( t ) S i ( t ) I i ( t ) + (1 − α ( t )) T inf (cid:88) j ∈ I r j ( t ) p ij ( t ) S i ( t ) I j ( t ) (7)Notice that F i is a nonlinear function of the state variables. Putting all these parameters together gives the followingordinary differential equations: ˙ S i ( t ) = − F i (8) ˙ E i ( t ) = F i − T inc E i ( t ) . (9) ˙ I i ( t ) = 1 T inc E − λ i T inf I i − T inf I i (10) ˙ Q i ( t ) = λ i T inf I i − T q Q i (11) ˙ R i ( t ) = 1 T inf I i + 1 T q Q i . (12)The evolution depends on λ i ( t ) , which determines the fraction of individuals identified as infectious when testing inthe i th area at time t , supposing they are quarantined for T q days (we assume T q = 3 T inf ).In practice, all patients with SARS need to be isolated thus going to the compartment Q while they wait forthe test results. However, because of the initial conditions, at any given time S (cid:29) I , and the amount of susceptibleindividuals in the Q compartment is negligible when compared to the total susceptible population. Thus, we shall16odel the entry of infected individuals only in the Q compartment. In Supplementary Note 6, we discuss a variantof the model where the quarantine is captured as the time delay system of equations leading to effective reproductionnumber. We show that the results are robust across these models. Effects of testing on λ To determine λ i ( t ) , we note that out of the S sars individuals with COVID-19 symptoms who seek attention in thehealth care system, only C individuals will be infected with COVID-19 (with our data, CS sars = 1 / ). As a result, ifthere are T i ( t ) tests performed in the i th area at time t and τ is the time in days elapsed between becoming infectiousand seeking assistance, then the fraction of detected individuals is λ i ( t ) = ηe − τ/T inf σ i ( t ) N i I i ( t ) , (13)where η = 0 . is the efficiency of the tests and where we shortened σ i ( t ) = CS sars T i ( t ) . Other test-related constraintsare ≤ T i ( t ) ≤ σe τ/T inf N i I i ( t ) (14)and the relations (cid:80) i,t T i ( t ) = T tot and T i ( t ) ≤ T i cap , respectively limiting the total number of tests employedin the campaign, and setting the daily cap for each area. Table with ParametersCritical care beds occupancy
The solution procedure discretises the functional states ( S , E , I , R , Q ) and controls ( r, T ) into vectors. For the infectedindividuals in particular, this means that I ( t ) is replaced by a vector with components I it for i ∈ I the set of areas, and t ∈ { T , T + 1 , . . . , T } , covering the days in the study ( T − T = 390 days in our runs).17arameter Definition Value Ref. ζ % of infected individuals who can commute 0.8-1 λ % of infected individuals who go to quarantine Eq. (13) T inf Mean infectious time . days [20] T inc Mean incubation time . days [20] T q Mean quarantine time 3 T inf σ % of SARS patients with COVID-19 1/4 [21] η Test efficiency . [22, 23] τ Time considered infectious before isolation − daysWe set a probabilistic constraint for the use of ICU beds in each area, considering that the percentage of infectedpopulation that needs intensive care at time t is uniform across the local health area. Based on the structure of theconsidered uncertainty, the constraint can be cast into a deterministic equivalent reformulation. The procedure isexplained in details in [13], we just mention a few key points here.Bed usage is estimated from the ratio v itt (cid:88) k = t − ν I ik , where the numerator, a known data, is the capacity constraint v it for the i th health area at time t . The denominator, an accumulation of sick individuals over ν days prior to t ,represents the group among which a fraction may need critical care attention. Following [24], the average number ofdays infected individuals typically spend in the ICU is ν ∈ [7 , and we use ν = 7 in our model.The ratio stochastic process is then approximated by a time series, whose parameters are calibrated usinghistorical records of intensive care unit beds and new infected individuals in the region. With our data, the best fit wasan autoregressive model of lag 2. Consequently, the ratio is approximated by icu t ( ω ) = c + c t + (cid:88) j =1 φ j icu t − j + ω t , where ω t ∼ iid N (0 , σ ω ) . (15)In this expression, the white noise ω t a random variable that is independent and identically distributed according18o a normal distribution with zero mean and variance given by σ ω . After calibration, the values for the parameters c , c , φ , φ , σ ω are known and can be used to make explicit the following constraint P (cid:34) icu t ( ω ) t (cid:88) k = t − ν I ik ≤ v it (cid:35) ≥ . , (16)ensuring the local hospital capacity will not be exceeded, with 90% probability. The explicit deterministic equivalentformulation of this chance constraint is an affine constraint on I , involving the inverse cumulative function of thestandard Gaussian distribution, we refer to [13] for the complete development. Optimising on Complex Networks
Along the time horizon defined by the given initial and final times T and T , having K = 22 administrative healthdistricts under consideration, the epidemiological state of the region at time t is characterised by the vector function x ( t ) = ( S , E , I , Q , R )( t ) ∈ [0 , × K , for t ∈ [ T , T ] . (17)As mentioned, the discretisation of the SEIQR system of differential equations is performed using a central finitedifferences scheme; see [13]. For Sao Paulo state specifically, this amounts to approximate the state function x ( t ) by a large-scale vector; for instance the component S ( t ) is replaced by S it for i ∈ I = { , . . . , K = 22 } and t ∈{ , . . . , } , and similarly for the control r i ( t ) and other variables, including the number of tests performed in eacharea, T i ( t ) . Accordingly, given the initial state x and the basal reproduction number r = 1 . , the mathematicaloptimization problem to be solved is a large-scale nonlinear program in the form min r it ∈ [0 ,r ] 390 (cid:88) t =1 ψ t ( r t )s . t . ( x, r ) satisfies the discretized SEIQR in Methods x satisfies constraints on testing and ICU beds . (18)The objective function ψ t depends on r t = ( r t , . . . , r Kt ) , and it can assess the control performance combiningseveral terms. In our simulations we used the simple expression ψ M axCirct ( r t ) = (cid:88) i ∈ I w i ( r − r it ) that ensures maximal19irculation for given weights w i proportional to the areas’ population. Finally, following the public policy in Sao Paulostate, changes in the controls r it of each city are only possible every 2 weeks. Acknowledgements.
This work was supported by CEMEAI, the Center for Research in Mathematics Appliedto Industry (FAPESP grants 2013/07375-0 and 2015/04451-2), by the Royal Society London, by the Brazilian NationalCouncil for Scientific and Technological Development (CNPq; grants 301778/2017-5, 302836/2018-7, 304301/2019-1, 306090/2019-0, 403679/2020-6) and by the Serrapilheira Institute (Grant No. Serra-1709-16124).
Data Availability.
All relevant data are available from the corresponding author upon request.
Code Availability.
Input files or sets of input parameters as well as the codes are available in https://github.com/pjssilva/Robot-dance . Author contributions.
PJSS developed the code and made calibration and the simulations. CS developed the ICUanalysis. TP, CS, PJSS performed the data analysis. TP, LGN and MC prepared the figures. PJSS, TP, CS, CJS de-signed the research and wrote the manuscript.
Competing interests.
The authors declare no competing interests.
References et al.
Epidemiological and clinical characteristics of the COVID-19 epidemic in Brazil.
NatureHuman Behaviour , 856–865 (2020).[4] Roser, M., Ritchie, H., Ortiz-Ospina, E. & Hasell, J. Coronavirus Pandemic (COVID-19). Our World in Data (2020). 205] Ferretti, L. et al.
Quantifying SARS-CoV-2 transmission suggests epidemic control with digital contact tracing.
Science (2020).[6] Amaku, M. et al.
Modelling the test, trace and quarantine strategy to control the covid-19 epidemic in the stateof s˜ao paulo, brazil.
Infectious Disease Modelling (2020).[7] Candido, D. S. et al.
Evolution and epidemic spread of SARS-CoV-2 in Brazil.
Science , 1255–1260 (2020).[8] Chang, S. et al.
Mobility network models of COVID-19 explain inequities and inform reopening.
Nature
Nature Communications , 5710 (2020).[10] Dehning, J. et al. Inferring change points in the spread of COVID-19 reveals the effectiveness of interventions.
Science
Nature Reviews Microbiology
Nature Human Be-haviour , 746–755 (2020).[15] Quer, G. et al. Wearable sensor data and self-reported symptoms for COVID-19 detection.
Nature Medicine
Governo do Estado de S˜ao Paulo (2020). 2117] S˜ao Paulo estuda deixar de usar leitos privados. R7 (2020-06-30-0308:14:00-10800).[18] Sheridan, C. Coronavirus testing finally gathers speed. Nature Biotechnology (2020).[19] Lauer, S. A. et al.
The Incubation Period of Coronavirus Disease 2019 (COVID-19) From Publicly ReportedConfirmed Cases: Estimation and Application.
Ann Intern Med , 577–582 (2020).[20] Wu, J. T., Leung, K. & Leung, G. M. Nowcasting and forecasting the potential domestic and international spreadof the 2019-nCoV outbreak originating in Wuhan, China: A modelling study.
The Lancet , 689–697 (2020).[21] Barbosa, A., Oliveira, K., Lira, S. & Vieira, T. Um modelo de planejamento e execuc¸ ˜ao do combate da evoluc¸ ˜aoda COVID-19 `a n´ıvel municipal baseado em dados e prevenc¸ ˜ao. Tech. Rep., Universidade Federal de Alagoas(2020).[22] Sethuraman, N., Jeremiah, S. S. & Ryo, A. Interpreting Diagnostic Tests for SARS-CoV-2.
JAMA , 2249(2020).[23] Liu, R. et al.
Positive rate of RT-PCR detection of SARS-CoV-2 infection in 4880 cases from one hospital inWuhan, China, from Jan to Feb 2020.
Clinica Chimica Acta , 172–175 (2020).[24] Noronha, K. V. M. d. S. et al.
Pandemia por COVID-19 no Brasil: an´alise da demanda e da oferta de leitoshospitalares e equipamentos de ventilac¸ ˜ao assistida segundo diferentes cen´arios.
Cadernos de Sa´ude P´ublica36