Abstract
From September 2020 to May 2021 Madrid region (Spain) followed a rather unique nonpharmaceutical intervention (NPI) by establishing a strategy of perimeter lockdowns (PLs) that banned travels to and from areas satisfying certain epidemiological risk criteria. PLs were pursued to avoid harsher restrictions, but some studies have found that the particular implementation by Madrid authorities was rather ineffective. Based on Madrid’s case, we devise a general, minimal framework to investigate the PLs effectiveness by using a datadriven metapopulation epidemiological model of a city, and explore under which circumstances the PLs could be a good NPI. The model is informed with real mobility data from Madrid to contextualize its results, but it can be generalized elsewhere. The lowest lockdown activation threshold \(\Theta \) considered (14day cumulative incidence rate of 20 cases per every \(10^5\) inhabitants) shows a prevalence reduction \(>20\%\) with respect to the scenario \(\Theta =10^3\), more akin to the case of Madrid, and assuming no further mitigation. Only the combination of \(\Theta =20\) and mobility reduction \(>90\%\) can avoid PLs for more than \(>20\%\) of the system. The combination of low \(\Theta \) and strong local transmissibility reduction is key to minimize the impact, but the latter is harder to achieve given that we assume a situation with highly mitigated transmission, resembling the one observed during the second wave of COVID19 in Madrid. Thus, we conclude that a generalized lockdown is hard to avoid under any realistic setting if only this strategy is applied.
Introduction
During the COVID19 pandemic, we have become acquainted with a myriad of measures to halt or at least control the spreading of the novel coronavirus SARSCoV2 at different scales. Measures that are different from vaccination and medical treatments are called nonpharmaceutical interventions (NPIs). These may include travel bans, lockdowns of different geographical extensions, curfews, restrictions on occupancy in public closed spaces, or selfprotection measures such as wearing masks or sanitation (see^{1} for a comprehensive review of NPIs within the context of COVID19)^{2,3,4,5,6}. The objective of most NPIs is to reduce contacts between individuals, with the ultimate goal of breaking transmission chains and, subsequently, controlling the spread and minimizing hospitalizations and deaths. However, certain NPIs may bring severe economic downturns^{7,8,9}, dysfunctional supply chains^{10,11,12}, and social backlash^{13,14,15}. Therefore, competent authorities should be properly informed of the benefits and costs of the possible interventions, especially if these are enforced.
Given the negative impact that global lockdowns and quarantines inflict on societies, it is important to look for alternative strategies in successive COVID19 waves. In this regard, a proposed alternative in the context of urban settlements is that of localized mobility restrictions, which is a more finegrained restriction that acts only on the neighborhoods that are especially affected by an epidemic outbreak, instead of acting indiscriminately on the whole city. In Spain, the city of Madrid stands as a unique and paradigmatic example of pursuing the socalled perimeter lockdowns (PLs) at the level of Basic Health Zones (BHZ, subareas of the city defined by public health criteria). The main characteristic of these lockdowns was that they were implemented in highly integrated urban areas. As such, they restricted mobility in and out of the BHZ but allowed residents to go to work, attend academic activities, or for other essential purposes in the rest of the city, for which public transportation was available. Similarly, small businesses such as restaurants and shops were allowed to open, although at 50% maximum capacity. Hence, the lockdown was much more permeable than those implemented at larger scales, in which mobility is completely restricted between cities or regions. The case of Madrid reached the literature through a commentary article by members of Madrid’s regional public health counseling^{16}. But the commentary received several responses that pointed to inaccuracies and lack of selfcriticism given the severe impact of the epidemic in the region^{17,18,19,20}. Two different studies approached the question through statistical analyses and concluded its lack of effectiveness at least in the reallife setting under consideration^{21,22}. Independently, perimeter lockdowns within a large city were also implemented during the first wave of COVID19 in Santiago de Chile. In^{23}, the authors similarly conclude, through causal inference methods, that this kind of strategy is ineffective in the context of highly integrated human settlements, such as cities.
Due to the rarity of this strategy, to the best of our knowledge, it has not been explored using mechanistic models. In contrast to studies that rely on the statistical analysis of the collected data, mechanistic models can provide important insights into the effects of any strategy regardless of the peculiarities of the situation under analysis. This is important to properly gauge if a strategy will be effective in other places and under different conditions. Thus, in this work, we aim to assess the effectiveness of PLs at the urban scale using these models. To do so, we first take a brief look at the data collected during the implementation of the strategy in Madrid. This case serves as an example of how this strategy can be implemented in practice. Then, we build a simplified model of COVID19 transmission to test the effect of PLs at the urban scale using a metapopulation framework. It is worth stressing that, even though we use the case of Madrid as an inspiration to conceive and guide the study, the framework developed is general enough to be extended to other locations. As such, we do not intend to replicate Madrid’s epidemiological trajectory but rather design, based on epidemiological first principles, a minimal model that captures the essential features of the spreading at the urban level and that can inform public health policy on the outcome of potential scenarios.
Results
First, we take a brief look at the real data from Madrid during the period in which the PL strategy was in place. Then, we show the results from the simulations of our metapopulation model with PLs applied to an idealized scenario inspired by Madrid.
Analysis of Madrid’s epidemiological data
In general, perimeter lockdowns were enforced in areas in which the 14day cumulative incidence rate (14d CIR) was above a certain threshold, although this information could be complemented by its trend and the, broadly defined, presence of community transmission in the area. In Fig. 1, the dashed horizontal lines indicate the threshold set by the authorities which, as we can see, was not static. Rather, it mostly followed the epidemic waves. This strategy was in place from late September 2020 to May 2021 (vertical dashed lines in the figure), a period that comprises the second and third waves of the epidemic in Spain (the first one is not shown in the figures). Given the typical time scale of the spreading, it has been shown that the change in trend after the implementation of the strategy cannot be attributed to it^{21,22}. Note also that there were several BHZs with a 14d CIR above the threshold that were not confined (Fig. 1B). Lastly, we observe high synchronization in the spreading for all the BHZ time series, whether under lockdown or not. Thus, either the application of the strategy in a few areas had effects on the whole system, or it had limited consequences.
Next, we look at the overall mobility from the beginning of the pandemic to the end of the PL strategy, F.g. 2. The imposition of the national lockdown (first vertical red line) reduced mobility to 40% of the usual values. Then, it slowly increased following the progressive lifting of the restrictions during the summer of 2020, reaching mobility values of 70% of the baseline. The value is reduced once again to 50% of the baseline mobility during August 2020, which is the period in which, typically, people go on vacation in Spain. By the time the PL strategy was put in place, mobility was close to 70% on weekdays. In this period, we observe that the mobility levels tend to stabilize, except for the occasional public holidays, around that 70%. Averaging over the full period of PLs, mobility levels remain at 0.63 [0.62, 0.64], and, excluding weekends, increase to 0.67 [0.66, 0.68]. Thus, the impact of the PLs on the overall mobility within the city was negligible.
Modeling perimeter lockdowns
We use a stochastic and discretetime metapopulation SIR model (see “Methods”). In this context, a metapopulation is a collection of subpopulations that can exchange individuals. Inside each population, the dynamics of the disease are governed by the classical SIR model. Thus, an individual may get infected in one subpopulation, travel to another one and start a new outbreak there. These models have been applied to globalscale situations, such as the global spread of influenzalike diseases^{24,25}, COVID19^{26,27,28}, and to regional and national scales^{29,30}. The metapopulation framework^{31,32} is versatile and allows the description of a system on varying spatial scales, and thus can also be conceived on the urban scale. Our analysis considers an urban system with a total population of N individuals and V administrative subdivisions (subpopulations). The epidemic dynamics within each district i is governed by a wellmixed SIR compartmental model where the probability of getting infected is \(1[1R_0\Delta t/(T_I N_i)]^{I_i}\), where \(N_i\) represents the number of people in district i, \(I_i\) is the number of infected individuals in the said area, \(R_0\) is the basic reproduction number and \(T_I\) is the mean infectious time.
The flow between districts in the metapopulation system is modeled through a static origindestination matrix. The matrix was built using real mobility data from the prepandemic period (see “Methods”). We modulate the intensity of the flow with a global parameter, \(\kappa \), so that if \(\kappa \rightarrow 0\) individuals do not exit their district. Conversely, if \(\kappa \rightarrow 1\), the mobility is equal to the baseline situation (see Eq. 2). We further assume a situation of general disease awareness in society and thus with generalized mitigation measures in place like wearing face masks, extra hygiene measures, some capacity limits, avoidance of crowded situations, etc. This awareness situation is more similar to the one experienced in Madrid at the time of the onset of the perimeter lockdown strategy. In this context, it would be more appropriate to model the spreading using the effective reproductive number \(R_t\) rather than the basic reproductive number \(R_0\), the latter being defined only for a fully susceptible population without any mitigation strategies in place. For simplicity, we set \(R_0 \approx R_t\) to include directly all these factors without explicitly modeling them^{33}. We set \(R_0=1.25\) which is in the range of the estimations of the effective reproduction number performed by the Spanish Ministry of Health in August 2020, when the second wave of infections started^{34}. Finally, we use an infectious period of \(T_I=4.5\) days. All simulations are seeded with 5 infected individuals in the central district Centro. The simulations end when the total number of infected individuals in the system reaches zero.
We add two extra parameters to the model to reproduce the dynamics of the perimeter lockdowns (PLs): \(\Theta \) and \(\chi \). The first one is the risk threshold that determines when an area should be closed. Even though this parameter changed many times during the implementation of this strategy in Madrid (see Fig. 1), we fix it for each simulation. This way, whenever the cumulative incidence in a district i is above \(\Theta \), a PL is activated in that area. As a consequence, flows of travelers from and to the district at risk are completely suppressed. The second parameter, \(\chi \), is the transmissibility reduction fraction in district i, so that \(\beta _i=\chi \beta \), where \(\beta \) is the general transmissibility rate related to the basic reproductive number of the disease, \(R_0=\beta T_I\). As previously discussed, PLs included other control measures aimed at reducing the spreading rate within the affected area, and this parameter allows us to control the intensity of such interventions.
To study the effect of PLs, we define three epidemiological observables: global peak incidence, \(I_{\textrm{max}}\), global final prevalence, \(R(\infty )\), and the final fraction of districts whose 14d CIR exceeded a certain risk threshold, \(D(\infty )/V\). For brevity, we refer to these observables simply as the peak incidence, prevalence, and locked districts, respectively. Furthermore, in all cases the values are normalized over the ones obtained in the noresponse scenario (subscripted as nrs), corresponding to a fully unmitigated outbreak. As such, when the normalized observables are less than unity, it signals that the intervention had some positive effect on containing the epidemic. In the following, we explore how these observables change when we vary the three free parameters in our model: the general mobility parameter, \(\kappa \), the risk threshold, \(\Theta \), and the transmissibility reduction, \(\chi \).
Effects of perimeter lockdowns
Panels A1 (peak incidence), A2 (prevalence), and A3 (locked districts) of Fig. 3 show a series of curves for several threshold risk values \(\Theta =20\), 100, 500, and 1000, without transmissibility reduction in locked areas (\(\chi =1\)) and varying \(\kappa \) as control parameter. Every point in the curves depicts a situation where mobility is lower than the baseline scenario (\(\kappa =1\)). Note that, since \(\chi =1\), the only effect of PLs is to cut down mobility in and out the affected districts. These curves then allow us to disentangle the effects of general mobility on the system. Clearly, all the observables show that reducing the general mobility parameter \(\kappa \) helps to reduce the impact of the epidemic with respect to the noresponse scenario. The problem, though, lies in the magnitude of the decrease. Madrid’s PLs pursued risk threshold values mainly between \(\Theta =500\) and 1000 most of the time. Under these conditions, even with lower mobility than the one observed during the national lockdown (\(\kappa \sim 0.4\), see Fig. 2) the effects are mostly negligible. To achieve, for instance, a reduction of \(20\%\) in peak incidence, mobility should be one order of magnitude lower than during the national lockdown (\(\kappa \sim 0.01\)). And this still would not impact the prevalence or the fraction of locked districts. Only when \(\kappa =10^{3}\) (\(99.9\%\) reduction), these quantities are reduced by \(50\%\). With a much more strict threshold for PL activation, \(\Theta =20\), and under the regular mobility scenario, we can obtain a reduction in peak incidence \(>20\%\), and around \(10\%\) in prevalence, but this does not keep the system from undergoing a de facto general lockdown unless mobility is also reduced by \(90\%\) or more.
In panels B1 (peak incidence), B2 (prevalence), B2 (locked districts) of Fig. 3, instead, we fix the general mobility to the baseline, \(\kappa = 1\), and vary \(\chi \) in the districts under PLs. In this situation, the intervention restricts the in and out mobility in the selected districts and also reduces the transmissibility within the area by a factor \(\chi \). Here we readily see that PLs, when accompanied with additional mitigation measures inside the affected area, can effectively reduce the impact of the disease on the system. Given the proposed \(R_0=1.25\) and \(T_I=4.5\) days, reducing baseline transmissibility by \(20\%\) (\(\chi =0.8\)) translates into an effective reproduction number for a quarantined district that is on the verge of criticality, that is, \(R^*=1\)^{31}. Note, however, that the value of \(R_0\) is already very low as we assume that multiple nonpharmaceutical interventions are in place. Thus, achieving further reductions might not be possible. In any case, when \(\chi =0.8\) and \(\Theta =500\), we obtain normalized values for peak incidence of 0.093 [0.093, 0.093] and prevalence of 0.166 [0.166, 0.167]. This is a reduction of more than \(90\%\) and \(80\%\) with respect to the noresponse scenario, respectively. However, we can see that all districts in the urban system have outbreaks above the risk threshold, for any \(\Theta \) and \(\chi \) shown in the figure. Thus, under these conditions, perimeter lockdowns can greatly reduce the impact on the population but would not protect parts of the city from the most affected ones, even under mild epidemiological conditions.
Lastly, we explore in more detail the space of parameters \((\kappa ,\chi )\) for two selected \(\Theta \) scenarios. We consider a rather proactive strategy, with \(\Theta =20\) (panels A1, A2, A3 in Fig. 4), and a more reactive strategy, with \(\Theta =500\) (panels B1, B2, B3 in Fig. 4). With this analysis, we can better appreciate the limited role of general mobility \(\kappa \) in both the reduction of the peak incidence and the final global prevalence when \(\kappa \) decreases from unity down to sensible but really strict values (around \(\kappa =0.1\)). Now, moving from \(\chi =1\) to \(\chi =0.8\) we can obtain an important reduction of the impact, both for \(\Theta =20\) and also \(\Theta =500\). See Tables 1 and 2 for an outline of the results given a selection of \((\kappa ,\chi )\) scenarios. Finally, with respect to locked districts, with \(\Theta =20\) it is possible to avoid the invasion of the entire system, but it requires a strong reduction of mobility, going well below \(\kappa =0.5\) (see Table 1). Note the difficulty of doing this: PLs have to be activated very soon and, at the same time, it is essential to achieve a strong reduction of global mobility in the system to effectively save a few districts from experiencing an outbreak. With \(\Theta =500\), the full invasion is unavoidable, except for extremely low values of mobility.
Discussion
Examples of perimeter lockdowns of highly denseintegrated suburban areas are scarce. The inspection of the real epidemiological and mobility data from Madrid casts a lot of doubts about its proper implementation and its effectiveness. As we referenced previously, this is something that the few works devoted to the experience of Madrid have formally confirmed^{21,22}. In^{21}, through a joint point trend analysis, the authors found that the decrease in the epidemic curve, both in the entire city and the BHZ affected, started before the impact of the perimeter lockdown could have been reflected, and also found that the strategy did not increase the speed at which cases were decreasing. The authors offer several reasons for the strategy’s failure: (1) the curve started to decrease before measures were taken. (2) Perimeter lockdowns were focused on mobility rather than preventing highrisk situations. (3) Even though the focus lied on mobility, it was allowed for essential activities such as working. And (4), BHZ boundaries were unknown to many residents since these are used for public healthcare administration. Regarding our particular experiment, points (2) and (3) apply and align well with our conclusions: mobility is not very much effective in this kind of setting, and the focus should be on preventing highrisk situations like workplace or community mixing. In^{22}, through the use of a generalized additive models technique, they reach a similar conclusion: the perimeter confinements did not have a significant impact on the 14day cumulative incidence.
To further understand the mechanisms underpinning the spreading dynamics in this strategy, we conceived a minimal model using a metapopulation framework parameterized using real mobility data. Our model results show how difficult it is to control an outbreak in an urban environment under the PLs. The reduction is critically marked by how successful the transmissibility reduction is within a district, with mobility playing a minor role. Note that Madrid initially set its lockdown risk threshold at \(\Theta =1000\) and then changed it dynamically up and down, being \(\Theta =350\) the lowest documented. In our model, even when the threshold was \(\Theta =20\), a very high effort on reducing general mobility was needed to avoid invasion of the full system. This mobility reduction was not even achieved during the national lockdown that closed most businesses and industries (Fig. 2). Furthermore, during a PL in Madrid, it was still allowed to go to your workplace even if it was in another district.
Localized lockdowns were also implemented in Santiago de Chile during its first COVID19 wave. In^{23}, Li et al. explored their performance, obtaining mixed results. The authors state that localized lockdowns on their own are insufficient to control pandemic growth in the presence of indirect effects from contiguous neighboring areas that do not have lockdowns. As we did, they found that localized lockdowns can help contain the transmission of the virus but their effectiveness is dependent on its duration and indirect effects from neighboring areas with high social interconnectivity. Moreover, their estimates showed that in Greater Santiago the epidemic is only controlled when generalized lockdowns are in place. In contrast, these measures showed promising results in municipalities that were rather isolated from affected neighboring areas. They concluded that the growth of disease transmission is reversed only when lockdowns are implemented in a coordinated fashion across interconnected geographic areas.
Urban systems for the most part are typically very well interconnected systems where it is easy to move from one part to another in time scales significantly lower than 1 day. Large portions of the population in these systems mix at different sites during the day: whether at workplaces, at schools, at the public transportation system, or during leisure activities. Therefore, a high level of synchronization in the spreading can be expected. Hence, when an outbreak emerges in one area, it will quickly spread through the system unless mobility is extremely reduced. If perimeter lockdowns are accompanied by significant transmissibility reductions, the measures can make a difference to flatten the curves. But unless the action is performed soon enough, the most probable course of action for the spreading is to quickly invade the full system. If the goal of the PLs is to protect some parts of the system so that citizens inside can normally live and perform their daily activities, this seems unachievable under reasonable assumptions and regular behavior. Our results from a sound theoretical model which idealized several critical features and thus, overall, offered a bestcase scenario, seem to confirm this thesis. Moreover, the real epidemiological data for Madrid clearly shows the synchronization phenomena among different areas. Responses that aim to partially isolate areas of a system that are so spatially interconnected and temporally synchronized are likely to be insufficient. As results have shown, the emphasis should not be on mobility (either general or among particular areas) but on general measures that bring transmission down where the mixing or contact is effectively produced.
Our model explains the qualitative features of the real epidemic spreading observed in Madrid under the PLs and sets a general model to approach this type of situation. Nonetheless, it has its limitations. As we have already stated, our model is minimal and is intended to capture only the most basic features of the spreading together with the control strategy, but it is not intended to reproduce the real COVID19 trajectories that took place during the period studied. COVID19 is a complex disease with a long latency period, an important amount of presymptomatic infectivity and even asymptomatic transmission. Moreover, the disease can present high hospitalization and death rates which are highly agedependent. These are elements worth taking into account when aiming for accurate COVID19 forecasting. However, regarding the assessment of nonpharmaceutical interventions as the one presented here, the SIR model stands as a simple but bestcase scenario modeling choice. The rationale is that even though we neglect key elements that would hinder surveillance and disease control, such as a latency period and asymptomatic disease progression, the outcome is still unfavorable for the success of the strategy. Another limitation is that, at the subpopulation level, a homogeneous wellmixing scheme is considered. This is a standard assumption within the metapopulation framework but indeed relevant heterogeneous features may exist both intradistrict and interdistrict, such as age differential mixing. We also remark that our implementation of PLs assumed perfect information and absolute compliance. Moreover, travel bans were totally cut down, which is at odds with the permeability allowed in the reallife setting. Thus, even though our model is limited in many aspects, it can be, in general, regarded as a bestcase scenario. The fact that the PLs did not achieve high effectiveness under these circumstances signals that in a real setting the situation would be worse.
Even though our minimal model indicates that the effectiveness of perimeter lockdowns at the urban scale is low, more detailed modeling could unveil subtleties at lower scales. Future works could aim for increased heterogeneity in human behavior. One could use micromobility models based on points of interests at the subpopulation level to break the homogeneous mixing assumption. In terms of the population, the addition of the socioeconomic characteristics of the population may help to disentangle the differential impact of nonpharmaceutical strategies on the diverse population strata. Indeed, even though at the aggregated level perimeter lockdowns appear to be inefficient, their impact on the most vulnerable parts of the population is yet unknown and is open for further research. From a theoretical point of view, an interesting research line would be to determine the amount of spatial cohesion at which these systems tend to be highly synchronized and for which mobility plays only a minor role beyond the initial stages. This could facilitate the analysis of strategies similar to the one presented here at multiple scales, such as metropolitan areas or urbanrural systems.
Methods
Madrid’s surveillance data
To test the effectiveness of the measures in the particular case of Madrid, we have explored the official epidemiological data reported by the government^{35} and collected the time series for the 14day cumulative incidence rate (14d CIR) for all the BHZs belonging to the city of Madrid. The 14d CIR is a standard in the field of public health^{36} and is measured as:
where N is the total population assuming a fully susceptible population at the beginning of the outbreak, and the summation of new cases is done over the previous 14 days. The value is given for every 100, 000 inhabitants. Therefore, for the sake of brevity, all references to this variable will omit this factor.
In Madrid, this indicator was used to determine whether or not a particular BHZ had to be confined, together with other auxiliary information such as its trend or the presence of community transmission. The threshold value upon which a PL was implemented varied in time. Consequently, for a more complete picture, we also reconstructed the 14d CIR threshold, or activation threshold, by looking at official bulletins^{37}. The confined status of a BHZ was held for two weeks and then reviewed according to its epidemiological situation.
Theoretical framework: Metapopulation model
The metapopulation framework is a versatile way of modeling the spreading of an epidemic in which the spatial distribution of individuals plays a major role^{31,32}. In particular, we create a metapopulation system composed of 21 subpopulations representing each of the 21 administrative districts of the city of Madrid, Spain. Within each subpopulation, the epidemic dynamics are governed by the classical SIR model under the wellmixed approximation. It must be noted that, even though this model cannot capture some of the particular characteristics of COVID19, it can still provide useful insights for settings in which those characteristics do not play a major role, as in our analysis^{33,38}. In cases in which case detection or the latency period might be relevant, it would be necessary to use an SEIR model or one of its variants.
Epidemic modeling
At the district level, we implement a wellmixed SIR compartmental model. In this model, individuals are classified according to their health status: susceptible (S) if they are susceptible to catching the disease, infected (I) if they have been infected and can infect others, and removed (R) when they are either recovered or deceased. Within each district, the transition between compartments results from the following rules, iterated at each time step, corresponding to \(\Delta t=1\) day^{39}:

\(S \rightarrow I\): Susceptible individuals in district i are infected with probability \(P_i(S\rightarrow I)=1[1R_0\Delta t/(T_IN_i)]^{I_i}\), where \(R_0\) is the basic reproduction number of the disease, \(T_I\) is the mean infectious time, \(N_i\) represents the number of people in district i and \(I_i\) represents the number of infected individuals in the said area.

\(I \rightarrow R\): Infected individuals become removed at a rate inversely proportional to the mean infectious period, \(T_I\). The probability for an infected individual to transition to the removed state is thus simply \(P(I\rightarrow R)=\Delta t/T_I\).
The new infected and removed individuals are generated stochastically by sampling from binomial distributions using the above probabilities, respectively^{39,40}.
Mobility
To estimate realistic mobility patterns we use the data from a mobility survey carried out by the Spanish Ministry of Transport, Mobility and Urban Agenda^{41}. This survey provides the estimated number of individuals going from one district to another every day since February 2020 to May 2021. We use the data from the prepandemic period to build a baseline mobility matrix that is not influenced by any changes on social interactions produced by the pandemic. Indeed, as described in the main text, we use an effective value of the basic reproduction number that already incorporates all these effects. Thus, if we were to use the real data from the period under study, we would be counting twice certain interventions.
Each element of the mobility matrix, \(D_{ij}\), represents the rate at which individuals move from district i to district j. This can be estimated from the origindestination (OD) matrix provided by the Spanish government, M, in which \(M_{ij}\) represents the number of individuals traveling from district i to district j. In particular, the elements of D are defined as:
where \(D_{ij}\) is the rate at which individuals move from district i to district j and \(\kappa \) is a general mobility parameter. The baseline values of \(D_{ij}\) are obtained considering \(\kappa =1\). When \(\kappa \rightarrow 0\), we see that \(D_{ii}\rightarrow 1\), so that the rate of individuals staying at their origin district approaches one. The particular values of \(D_{ij}\) are calculated using data from the Ministry’s survey from the prepandemic period. Then, at each step \(\Delta t\), the number of travelers from district i to every destination j is sampled from a multinomial process with probabilities \(D_{ij} \Delta t\).
Perimeter lockdown strategy
The response against the spreading process is assumed to be the bestcase scenario, with perfect information and neither exceptions nor violations of the policies enacted by the authorities. The observable to monitor the effectiveness in every district is the same as in the reallife setting, the 14d CIR. We set a risk threshold \(\Theta \) so that whenever \(14\textrm{d}\;\textrm{CIR}_i\ge \Theta \) for district i, we say that this district is at risk and thus it is set under a perimeter lockdown. The implications for a district under this type of lockdown are twofold:

1.
Travel bans. Flows of travelers from and to the district at risk are completely suppressed. Note that this intervention is independent of the value of \(\kappa \), which controls the overall mobility in the system even in the absence of restrictions. It is also important to remark that this is again a bestcase scenario since in reality trips involving affected areas were allowed for a variety of circumstances.

2.
Transmissibility reduction. Localized lockdowns usually come with additional measures to try to control the spreading within the affected area. This may include a rise in disease awareness through mass media and authorities’ advertisements and actions like occupancy limits and mandatory wearing of face masks. The combination of such actions would translate into a reduction of the transmissibility, its magnitude being dependent on people’s compliance and the intensity and effectiveness of those same measures. To model this, we set a local transmissibility rate for each closed district i, \(\beta _i=\chi \beta \), where \(\beta \) is the general transmissibility rate related to the basic reproductive number of the disease \(R_0=\beta T_I\), and \(\chi \) is the fraction of the reduction in transmissibility. For normal districts, \(\chi =1\), but when a district is under lockdown, this quantity is \(\chi <1\).
Once these measures are in place for a district at risk, the restriction remains until the outbreak ends in the whole system. That is, when the global incidence is \(I=0\). In reality, however, once the affected areas stopped fulfilling the lockdown requirements, these restrictions were lifted. Since we are not seeking a replication of the Madrid epidemiological trajectory, but a general exploration and understanding of the basic dynamics under these types of lockdowns, we limit ourselves to studying what happens in this extreme scenario.
Population and mobility data
The metapopulation model is informed by real population and mobility data from Madrid. Madrid is the capital city of Spain with a population of \(N=3,312,310\) inhabitants in 2020. The prime administrative divisions of the city are \(V=21\) distritos (districts). The model does not resolve at the basic health zone (BHZ) level, which is the one that was actually considered for the PLs, due to the lack of more finegrained mobility data. In Table 3, we collect the population size at the district level \(N_i\) (note that a BHZ generally encompasses between 5000 and 25,000 inhabitants). Regarding mobility data, we obtained interdistrict mobility flows provided by the Spanish Ministry of Transport as part of a survey aimed at analyzing changes in mobility patterns within Spain amid the COVID19 crisis and at evaluating the effect of mobility restrictions^{41}. This survey is based on cell phone data provided by cell phone carriers.
The data of interest spans a period ranging from March 2020 until May 2021. There is also a week of data in February 2020, from day 14 to day 21, used as a baseline reference for comparisons with the COVID19 period. We refer to this period as the regular mobility scenario. We took only this reference period since we want to inform our urban model of Madrid with regular or unperturbed data. These data are used to build the origindestination matrix \({\textbf {M}}\). To do so, we average the mobility flows between i and j for the whole week so that \({\textbf {M}}\) is timeindependent.
Data availability
The epidemiological data is publicly available at^{35}. The raw mobility data is publicly available at^{41}. The code with the model used for the simulations, together with an example script and plot, and the curated mobility data for the city of Madrid used for informing the model can be accessed at https://github.com/phononautomata/madrid.
References
Perra, N. Nonpharmaceutical interventions during the COVID19 pandemic: A review. Phys. Rep. 913, 1–52 (2021).
Chinazzi, M. et al. The effect of travel restrictions on the spread of the 2019 novel coronavirus (COVID19) outbreak. Science 368, 395–400 (2020).
Costantino, V., Heslop, D. J. & MacIntyre, C. R. The effectiveness of full and partial travel bans against COVID19 spread in Australia for travellers from China during and after the epidemic peak in China. J. Travel Med. 27, taaa081 (2020).
Carranza, A. et al. The social divide of social distancing: Lockdowns in Santiago during the covid19 pandemic. Tech. Rep. (2020).
Lai, S. et al. Effect of nonpharmaceutical interventions to contain COVID19 in China. Nature 585, 410–413 (2020).
Qian, M. & Jiang, J. COVID19 and social distancing. J. Public Health 1–3 (2020).
Gros, D. et al. The great lockdown: Was it worth it. CEPS Policy Insights11 (2020).
Spelta, A., Flori, A., Pierri, F., Bonaccorsi, G. & Pammolli, F. After the lockdown: Simulating mobility, public health and economic recovery scenarios. Sci. Rep. 10, 1–13 (2020).
Pedauga, L., Sáez, F. & DelgadoMárquez, B. L. Macroeconomic lockdown and SMEs: The impact of the COVID19 pandemic in Spain. Small Bus. Econ.https://doi.org/10.1007/s11187021004767 (2021).
Inoue, H. & Todo, Y. The propagation of economic impacts through supply chains: The case of a megacity lockdown to prevent the spread of COVID19. PLoS ONE 15, e0239251 (2020).
Aday, S. & Aday, M. S. Impact of COVID19 on the food supply chain. Food Qual. Safety 4, 167–180 (2020).
Guan, D. et al. Global supplychain effects of COVID19 control measures. Nat. Hum. Behav. 4, 577–587 (2020).
Vieten, U. M. The, “new normal” and “pandemic populism”: The COVID19 crisis and antihygienic mobilisation of the farright. Soc. Sci. 9, 165 (2020).
Chu, I.Y.H., Alam, P., Larson, H. J. & Lin, L. Social consequences of mass quarantine during epidemics: A systematic review with implications for the COVID19 response. J. Travel Med. 27, taaa192 (2020).
Reicher, S. & Stott, C. On order and disorder during the COVID19 pandemic. Br. J. Soc. Psychol. 59, 694–702 (2020).
Candel, F. J. et al. Integral management of COVID19 in Madrid: Turning things around during the second wave. Lancet Reg. Health Eur. 2, 100039 (2021).
FontánVela, M., Gullón, P. & PadillaBernáldez, J. Reply to “Integral management of COVID19 in Madrid: Turning things around during the second wave”. Lancet Reg. Health Eur. 3, 100065 (2021).
Lobo, F. Reply to “Integral management of COVID19 in Madrid: Turning things around during the second wave”. Lancet Reg. Health Eur. 3, 100066 (2021).
Zunzunegui, M.V., López, F. J. G., RoyoBordonada, M. Á. & Cienfuegos, I. Reply to “Integral management of COVID19 in Madrid: Turning things around during the second wave”. Lancet Reg. Health Eur.https://doi.org/10.1016/j.lanepe.2021.100065 (2021).
LópezEncuentra, Á., de y Mercado, P. L., Abraira, V., Rull, S. G. & Rodríguez, F. P. Reply to: “Integral management of COVID19 in Madrid: Turning things around during the second wave”. Lancet Reg. Health Eur. 3, 100069 (2021).
FontánVela, M., Gullón, P. & PadillaBernáldez, J. Selective perimeter lockdowns in Madrid: A way to bend the COVID19 curve?. Eur. J. Public Health 31, 1102–1104 (2021).
David, G.G. et al. Perimeter confinements of basic health zones and COVID19 incidence in Madrid, Spain. BMC Public Health 22, 216 (2021).
Li, Y., Undurraga, E. A. & Zubizarreta, J. R. Effectiveness of localized lockdowns in the COVID19 pandemic. Am. J. Epidemiol. 191, 812–824 (2022).
Balcan, D. et al. Modeling the spatial spread of infectious diseases: The global epidemic and mobility computational model. J. Comput. Sci. 1, 132–145 (2010).
Tizzoni, M. et al. Realtime numerical forecast of global epidemic spreading: Case study of 2009 a/h1n1pdm. BMC Med. 10, 1–31 (2012).
Arenas, A. et al. Modeling the spatiotemporal epidemic spreading of COVID19 and the impact of mobility and social distancing interventions. Phys. Rev. X 10, 041055 (2020).
Parino, F., Zino, L., Porfiri, M. & Rizzo, A. Modelling and predicting the effect of social distancing and travel restrictions on COVID19 spreading. J. R. Soc. Interface 18, 20200875 (2021).
Coletti, P. et al. A datadriven metapopulation model for the Belgian COVID19 epidemic: Assessing the impact of lockdown and exit strategies. BMC Infect. Dis. 21, 1–12 (2021).
Aleta, A. & Moreno, Y. Evaluation of the potential incidence of COVID19 and effectiveness of containment measures in Spain: A datadriven approach. BMC Med. 18, 1–12 (2020).
Ajelli, M. et al. Comparing largescale computational approaches to epidemic modeling: Agentbased versus structured metapopulation models. BMC Infect. Dis. 10, 1–13 (2010).
Colizza, V. & Vespignani, A. Epidemic modeling in metapopulation systems with heterogeneous coupling pattern: Theory and simulations. J. Theor. Biol. 251, 450–467 (2008).
Wang, L. & Li, X. Spatial epidemiology of networked metapopulation: An overview. Chin. Sci. Bull. 59, 3511–3522 (2014).
Zhang, J. et al. The impact of relaxing interventions on human contact patterns and SARSCoV2 transmission in China. Sci. Adv. 7, eabe2584. https://doi.org/10.1126/sciadv.abe2584 (2021).
SAMUR—Protección Civil. COVID19 Actualización Científica (COVID19 Scientific Update). Accesses 7 Nov 2020 (2020).
Covid 19 tia zonas básicas de salud. https://datos.comunidad.madrid/catalogo/dataset/covid19_tia_zonas_basicas_salud. Accessed 3 May 2022 (in Spanish).
Dicker, R. C., Coronado, F., Koo, D. & Parrish, R. G. Principles of epidemiology in public health practice; an introduction to applied epidemiology and biostatistics (2006).
Repositorio histórico de las medidas adoptadas durante la crisis sanitaria por la covid19. https://www.comunidad.madrid/servicios/salud/comunicadoscovid19normativanotasprensa. Accessed 3 May 2022 (in Spanish).
Zhang, J. et al. Changes in contact patterns shape the dynamics of the COVID19 outbreak in China. Science 368, 1481–1486. https://doi.org/10.1126/science.abb8001 (2020).
Meloni, S. et al. Modeling human mobility responses to the largescale spreading of infectious diseases. Sci. Rep. 1, 1–7 (2011).
Balcan, D. & Vespignani, A. Phase transitions in contagion processes mediated by recurrent mobility patterns. Nat. Phys. 7, 581–586 (2011).
Plan de medidas para responder al impacto del covid 19 en el sector transporte y movilidad. https://www.mitma.gob.es/ministerio/covid19/evolucionmovilidadbigdata. Accessed 3 May 2022 (in Spanish).
Acknowledgements
A. dM.A. is funded by an FPI Predoctoral Fellowship of MINECO. We acknowledge partial support from the Government of Aragon, Spain and “ERDF A way of making Europe” through grant E3620R (FENOL) to A. dM. A, A. A and Y. M., from Ministerio de Ciencia e Innovación, Agencia Española de Investigación (MCIN/AEI/10.13039/501100011033) Grant No. PID2020115800GBI00 to A. dM. A, A. A. and Y.M., from Banco Santander (SantanderUZ 2020/0274) to A. A. and Y.M. A. A. acknowledges support from Grant RYC2021033226I funded by MCIN/AEI/10.13039/501100011033 and the European Union NextGenerationEU/PRTR. The funders had no role in the study design, data collection, and analysis, decision to publish, or preparation of the manuscript.
Author information
Authors and Affiliations
Contributions
A.dM.A. performed the data curation, developed the code for the simulations, contributed to the formal analysis, did the visualization, wrote the original draft, reviewed and edited the manuscript. A.A. and Y.M. both conceived the experiment, contributed to the formal analysis, reviewed and edited the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
de Miguel Arribas, A., Aleta, A. & Moreno, Y. Assessing the effectiveness of perimeter lockdowns as a response to epidemics at the urban scale. Sci Rep 13, 4474 (2023). https://doi.org/10.1038/s41598023316148
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598023316148
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.