PHAC Agent-Based Model on COVID-19

Canadian Medical Association Journal (CMAJ) Article

CMAJ Article – Projected effects of nonpharmaceutical public health interventions to prevent resurgence of SARS-CoV-2 transmission in Canada

This paper describes the results of predictive modelling of several nonpharmaceutical measures used to prevent further transmission of COVID-19. A Public Health Agency of Canada research team used an aged-structured agent-based model of the Canadian population to simulate the effects of current and projected levels of interventions on SARS-CoV-2 transmission. Case detection and isolation, contact tracing and quarantine, physical distancing and community closures were assessed independently and in combination.

Download the appendix here.

COVID-19 Modelling Glossary of Terms

Using and Understanding the Mathematical Model

1. To view and run this file, you will need the free version of AnyLogic, available here.

2. After downloading AnyLogic, download the following file:

PHAC Modelling Code for AnyLogic

Unzip the downloaded folder. The .alp file should automatically open with AnyLogic.

3. Download the PHAC instruction guide:

Instructions for Using the COVID-19 PHAC Agent-Based Model

Model Description

COVID-19 PHAC Agent-Based Model Description

Agent-based models (also called ABMs) can systematically simulate actions and interactions of independent “agents” that represent people, places and/or objects within a predefined environment. Agent-based models can determine whether a disease could spread uncontrollably, and if so, how it can be stopped. The models can evaluate the success of public health interventions, depending upon the efficacy of those interventions, community structure and population dynamics (including demographics and adherence to the public health interventions).

The Public Health Agency of Canada (PHAC) developed this agent-based model to estimate the projected transmission of SARS-CoV-2 given various intervention strategies. The modelers developed an age-stratified agent-based model for Canada to assess the potential for current and future non-pharmaceutical interventions (NPIs) to reduce COVID-19 transmission, with the assumption that community transmission began on February 7, 2020.


The model was developed in AnyLogic 8 Professional 8.5.2 (The AnyLogic Company). Four interventions were modelled separately against a “no intervention” scenario to determine their effects on transmission and clinical outcomes. Baseline estimates for the period between February 7 and May 10, 2020, when restrictive community closures began to be lifted, were included in the model as follows (Table 1):

Case detection and isolation:  implemented to reduce community transmission by identifying cases who have mild symptoms, resulting in their subsequent isolation at home for 14 days. While isolated individuals within the home can infect other household members, infected persons are assumed to isolate while indoors with others to reduce daily contact rate by 50%. Baseline was set at 20% of cases detected and adhered to isolation, with 50% of household members co-isolating.

Contact tracing and quarantine:  used toidentify individuals who have been exposed to SARS-CoV-2 and infected but not yet able to transmit the disease. Isolation of pre-symptomatic cases for 14 days prevents these individuals from contributing to community transmission. The baseline was set as 50% of individuals found via contact tracing and quarantine of 20% of the cases detected.

Physical distancing: for people in any state of infection (susceptible, exposed, infectious or recovered) reduces the number of contacts per day and therefore the potential for SARS-CoV-2 to spread. This intervention is only applied when individuals are outside of the household. Baseline was set as 20% reduction in contact rates for 8 weeks (March 16 to May 10).

Community closures: in this model included schools, workplaces or social environments. This NPI results in less crowding and less transmission outside of the household.  Agents (individuals) who stay at home can transmit infection to household members who are also home. That is, contacts outside of the household are offset by increased contacts within the household. For example, children not at school will have increased contact with siblings and parents. The model used a baseline of 100% school closures, 40% workplace closed and 50% of other mixed-age venues closed from March 16 to May 10, based on reduction in mobility during this period in Canada.

  Table 1. Baseline interventions and varying levels of public health interventions applied in four scenarios studied

The potential trajectory of SARS-CoV-2 transmission in Canada was explored by modelling four scenarios from May 11, 2020 to January 7, 2022 under varying levels of control implemented after the lifting of community closures. These scenarios were: (A) minimal control (no change in interventions after closures lifted and physical distancing not maintained); (B) maintained physical distancing; (C) enhanced case detection and contact tracing and; (D) combining interventions.

Results – Summary of the Model Outputs

Individual interventions (see Table 2). When modelled individually, at the baseline values, the models showed the success of the interventions, ranked from most to least effective:

  • Partial community closure was the most effective NPI independently, resulting in an attack rate of 7.6%.
  • Sustained physical distancing (with 20% reduction in contact rate) gave an attack rate of 54% of the population infected.
  • Case detection of 20% of all SARS-CoV-2 cases with subsequent isolation of these individuals – with half of them practicing isolation within the home while infected and 50% of household members also co-isolating – resulted in 59.6% of the population being infected.
  • When half of the contacts of infected people are successfully traced and quarantined, the data indicated that 62.5% of the population would be infected.

Partial community closures was the only NPI found to eliminate transmission from the population on its own, however it would require closures to be sustained for 18 months and is therefore not a likely possibility. While the other NPIs – excluding partial community closures – merely delayed the epidemic, when combined they resulted in only 42.3% of Canada’s population would have been infected, which is a 22.3% reduction in total attack rate.

The model also indicates that 56.1% of the population would have been infected with SARS-CoV-2 under minimal control scenarios (scenario A), wherein case detection and contact tracing NPIs are maintained at current levels. The group that was most infected within these scenarios were between 10-19 years of age, a result largely driven by asymptomatic infections. The highest proportion of clinical SARS-CoV-2 infections occurred in individuals between the ages of 20-54 years. Canadians over the age of 75 had the highest hospital admissions and mortality rates. Of interest, ICU admission rates were highest in people aged between 65-84 years because individuals over 85 died before reaching the ICU. Although minimal controlscenarios reduced the number of infected Canadians, they did not end the epidemic or prevent a second wave once communities reopened.

Table 2. Select results from the mathematical model scenarios

Minimal control scenarios paired with maintained physical distancing (scenario B) resulted in 41.6% of the population in Canada being infected. On the other hand, enhanced case detection and contact tracing (scenario C) lowered the percent of infected persons to below 1%. This was also true when combining these measures with maintained physical distancing (scenario D). Only when interventions were combined did the epidemic end, although the data suggest this likely will not happen until 2021 due to the restrictive measures that would be necessary.

Comparing the four scenarios by the number of total deaths (per 100,000 persons) revealed increased mortality during minimal control (A – 1,113 deaths) and maintained physical distancing (B – 739  deaths), in contrast to enhanced contact tracing and contact tracing (C – 4 deaths) and when interventions were combined (D – 2 deaths).

Minimal control (A) resulted in reduced clinical cases (5312), hospital admissions (798), and deaths (320) per 100,000 when compared to no-NPI scenarios. Scenarios where NPIs were combined (D) resulted in significant reductions in clinical cases (39,618), hospital admissions (4529) and deaths (1431) per 100,000 when compared to no NPI scenarios.

Minimal control and maintained physical distancing scenarios (B) were found to overwhelm hospital and ICU units, however facilities remained under capacity during enhanced case detection and contact tracing under most simulations. The only time healthcare settings remained under capacity was when interventions were combined. 

Extended Community Closures

The NPIs were also studied during extended community closure simulations. The results indicate that attack rate, proportion of asymptomatic cases, clinical cases (mild, admitted to hospital, admitted to ICU and hospital admitted cases admitted to the ICU), and hospital cases admitted to the ICU, were relatively the same across scenarios.

The mortality rate of clinical cases, total cases, total clinical cases, total asymptomatic cases, total hospital admitted cases, total cases admitted into the ICU, total deaths, infections acquired (at school, work and in mixed age venues) and total number of infections acquired at school, work, in mixed age venues, and at home were significantly elevated in minimal control simulations during extended community closures in comparison to ‘maintained physical distancing’, ‘enhanced case detection and contact tracing’ and when interventions were combined.


With the objective of estimating the national transmission of SARS-CoV-2 and challenges associated with the lifting of restrictive closures, the data suggest that the timeline associated with reopening society will depend on regional situations in provinces and territories. The agent-based model indicated that transmission of SARS-CoV-2 was reduced during all NPIs, however the most effective was partial community closures. This was specifically evident when these NPIs were coupled with maintained physical distancing resulting in a 20% reduction in contact rate. If these interventions are not maintained until herd immunity is achieved – or a vaccine is established – a resurgence will occur.

The only NPI that was able to end the SARS-CoV-2 epidemic in the model simulations was partial community closure, however this is likely due to closing workplace and mixed age venues rather than schools. While school closures did not control the epidemic, they were able to delay the epidemic. This finding is supported by previous studies. 

Also, as found in earlier research, this model indicated that without any interventions, approximately one third of the population in Canada would have been infected. The number who will be infected by SARS-CoV-2 will be dependent upon increased case detection and isolation, contact tracing and quarantine as well as individual physical distancing and protective measures.


Key epidemiological characteristics of SARS-CoV-2 remain unknown, including age specific susceptibility, the true number ratio of asymptomatic to symptomatic infections, and whether or not immunity is possible. This national model may not apply to all jurisdictional regions within Canada; however, calibrations indicate good fit to community-acquired cases at the national level.

Transmission among frontline workers and residents of long-term care facilities varies across provinces and territories, a national model is therefore not suitable to address these regional and localized clusters. The PHAC agent-based model therefore provides a baseline projection of community-acquired transmission in Canada and the results must be interpreted recognizing that in some circumstances, localized outbreaks may result in higher number of cases, hospitalizations and deaths than projected at baseline.


Enhancing and maintaining individual and community interventions will be crucial for controlling the transmission of SARS-CoV-2 transmission in Canada. Without such effort, resurgence of the epidemic will occur and has the potential to overwhelm Canada’s health care system.