COVID-19 spread portrayed in A&S students’ computer simulation

April 9, 2020 by Chris Sasaki - A&S News

Two undergraduate students in the Faculty of Arts & Science have created a computer simulation showing the effectiveness of social distancing and isolation at curbing the spread of COVID-19.

It also shows how a vaccine would generate “herd immunity” and stop the pandemic — even though a vaccine has yet to be developed.

Eric Lin is pursuing a double major in immunology and health and disease and is a member of Innis College. Haoying Shen is pursuing a double major in health and disease and statistics and is a member of New College. They created the computer simulation as part of a School of the Environment research project under the Faculty’s Research Opportunities Program.

“We were originally working on a simulation to illustrate the importance of vaccination within a community, especially with the rise of the anti-vaccination movement,” says Lin. 

Headshot of Eric and Hao
A&S undergraduates Eric Lin and Haoying Shen created the computer simulation as part of a School of the Environment research project.

“We wanted to show how increasing the number of vaccinated individuals could slow or stop the spread of a disease,” he says. “Once the COVID-19 situation arose, we saw how the simulation could be applied to the pandemic.”

“The model is also highly useful in showing the importance of social distancing and isolation,” says Shen.

The simulation plays out on a 100 by 100 grid with each of the 10,000 points on the grid representing a person. The students defined three types of individuals. Those who were unvaccinated had a one per cent chance of carrying the COVID-19 virus and could pass it on to others; vaccinated individuals had a zero per cent chance of contracting the disease; and the vulnerable or immunocompromised could not be vaccinated for various reasons.

Lin and Shen then ran simulations with varying degrees of barriers preventing contact between individuals, simulating the social distancing and isolation practices being used to prevent the spread.

The simulation with no barriers was a stark worst-case scenario. Given enough time, 100 per cent of the population became infected. 

In simulations with varying degrees of barriers, the spread slowed and resulted in a fraction of the population infected.


Figure 7
With no barriers between individuals, the infection (blue) spreads to infect 100% of the population


Figure 11
With barriers between individuals, the infection (blue) is stopped before reaching everyone.


“Our simulations showed that isolation and social distancing flatten the curve,” says Shen. “They slow the rate at which the disease is transmitted through a population and lower the total number infected.”

Lin and Shen also ran simulations with zero, 50, 75 and 95 per cent of the population vaccinated. Not surprisingly, the virus spread to the entire population with no vaccine but with a vaccine, it spread to only a fraction of the population. In the latter case, the number of cases levelled out as the population achieved herd immunity — that is, enough of the population was immune, thereby creating a collective barrier to infection.

“The model showed that as more individuals are vaccinated, there is a decreased rate of transmission throughout the simulated environment,” says Lin. “The model also illustrates just how much herd immunity relies on the cooperation of all within a community. It shows that herd immunity requires a very high percentage of vaccination.”

The students used simulation software named COBWEB that was developed by Brad Bass, a professor in the School of the Environment in the Faculty of Arts & Science. COBWEB is designed to simulate a wide variety of phenomena in which “agents” interact in diverse ways.

For example, agents can be countries, corporations, animals, cancer cells, as well as people living through a pandemic. Using the software, countries can be made to conflict or cooperate, cancer cells can be programmed to grow or die under certain conditions, and people carrying a virus can infect others or not.

“Eric and Haoying's approach was highly original,” says Bass, “unlike anything I had every seen with COBWEB.”

As the students cope with the suspension of in-person classes and online exams, they continue to work on the simulation. “We are currently still looking for ways to improve the model,” say Shen. “And with guidance from Professor Bass, we hope to create a far more accurate model.

Watch the students’ COVID-19 simulation: