Optimizing social and economic activity while containing SARS-CoV-2 transmission using DAEDALUS

To study the trade-off between economic, social and health outcomes in the management of a pandemic, DAEDALUS integrates a dynamic epidemiological model of SARS-CoV-2 transmission with a multi-sector economic model, reflecting sectoral heterogeneity in transmission and complex supply chains. The model identifies mitigation strategies that optimize economic production while constraining infections so that hospital capacity is not exceeded but allowing essential services, including much of the education sector, to remain active. The model differentiates closures by economic sector, keeping those sectors open that contribute little to transmission but much to economic output and those that produce essential services as intermediate or final consumption products. In an illustrative application to 63 sectors in the United Kingdom, the model achieves an economic gain of between £161 billion (24%) and £193 billion (29%) compared to a blanket lockdown of non-essential activities over six months. Although it has been designed for SARS-CoV-2, DAEDALUS is sufficiently flexible to be applicable to pandemics with different epidemiological characteristics. Smart pandemic mitigation strategies are proposed to strategically close higher-risk economic sectors, while allowing dozens of other economic sectors to continue. This would enable schools to remain open and keep hospitalizations within capacity.

T he SARS-CoV-2 pandemic has galvanized debates on how to maintain economic and educational activities while reducing the spread of infection. Until vaccination coverage reaches a sufficiently high level, many countries need to implement nonpharmaceutical interventions (NPIs) to keep infections under control. Closures of schools and businesses deemed non-essential for day-to-day life are highly effective in reducing transmission, but they are associated with high economic and social costs [1][2][3][4] and they are crude interventions if implemented as blanket policies across the whole economy. Economic activities differ greatly in the infection risk that they pose to both workers and consumers, in their potential to implement effective social distancing measures and in the contributions they make to gross domestic product (GDP). It is vital to model how lockdowns can be fine-tuned to prevent health services from being overwhelmed, while minimizing the economic costs associated with business closures and the social costs associated with the closure of educational institutions.
DAEDALUS is an integrated economic-epidemiological model that computes the optimal trajectory of selective opening and closing of economic sectors that maximizes GDP while keeping infections under control. DAEDALUS provides concrete policy guidance on a smart opening/closure strategy differentiated by economic sectors. Changes to the economic configuration can be made at discrete time points over the projection horizon. Here we provide an example application to 63 sectors in the United Kingdom and assume a six-month horizon with three such decision points at 0, 2 and 4 months. With a few changes to the epidemiological and economic parameters, DAEDALUS can be applied to any country and respiratory pandemic that requires mitigation measures. Before this study, there was very little evidence on how to optimally design lockdown policies during pandemics. DAEDALUS necessarily rests on many assumptions, but it provides urgently needed guidance to policymakers on how to design policies that balance key societal objectives.

Results
Model overview. There are large variations in physical proximity by occupation type 5 . At the core of DAEDALUS lies the insight that relatively contact-light sectors that employ fewer workers carry less infection back into the community when they are open compared to more contact-intensive sectors with more workers (Fig. 1). Partial or full opening and closing of a sector leads to changes in the sector's active workforce and disease transmission in the workplace, during transport and in the community. It also changes the sector's associated contribution to the economy, in the form of gross value added (GVA). GVA is the value of a sector's output minus the value of intermediate inputs, that is, the products from other sectors that are used in production. GDP is the sum of the GVA of all sectors.
DAEDALUS calculates the GDP-maximizing set of sector closures over a chosen projection horizon, while containing the daily hospital occupancy of patients with COVID-19 to within the maximum spare emergency hospital capacity (H). Constraints on closures are applied to each sector to ensure essential services are maintained. To account for interdependencies between sectors, we require that, in producing a sector's final outputs, the intermediate inputs required from other sectors are available. Otherwise, a To study the trade-off between economic, social and health outcomes in the management of a pandemic, DAEDALUS integrates a dynamic epidemiological model of SARS-CoV-2 transmission with a multi-sector economic model, reflecting sectoral heterogeneity in transmission and complex supply chains. The model identifies mitigation strategies that optimize economic production while constraining infections so that hospital capacity is not exceeded but allowing essential services, including much of the education sector, to remain active. The model differentiates closures by economic sector, keeping those sectors open that contribute little to transmission but much to economic output and those that produce essential services as intermediate or final consumption products. In an illustrative application to 63 sectors in the United Kingdom, the model achieves an economic gain of between £161 billion (24%) and £193 billion (29%) compared to a blanket lockdown of non-essential activities over six months. Although it has been designed for SARS-CoV-2, DAEDALUS is sufficiently flexible to be applicable to pandemics with different epidemiological characteristics.
sector that is nominally opened may not be able to function properly if its supply chain is interrupted 6,7 . Finally, we constrain the effective reproductive number (R t ) at the end of the projection horizon to be less than or equal to 1, denoted R end ≤ 1, to ensure that residual infections do not surge rapidly just beyond the intervention period.
For illustration, we apply DAEDALUS to the United Kingdom (UK). We obtained data on interdependencies between 63 economic sectors from the most recent UK input-output (IO) table from 2016 8 (for details see Supplementary Note 1.1 and Supplementary Data 1 for an illustrative excerpt for the education sector). We use recent data on the workforce 9 and on those working from home 10 . We specify a lower bound to production that allows demand for essential goods and services to be met, informed by empirical data on economic activity during the UK's first stringent lockdown in March to May 2020 11 . The upper bound is given by the level of pre-pandemic production and assumes that the demand for goods and services does not exceed pre-pandemic levels.
We use a deterministic susceptible-exposed-infectious-removed (SEIR) model of SARS-CoV-2 transmission to project the spread of infection in the workplace, the education sector, households, travel and the community as sectors are opened and closed to varying degrees. The SEIR model accommodates sectoral and age heterogeneity in risk of infection via three contact matrices (Supplementary  Tables 1 and 2): worker-to-worker, consumer-to-worker and the community. Worker-to-worker contact rates are derived from a French social contact survey 12   Yellow boxes represent non-workers, workers and students during leisure time or when tele-working or tele-studying, the economy is represented by blue boxes, and travel between these places is indicated by arrows. The economy consist of workers in distinct economic sectors that are interrelated via complex supply chains as represented by input-output tables (shown as a blue box). Workers, students and consumers move between the community and the economy. Transmission of infections in the community, at workplaces, in educational institutions, while consuming goods and services and traveling is modeled via a deterministic compartmental SEIR model (bottom left). The SEIR model projects infections and hospitalizations. Contact rates vary by age group and by economic sector. There are two constraints in the model to any policy that optimizes GDP while containing infections via economic closures. First, interdependencies between sectors and the need for essential production limits the extent to which the economy can be closed (arrow 'Econ constraint'). Second, the need to contain the number of hospital patients to within the available hospital capacity limits the extent to which the economy can be opened (arrow 'Epi constraint'). The government has two levers to reduce infections (gray arrows): economic closures of economic activity not essential to dayto-day life, and other NPIs (social distancing, test-and-trace and so on). Policy makers can mandate the partial or full closure of non-essential economic production of some or all of the economic sectors. This reduces workplace infections because workers and/or students stay in the community and do not travel and spend time at workplaces, which has a dampening effect on community infections. However, closures reduce sectors' economic production because not all workers can work from home. This results in less economic output (blue box, gross value added) and a reduction in short-term GDP (blue box), compared to pre-pandemic production. NPIs reduce transmission of infection but have no impact on economic production (gray arrow). In the optimization, economic closures keep hospitalizations within the available hospital capacity, while maximizing GDP.
distancing in social and work environments, test-and-trace interventions, shielding of vulnerable persons, travel restrictions and limits to social gatherings. For the application, we calibrate the epidemiological model via a least-squares fit to English hospital occupancy data from 20 March to 30 June 2020 14 by varying four parameters: the basic reproductive number R 0 ; the effectiveness of the UK's first lockdown captured by the parameter δ LD ; the epidemic start time; lockdown onset. Transmissibility is calculated from the fitted basic reproductive number R 0 and pre-lockdown contact patterns using the next-generation eigenvalue method 15   GDP over six months is £865 bn. Scenario A maximizes GDP via successive opening and closing of 63 sectors once every two months over a six-months intervention period, subject to epidemiological and economic constraints. Any economic sector including education may close to 80% of the minimum levels observed during the UK's first lockdown (March-May 2020), but not lower, to sustain essential services. In a, projected daily infection prevalence per 10 million population and daily hospital occupancy from January to February are shown. Emergency hospital capacity for the treatment of patients with COVID-19 is constrained at 18,000 beds (second gray line from the bottom in a). In b, the optimal economic configurations (extent of bi-monthly sector closures) under scenario A GDP maximization are shown. Sector divisions are listed on the vertical axis (Supplementary Table 3 provides the sector descriptions) and months on the horizontal axis. LD is the first lockdown in March to May 2020 in the UK, based on available data for closures of higher-level sector categories. Period 1 is September to October, period 2 is November to December, period 3 is January to February. Openings vary between fully open as in pre-pandemic (yellow, 1.0) to closed (blue, 0). The scenario recommends partial closure of the education sector (Supplementary Table 2).
December (56%) and January and February (53%). Some other sectors require closure under any H. Educational activities are probably chosen for closure because they contribute to transmission but have relatively little impact on short-term GDP, as measured in national accounts.
The GDP achieved by scenario A is £865 billion (bn) over six months (H = 18,000; Fig. 3a), 31% higher than the £660 bn of a blanket lockdown (scenario LDA), but slightly lower than the £889 bn achieved with a fully open economy (scenario FO). However, FO results in high incidence and deaths. FO also means that over 90,000 patients with COVID-19 would require hospital treatment at the projected peak in February, compared to 18,000 patients under scenario A.
Keeping education operational. The conventional measures of GVA used in IO tables substantially underestimate the contribution of the education sector to national prosperity 16 , so it is important to treat it as a special case. Scenario B seeks out a differentiated sectoral closure strategy that maximizes GDP while requiring education to remain at least 80% open. In this scenario, infections (and hospital occupancy and deaths) are allowed to increase between September and December towards the hospital capacity ( Fig. 4a,b shows the results for H = 18,000 and Supplementary Figs. 3 and 4 for H = 12,000 and H = 24,000), but then more stringent economic closures are imposed in January and February to satisfy the constraint on R t at the end of the projection horizon. If H = 18,000, education is the only sector required to partially close for the whole intervention period, almost at the 80% lower level specified (Supplementary Data 2). In January and February, five additional key sectors are mainly targeted: accommodation and food services (with almost complete closure at 8%), creative, arts and entertainment and sports, amusement and recreation (both 39%), membership organizations and other personal services, which includes hairdressing and beauty treatments (both 40%), and a few other sectors. If H = 12,000, partial closures of the key sectors are required earlier, from November onwards. If H = 24,000, closures for education, accommodation and food, sports and recreation, membership organizations and personal services are similar to those for H = 18,000, but creative, arts and entertainment can stay almost completely open throughout.
The economic output achieved when following a strategy that optimizes GDP while the education sector is operational is estimated to be £854 bn over six months (H = 18,000, Fig. 3b), a gain of £184 bn (27%) over the £670 bn associated with a blanket lockdown of all sectors except education (scenario LDB). The gain would be £161 bn (24%) at H = 12,000 and £193 bn (29%) at H = 24,000. The GDP is higher for the A scenarios compared to the 'education open' B scenarios (Fig. 3a,b). The difference between the two reflects the GDP losses associated with keeping educational services active, which amounts to £11 bn (£865 bn − 854 bn) for H = 18,000. The loss between scenarios A and B is significantly higher at £31 bn if H = 12,000 and lower at £5 bn if H = 24,000. This loss occurs because the education sector is more contact-intensive than many other sectors, but makes lower nominal GVA contributions. In the B scenarios, higher-value sectors must close more stringently to compensate for the increase in transmission caused by education.
Role of hospital capacity. Hospital capacity plays an important role in the trade-offs in DAEDALUS and acts as a continuous constraint over the projection horizon (Supplementary Note 1.4). The optimal solutions under the B scenarios keep hospital occupancy closer to capacity in the later months, whereas occupancy steadily increases under the A scenarios. This has different implications for hospitals, with total bed days over the intervention period varying between  In scenario A, any economic sector-including education-may close to 80% of the observed minimum levels. In LDA, all economic sectors close to the observed minima. In scenario B, the education sector is operational at 80% throughout, and all other sectors may close to the observed minima. In LDB, all economic sectors close to the observed minima except for the education sector, which is operational at 80%. Table 5). Sector closures can be less stringent if decision-makers are prepared to let the level of infections (and hospitalizations and deaths) increase and to invest in additional emergency hospital capacity. The gain in GDP for scenario B when hospital capacity is increased from 12,000 to 18,000 is £23 bn over six months and £9 bn for an increase from 18,000 to 24,000 ( Fig. 3b). This gain occurs because the increase by 6,000 beds allows for a more open economy (Supplementary Figs. 3b and 4b). Over winter 2020/2021, the UK actually managed to increase capacity to nearly 40,000 beds by canceling many elective surgeries, using private hospital capacity, deploying retired medical and nursing staff, constructing field hospitals and re-organizing care. Such interventions are costly. It most probably also required rationing healthcare. We can also quantify the GVA loss that can be averted by increasing hospital capacity across the economic sectors that require partial closure. Given its relatively high contribution to transmission compared to GVA, the education sector frequently operates at 80% for the optimal solutions under any H. For the other sectors, there are gains associated with increasing hospital capacity ( Fig. 5 and Supplementary Data 3). If H = 12,000, the GVA loss for accommodation and food services amounts to ~£15.5 bn under scenario B, and for retail ~£6.9 bn. If hospital capacity is increased to H = 24,000, the GVA loss for accommodation and food would be reduced to £9.8 bn, and for retail to zero. If we allow infections and hospitalizations to increase, there will be more deaths, which are implicit in the level of hospital capacity chosen by decision-makers.
Sensitivity analyses. We conducted extensive sensitivity analyses (for details see Supplementary Note 1.5 and the results in Supplementary Figs. [5][6][7][8][9][10][11][12][13][14]. Our findings are sensitive to assumptions on a lower stringency of other NPIs, as represented by δ = 0.72 ( Fig. 6 and Supplementary Data 4), and the proportion of workers working from home. Much of the uncertainty in projected hospital occupancy arises from contact rates in the community and education sector, rather than other economic sectors. Our findings are less sensitive to assumptions on lower infection susceptibility of children, increased frequency of decision points, decreased labor productivity, waning of infection-induced immunity and a 12-month intervention horizon.

Discussion
We have developed DAEDALUS, a model that calculates optimal differentiated sectoral closure strategies. Economic sectors are partially closed with the objective to minimize economic losses while keeping essential production going and keeping hospitalizations within available treatment capacity. The pandemic has greatly advanced the field of economic epidemiology, and there are now many studies that model the trade-off between the economic and public health impacts of COVID-19 17 . Among those, a number of studies evaluate alternate control strategies on economic output and health outcomes with integrated macroeconomic-epidemiological models (for example refs. 6,7,[18][19][20][21][22][23][24], with some studies modeling in more detail the impact on the productivity of individuals [25][26][27] or on consumption, labor force participation 28 and investment decisions 29 and how those propagate through a macroeconomic model. Other studies focus on international trade 7,30,31 . Most studies simplify the economy by either considering an abstract measure of aggregate economic output or by allocating sectors into two categories (for example, high/low transmission or essential/non-essential). Two studies 6,7 model interdependencies between sectors, which allows impact projections of differentiated lockdown strategies, as done in DAEDALUS. Most studies employ simplified epidemiological models that do not consider disease latency, asymptomatic infection or age-structured severity, all of which are important for realistic projections. Models are generally not fitted to the actual pandemic trajectory, limiting their usefulness for informing policy, with the exception of two studies 20,21 . Furthermore, although many studies investigate the combined epidemiological and economic effects of GDP over six months is £854 bn. Scenario B optimizes GDP via successive opening and closing of 63 sectors every two months, over a six-month intervention period, subject to epidemiological and economic constraints. Any economic sector except for education may close to 80% of observed minimum levels. Education is constrained to stay operational at or above 80% of pre-pandemic production levels. In b, the optimal economic configuration targets several sectors for partial closure (Supplementary Table 2). lockdown policies, most fall short of calculating the impact on GVA by sector. By contrast, we have developed an integrated model, differentiated by economic sectors, which poses the decision-makers' problem as an optimal control model with both discrete and continuous constraints and discrete decision points. This allows us to give numerical outputs that can guide decisions about which sectors to open, and to what extent.
Our analysis has important limitations. DAEDALUS has been developed to offer practical policy advice during the SARS-CoV-2 pandemic by modeling a highly complex and continuously evolving epidemiological/economic system. As many aspects of the pandemic are highly uncertain, including the epidemiological parameters, DAEDALUS should be re-calibrated and re-optimized whenever relevant information becomes available. For this reason, DAEDALUS should only be used for short-term projections (roughly three to six months), as medium-to long-term projections are highly speculative. The closure strategy can be abandoned and new projections generated any time, for example, as new data become available, policy objectives change or we approach the end of the projection horizon. We make no allowance for changes in prices or demand for final products. Apart from the short-term horizon of DAEDALUS, changes in consumption patterns have occurred mostly within each sector as, for example, the shift from in-person grocery or clothes shopping to online shopping. Of course, there are sectors like hospitality and travel that have seen a sharp decrease in output, but experience has shown that with the removal of restrictions, they are quickly recovering to pre-pandemic levels of activity. To some extent, if demand changes for a sector's produce are expected and can be quantified, this can be incorporated by imposing an exogenous change to the relevant economic constraint. More generally, behavior may change over the course of the pandemic, with impact on demand for goods and services, supply chains, labor supply, investments and more. This may be the prevailing impact of the pandemic in an unmitigated scenario, when infections spike to very high levels. There are very little data on such impacts, so our unmitigated scenario does not consider behavior change. We have made rudimentary efforts to adjust for NPIs, capturing both the mitigation put in place to reduce transmission and voluntary behavior changes. The major challenge is identifying the likely nature and magnitude of changes in behavior in the absence of available data, although estimates may be forthcoming as evidence from countries' experiences becomes available.
We use contact data classified by the economic sector of employment of respondents 12 . The survey uses a high-level classification of ten economic sectors and we need to attribute uniform rates to the subsectors for our application. Although the data are probably representative of many high-income countries, they would ideally be tailored directly to the country and sectors under scrutiny. DAEDALUS relies on IO tables, which are only produced periodically, and that may not reflect recent changes in the economy. In line with the usual IO methodology, we assume Leontief production functions with constant returns to scale 32 , but we relax this assumption in sensitivity analyses. With heterogeneous sectors, it will always be the case that partial opening of a sector may be able to focus on subsectors that are highly productive or have low reliance on inputs from other sectors that remain closed. However, policymakers may find it difficult to formulate granular opening/closure policies focusing on economic activities within sectors and instead be forced toward blanket sectoral policies. A further concern is that-with constraints on supplies-some producers may change to 12  alternate suppliers. However, relatively fixed production processes mean that there is likely to be limited scope for changing the sector in which the supplies are produced. Producers may instead seek to solve supply chain problems by importing inputs for which there are domestic shortages. We have built in certain flexibility in production processes by allowing some tolerance in the maximum and minimum levels of economic activity. This also accounts for the seasonality of production in some economic sectors, which we do not consider otherwise. Finally, we do not model the effect of vaccinations, or increased transmissibility of new SARS-CoV-2 variants, but they can readily be considered in future iterations 13 . Faced with a recession of historic magnitude, we need to quantify difficult trade-offs that enable policymakers to minimize societal harm. This requires novel economic-epidemiological models that incorporate transmission dynamics as constraints 33 , such as the one we present here. To the extent that data and modeling resources permit, DAEDALUS seeks to address the policy challenge of how to keep educational institutions functioning, the economy as open as possible and the pandemic controlled so that health services are not overwhelmed. Although the precise monthly economic configurations identified by our study are sensitive to the stringency of other NPIs, the recommended priority list of sectors to keep open proved robust to sensitivity analyses. As new data and policy concerns emerge, we are confident that DAEDALUS can form an important basis for the future development of economic-epidemiological models.

Methods
The mathematical structure of DAEDALUS consists of two integrated parts: the economic model and the epidemiological model (Fig. 1). The economic model organizes the economy into sectors, giving rise to a set of economic constraints that reflect the interdependencies between sectors. These are set out alongside a set of epidemiological constraints, which are modeled using a compartmental disease transmission model. We assume that the government can implement restrictions to non-essential economic activity to limit both the damage to the economy and the spread of infection. For the purposes of exposition, we assume that the objective is to return as closely as possible to the economy as it was before the arrival of the epidemic, without consideration of possible permanent changes to firm structures, production processes or consumer demand that may be caused by the epidemic.
In DAEDALUS, the economy affects transmission through contacts occurring in the workplace: the more a sector is open, the greater the number of infections (everything else equal). DAEDALUS explicitly models a feedback between economy and epidemiology: to control infections, hospitalizations and deaths, policymakers mandate closures of economic sectors. The population is divided into four age groups: pre-school age (0-4 years), school age (5-19 years), working age (20-64 years) and retired age (65+ years). All groups belong to the 'community' . Adults aged 20-64 years may belong both to the community and the labor force if they are working in one of the economic sectors, as employed or self-employed workers, and if their economic sector is open for production. Adults aged 20-64 years who are not in the labor force, or registered as unemployed, belong to the community only. The N economic sectors (N = 63 for the UK application) and four community groups play different roles in DAEDALUS. The productive sectors are engaged both in economic production and in the spread of infection, whereas the four community groups contribute only to the spread of infection. In the pre-pandemic world, the N economic sectors are fully operational and the final (consumption) product of each sector i contributes to the country's GDP, as represented by its GVA, including exports. In addition to the final consumption or export products, sectors also create products that are used as intermediate inputs by other sectors in creating their own final products.
A model of the economy. Economies are complex systems of interdependent production processes. Each economic sector produces both intermediate inputs, used in the production processes of other sectors, and end products for final consumption by households, governments and non-profit organizations. The flows of intermediate products between sectors are represented by a matrix Z. The components z ij of Z indicate the monetary value of flows from sector i used as inputs to the production process of sector j. Column j of matrix Z indicates all the inputs used in the production process of sector j, and row i indicates all the products of sector i used as inputs by the other sectors. Therefore, the monetary value of the total production of sector y i can be represented by the N relationship yi = ∑ N j=1 zij + fi, which sums inputs produced for other sectors, and final demand f i by sector i. Let a ij = z ij /y j be the fraction of the output of sector i used in sector j so that Final demand comprises final consumption, gross fixed capital formation and changes in inventories and exports. We assume throughout that the demand for final consumption is constant during the pandemic but that inventories can increase in response to overproduction. for i = 1, …, N in the pre-pandemic world. Let y * i = y * i w * i w * i = giw * i , where w * i is the pre-pandemic workforce of sector i and gi = y * i /w * i is the output per worker (labor productivity) of sector i = 1, …, N in a given period. For simplicity, we assume that a ij (interdependence between sectors), g i (labor productivity) and final consumption are constant and held at pre-pandemic values.
DAEDALUS can be extended to allow for a nonlinear effect of labor on sector output. For example, we could assume that yi = giw αi i , 0 < α i ≤ 1, where α i is the elasticity of output with respect to labor in sector i. This allows for decreasing returns to labor. Notice that this increases the number of parameters of the model that need to be calibrated. In sensitivity analyses, we have set α i = 0.59 uniformly for all sectors, informed by ref. 34 (assuming profit maximization so that the elasticity of output with respect to labor is equal to labor productivity). We find that the conclusions are qualitatively similar to the constant productivity case in the short-run framework considered (compare Fig. 4 and Supplementary Fig. 9). Our main scenarios therefore assume constant labor productivity.
We assume that government policy can influence the proportion x min i ≤ xi ≤ 1 of individuals working in each sector in each decision period. When x i = 1, sector i is fully open and productive at pre-pandemic levels and when xi = x min i , sector i is closed except for the provision of essential goods and services. To allow for uncertainty regarding the observed lockdown values x LD i , we use 80% of the lockdown values, that is, x min i = 0.8x LD i . This effectively imposes a lower-bound constraint on all scenarios that-with some flexibility-allows essential services to operate. In the UK application, the lockdown production x LD i was obtained via a survey conducted as part of the monthly GDP calculation by the ONS 35 (Supplementary Table 6). We applied the same value of high-level sectors to all subsectors due to a lack of more detailed data.
The effective number of workers in each period in sector i is wi = xiw * i . By controlling the proportion of individuals working in each sector and in each period, policymakers can keep the pandemic under control because infections in the workplace (between workers and between workers and customers) are reduced. However, by partially closing a sector, such policies also reduce the GVA contribution of each sector. During each period in the pandemic, the achieved output is y i = g i w i . This implies that, in DAEDALUS, the effect of the pandemic works through the reduction in the number of workers, and not reduced labor productivity. Therefore, even if labor productivity remains unchanged,

because closures of sectors reduce the number of individuals who work.
Note that this is equivalent to assuming that infections and deaths do not affect productivity. We believe this is justified by the fact that COVID-19 disproportionately affects older individuals, who belong to the retired age group. Supplementary Fig. 15 shows the percentage of working-age symptomatic infections, hospitalizations and deaths by economic sector over the course of the first wave for scenario B in the UK application. The percentage of workers with symptomatic infections is less than 1% of all workers and the percentage of hospitalized workers is less than 0.1% of all workers, even in the worst-affected sector at the peak in April. The cumulative percentage of deaths among workers in each sector is negligible, if the retired are excluded. There is little and conflicting empirical evidence regarding the impact of the pandemic on labor productivity 36 . It is therefore unlikely that COVID-19-related sickness and death is impacting productivity in a mitigated pandemic.
We assume that the decision maker has an outlook over a given intervention horizon into the future (six months in the UK application). Decisions on the economic configuration are made at specific time points during the intervention horizon, called decision points (which, in the UK application, are every two months). The objective is to keep the economy as active as possible over the intervention horizon without breaching hospital capacity. Precisely, at each decision point τ = 0, 1, 2, …, T over the intervention horizon, the decision maker decides how much each sector is open in the next period. The decision maker chooses x min i ≤ xiτ ≤ 1, for i = 1, …, N. The objective in each period is to maximize an objective function based on the GDP.
The domestic economy must be balanced over the intervention period. All necessary domestic intermediate inputs required by a sector must be available; that is This requires each sector to produce at least enough to satisfy the intermediate needs of other sectors that are open, plus essential consumption. The pandemic has probably led to changes in production processes in some sectors compared to the pre-pandemic world due to several factors, most notably disruptions in global supply chains 37,38 . To allow for some flexibility in the economic configuration due to these factors, we do allow 'excess' production of intermediate and final productsthat is, over the intervention horizon, there is the opportunity for inventory or additional export if supply exceeds demand. Output is, however, bounded by prepandemic levels in any period, that is, x iτ ≤ 1.
Certain subsectors, such as parts of healthcare, education and agriculture, may be considered essential services that must remain open regardless of the consequences for disease transmission. We may also want to allow some sectors, such as healthcare, to expand beyond pre-pandemic levels. Keeping certain sectors at a specified level of production can be introduced via additional constraints to the optimization. In the UK application, we constrain minimum healthcare operation at the observed lockdown values ( x LD i ) in all scenarios and education to operate at 80% of pre-pandemic values in some scenarios.
A model of the epidemic. The partial or full opening of a sector increases the number of actively working adults. For most workers, working requires contact with colleagues and consumers, and there is therefore a risk of transmission amongst the workforce, between workforce and consumers, and onward transmission to the general population when working adults move between economic sectors and the community. Furthermore, for some sectors, there is increased transmission associated with contacts between consumers, for example, the hospitality sector. DAEDALUS is sensitive to the different circumstances experienced by the workers and consumers associated with each sector.
At each time step of the epidemiological model t, the individuals in each economic sector and the four community groups are divided into mutually exclusive 'epidemiological' groups: susceptible, exposed (infected but not yet infectious), asymptomatic infectious, symptomatic infectious, hospitalized, recovered and dead. The number of individuals in each of these groups who are also member of sector i at time t are denoted respectively by S i (t), E i (t), I asym , R i (t) and D i (t), for i = 1, …, N + 4. Note that for each group i and time t, the total population of each group is the sum of the epidemiological groups: for all t ∈ [tτ , tτ+1) and all decision points τ = 0, …, T at the start of each period. In each period [t τ , t τ + 1 ), τ = 0, …, T over the intervention horizon, the populations of the epidemiological groups within each sector i change following a compartmental SEIR model for all sectors i = 1, …, N + 4. The force of infection (FOI) on sector i, λ i (t), and the system of ordinary differential equations (ODEs) are given as follows: The first equation specifies the rate of decrease in susceptible individuals as proportional to the stock of susceptible individuals and the force of infection λ i (t), which is the rate at which susceptible individuals acquire the infection. The second equation states that the number of exposed individuals increases by the same amount the susceptible individuals decrease minus a fraction of the stock of individuals already exposed, who progress to become infectious. The change in number of infectious individuals, whether asymptomatic or symptomatic, is assumed proportional to the number of exposed individuals, and the number of individuals exiting the compartments is assumed proportional to the stock of infected. Transmission from asymptomatic individuals is reduced by a factor r relative to symptomatic individuals. A fraction of those infected are hospitalized and a fraction of those hospitalized die, and the others recover. Note that hospitalizations arise from symptomatic infections only, and never from asymptomatic infections. We also do not model transmission from hospitalized cases. Similarly, our model allows only for deaths after hospitalization. The last equation describes the number of recovered individuals as a fraction of the individuals infected and hospitalized. Transmissibility β is calibrated to a target R 0 (the basic reproductive number is the expected number of cases directly generated by one case in a population where all individuals are susceptible to infection). Calibration is based on pre-lockdown contact patterns and the nextgeneration operator eigenvalue method 39 . Emergence of variants with higher (or lower) transmissibility would require re-calibration to an updated R 0 . The model allows for waning immunity, represented by the common term in the first and last equations, with immunity loss rate ν.
In addition to the partial or full closure of economic sectors, workplace-related disease transmission can also be suppressed by working from home, although the ability for home-working will vary by economic sector. Workers who work from home are exposed to (and contribute to) transmission only in the community. In DAEDALUS, workers who are able to work from home are modeled through a sector-dependent proportional reduction in the sector-dependent contact rates, which are used to construct the contact matrices M ij (Supplementary Note 1.2). The sector-dependent proportion of workers able to work from home is assumed constant across the projection horizon.
At the start of each period [t τ , t τ + 1 ), τ = 0, ..., T, the economic and the epidemiological groups are rematched. We denote the limit of the various epidemiological groups as t tends to t τ from the from the left as and . These variables are given at time t − τ for all for i = 1, …, N + 4 from their past developments. At time t − τ , the number of workers of sector i who are working is determined by the extent to which sector i is allowed to open and given by xiτ−1w * i , and the number of workers who are not working by (1 − Although this is the same number as at the start of the period, the composition of the population in the epidemiological groups has changed according to the system of ODEs above. Choosing x iτ changes the initial values of the transmission model at the start of each period [t τ , t τ + 1 ), τ = 0, ..., T. We now make clear how this is done.
At time t τ , the government's decision variables change from x iτ − 1 to x iτ . The active workers in sector i at time t τ are If x iτ − x iτ − 1 = 0, nothing changes for sector i and production is the same compared to the previous period. If x iτ − x iτ − 1 < 0, then the sector's production is reduced compared to the previous period. The number of those working in sector i decreases and (xiτ − xiτ−1)w * i of them join the group of non-working adults for that period. Hence, xiτ w * i = xiτ We assume that each epidemiological group in sector i is reduced by the same amount xiτ is added to the corresponding epidemiological group of the non-working adults for period [t τ , t τ + 1 ) at time t τ .
If x iτ − x iτ − 1 > 0, then the sector's production is increased compared to the previous period. The number of those working in sector i increases with (xiτ − xiτ−1)w * i and some or all of those workers who did not work the previous period now join sector i. The number of individuals in group N + 4 changes at time t τ , so it will be indexed by τ. The fraction enters sector i at the start of period [t τ , t τ + 1 ). So, assuming all nonworking adults have the same chance of being employed in sector i, the initial values of the transmission model for the N productive sectors for the period [t τ , t τ + 1 ) are for i = 1, ..., N. The values for each epidemiological group vary depending on whether production is increased or decreased in the respective period. Notice that, when we move workers between working and non-working groups, we assume that we move the same proportion of all epidemiological groups, including the infected, the hospitalized and the dead. This accounts for reduced transmission due to absence. For pre-school children, school children and retired individuals, the dynamics of the epidemic continue from the end values reached in the previous period. That is, and For the non-working adults, the initial conditions at t τ capture the fact that the productive sectors are partially closed and that a fraction of the workers may become temporarily non-working adults at t τ , τ = 0, ..., T: .
Let H(t) be the number of individuals in the country who are hospitalized at each t, which is the sum of the individuals in each productive sector and in the community who are hospitalized Hi(t), and let H be the country's hospital capacity, which for simplicity is assumed constant over the intervention horizon. The capacity is informed by UK data (Supplementary Table 7). The first epidemiological constraint demands that the number hospitalized does not exceed capacity at any one time: The second epidemiological constraint requires R end ≤ 1. This is the effective reproductive number at the end of the projection period, considering all infections, immunity and mitigation over the course of the simulation (for the calculation of R end , see Supplementary Note 1.3). This is to ensure that the epidemic is under control at the end of the planning horizon, leaving a manageable 'legacy' for future periods.
Linking economics and epidemiology. The objective of DAEDALUS is to maximize the GDP of the country, that is, the sum of GVA created by the sectors of the economy that are operational-either wholly or in part. GDP is maximized subject to the constraints that hospital capacity is not breached at any point in time, and the global effective reproductive number (R t ) is less than or equal to one at the end of the projection horizon, that is, R end ≤ 1. This leaves the country in a reasonable position with respect to incidence and hospitalizations. If required, a subsequent optimization can be undertaken.
For a single period, we assume decision variables x jτ that indicate the proportion of each sector j that is operational in period τ and therefore take the value between x min j and 1. A partial opening x jτ of sector j in period τ creates an output for sector j equal to xjτ gjw * j . To calculate the GVA for sector j, we need to subtract the value of the intermediate products used by sector j, which are given by ∑ N i=1 aijxjτ gjw * j . Considering the interdependency of the economic sectors, the hospital capacity and the transmission constraint specified above, DAEDALUS maximizes the objective function subject to is the pre-pandemic GVA associated with sector j. The first two constraints are the epidemiological constraints, namely that total hospital occupancy does not exceed the static hospital capacity H and that the global effective reproductive number at the end of the intervention horizon R end is less than or equal to one, which set upper limits on hospitalizations and transmission. Constraints three and four represent economic constraints. Constraint three reflects the need for a sector to produce at least enough to satisfy essential consumption and the intermediate needs of other sectors that are open in period τ, and constraint four to produce no more than the maximum level produced before the pandemic. Further constraints could be added, requiring for example that a sector remains open to a certain degree (for example, education in our UK application).
Note that DAEDALUS could be modified to maximize an objective function other than GDP, depending on government priorities, for example, the value of life-years lost, or unemployment. Supplementary Figs. 16 and 17 show economic configurations and trajectories when maximizing employment, and when maximizing GDP less life-years lost monetized with a value-of-statistical-life approach.
Computation. The multiperiod DAEDALUS model has substantial computational demands. The number of decision variables is the product of the number of periods and the number of sectors under consideration (in the application here, 63 × T). The number of linear (economic) constraints is 2 × 63 × T because they are applied to each time period. For a scenario where certain sectors are open, there are additional constraints, one for each sector and period. Although fewer in number, the two epidemiological constraints are more computationally demanding, with the hospital occupancy constraint operating continuously throughout the projection horizon. Optimizations use 'Global search' with the derivative-based base algorithm 'fmincon' in MATLAB's 'global optimization' toolbox 40 .

Data availability
All data used in this study are publicly available, and further details and references are provided in the Methods of the main manuscript and Supplementary Information. DAEDALUS uses the following data: the IO table for the United Kingdom (Office for National Statistics (ONS) UK IO analytical tables, 2020, https://www.ons.gov.uk/economy/nationalaccounts/supplyandusetables/ datasets/ukinputoutputanalyticaltablesdetailed); workforce (headcount), total output at basic prices, gross value added, intermediate use as percent of output, intermediate provision as percent of output, and work-from-home proportions by economic sector (Supplementary Data 5 and Supplementary Table 6, obtained from ONS Business Impact of COVID-19 Survey (BICS) results, 2020, https:// www.ons.gov.uk/economy/economicoutputandproductivity/output/datasets/ businessimpactofcovid19surveybicsresults); contact matrices A (community contacts), B (worker-to-worker contacts) and C (consumer-to-worker contacts) (Supplementary Table 1, derived via own calculations from refs. 12 and 41 ); agestructured contacts for the hospitality and education sector (Supplementary Table  2, derived via own calculations from refs. 12 and 41 ); mapping of French into UK business sectors (own derivations in Supplementary Table 8; hospital occupancy data for England for 20 February to 31 July 2020, NHS England, COVID-19 Hospital Activity, 2020, https://www.england.nhs.uk/statistics/statistical-workareas/covid-19-hospital-activity/); epidemiological parameters (Supplementary Table 3 Table  6, obtained from the ONS monthly GDP series, 2020, https://www.ons.gov.uk/ economy/grossdomesticproductgdp/bulletins/gdpmonthlyestimateuk/latest and https://www.ons.gov.uk/economy/grossdomesticproductgdp/methodologies/ grossdomesticproductgdpqmi). All data required for reproducing the results in this manuscript, including the Supplementary Information, are available on CodeOcean 43 . Source data are available with this paper.

Code availability
The computer code is available on CodeOcean 43 , together with all data required to reproduce the results in this paper.