1. Home
  2. Explore
  3. Computer Science
  4. Epidemic Spread Simulations

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Epidemic Spread Simulations

🦠 Epidemic Spread Simulations: An SIR Model Exploration

This document explores various epidemic simulations using an SIR model to understand how diseases spread under different conditions and interventions. These models are simplified representations, offering insights into complex real-world scenarios.

πŸ“Š Understanding the SIR Model

The SIR model categorizes a population into three groups to simulate disease spread:

  • Susceptible: Individuals who can contract the disease.

  • Infectious: Individuals currently carrying and spreading the disease.

  • Recovered (or Removed): Individuals who have recovered from the disease and are now immune, or have died and can no longer spread it.

πŸ”¬ How the Model Works

In these simulations, physical proximity is a stand-in for various forms of contact that lead to infection (e.g., shaking hands, touching surfaces, sneezing).

  • For every unit of time a susceptible person is within an infection radius of an infectious person, they have a probability of contracting the disease.

  • After a certain time, infectious individuals will recover (become immune) or die, moving into the "Removed" category and no longer spreading the disease.

These are toy models with tiny populations, serving as simplified representations. They do not fully capture the complexities of real populations and should not be generalized without deeper consideration.


πŸ“ˆ Basic Epidemic Spread

Initial simulations demonstrate the fundamental spread dynamics without interventions.

🎲 Random Walk and Infection Radius

  • In a default scenario, individuals meander randomly, and the infection spreads according to the SIR rules.

  • Result: Almost everyone becomes infected relatively quickly.

πŸ“ Impact of Infection Radius and Probability

  • Doubling the infection radius: Simulates more interactions or a more socially engaged society.

    • Outcome: The spread is drastically faster, with the majority of the population infected simultaneously in a short time. This highlights the non-linear effect of interaction space.

  • Halving the probability of infection: Represents improved hygiene (e.g., better handwashing, cough protection, less face touching).

    • Outcome: The infection curve is significantly flattened and spread out over a longer period. This shows how hygiene changes have a very large effect on the rate of spreading.

πŸ’‘ Key Takeaway 1: Sensitivity to Parameters

The growth rate of an epidemic is incredibly sensitive to changes in parameters like infection radius and probability. Even small changes in daily habits can have huge implications for the pace of spread.

πŸ’€ Mortality and Healthcare Capacity

  • The ultimate goal is to reduce total deaths, which is a proportion of the "Removed" category.

  • If the peak of the infection curve is too high, healthcare resources become overwhelmed, leading to an increase in the mortality rate.


πŸ™οΈ Impact of Central Locations and Community Travel

πŸ›’ Central Locations (e.g., Grocery Stores, Schools)

  • Introducing a central spot that people regularly visit dramatically accelerates the spread.

    • Observation: The infection quickly engulfs the entire population, as the central location acts as a major hub for transmission.

🌍 Travel Between Communities

  • The model can include separate communities with a probability of daily travel between them.

    • Individuals may travel to another community's center and then continue their routine there. This creates pathways for the disease to spread across otherwise isolated groups.


πŸ›‘ Halting the Spread: Interventions

πŸ” Identifying and Isolating Cases

  • Most effective intervention: Identifying and isolating infectious individuals (e.g., through widespread testing and quick responsiveness).

    • In simulations, once a critical threshold of cases is reached, infectious people are sent to a separate location one day after infection.

    • Outcome: This strategy effectively halts the epidemic in its tracks.

πŸšͺ Leaky Quarantine (Asymptomatic Cases)

  • What if 20% of infected individuals are not quarantined (e.g., due to no symptoms, thus no testing)? These are represented by yellow circles.

    • Outcome:

      • The peak number of simultaneous cases is only slightly higher.

      • However, there's a very low, long tail of infection, taking much longer to stamp out and resulting in about twice as many total cases.

    • In a multi-community setting with travel:

      • Total quarantine is still highly effective.

      • 20% leaky quarantine: Flattens the curve but results in a much thicker tail and over half the population getting infected.

      • 50% leaky quarantine: Only marginally better than doing nothing at all, as many agents continue spreading the disease.

πŸ’‘ Key Takeaway 2: Disproportionate Impact of Leakage

Small changes in the number of people who slip through testing and isolation can cause disproportionately large changes to the total number of people infected.

⏳ Early Detection and Disease Virulence

  • Highly lethal diseases can be paradoxically less dangerous globally if they kill quickly or cause obvious symptoms.

    • If a disease kills its host rapidly (e.g., in one day), it doesn't spread widely, as the infectious period is short.

    • The most dangerous viruses are those that are spreadable while unnoticed (asymptomatic carriers) or have a long incubation period before becoming lethal.

    • Example: The SARS outbreak (2002) was well-contained because most infected individuals showed symptoms, making them easier to identify and isolate.

πŸ’Š Antiviral Therapeutics

  • Early treatment with antiviral therapeutics that quickly move people out of the infectious category has the same effect as isolating cases in the model. This reduces the duration an individual is infectious.


↔️ Social Distancing

πŸšΆβ€β™€οΈ The Social Distance Factor

  • A social distance factor is introduced as a repulsive force between people, making them avoid close contact.

    • Individuals glow yellow when they are too close, indicating an attempt to social distance.

    • While not perfect, these interactions become much rarer.

πŸ“Š Social Distancing Effectiveness

  • 100% adherence: The disease quickly disappears entirely.

  • Partial adherence (after 50 cases):

    • 100% social distancing: Disease quickly goes away.

    • 90% social distancing: Flattens the curve, but nearly half the population eventually gets infected.

    • 70% social distancing: Similar outcome to 90%, with nearly half the population infected.

    • 50% social distancing: Only a tiny bit worse than 70% or 90% in terms of total cases, but the spread is greatly prolonged.

  • Observation: Even a small percentage of people (e.g., 10%) not adhering to social distancing adds enough instability to prolong the spread for a very long time, leading to a similar total number of cases as significantly lower adherence rates, albeit over a longer period.

πŸ’‘ Key Takeaway 3: Social Distancing and Imperfections

Social distancing effectively flattens the curve, but even small imperfections (e.g., a minority of people not participating) can significantly prolong the spread and lead to a high total number of cases.


✈️ Travel Restrictions Between Communities

🚦 Reducing Travel Rate

  • In a multi-community setup with a 2% daily travel chance between communities, reducing this rate by a factor of 4 (to 0.5%) after 100 cases.

    • Outcome: The effect depends on the run. Sometimes it makes no difference, and all communities get infected. Other times, some communities remain unscathed.

    • General rule: The earlier travel restrictions are implemented, the more effective they are.

    • Takeaway: Reducing contact between communities has a limited effect once the infection is already established within those communities. It is not a robust solution on its own.

🌐 Urban Hubs

  • In simulations with larger cities where city centers act as concentrated urban hubs:

    • Infections quickly spread to all urban centers as soon as one is hit.

    • The spread then slowly moves to the edges of each community.


πŸ“ˆ Quantifying Spread: The Reproductive Number (R)

πŸ”’ Effective Reproductive Number (R)

  • R is the average number of people an infected person infects while they have the disease.

  • It's calculated by estimating how many people each currently infectious individual has infected and will infect in total, then averaging these numbers.

🦠 Basic Reproductive Number (R0R_0R0​)

  • R0R_0R0​ (R-naught) is the value of R in a fully susceptible population, at the very beginning of an epidemic.

πŸ“‰ R Values in Simulations

  • Default simulation (no interventions): R is around 2.2 at its peak, falling as the population becomes saturated.

  • Doubled infection radius: R jumps as high as 8, demonstrating a massive effect on growth rate. (Doubling radius means 4x as many people inside, hence higher R).

  • Halved infection probability: R hovers around 1.3 to 1.7.

πŸ“Š Epidemic vs. Endemic

  • R > 1: The infection is growing exponentially; this is an epidemic.

  • R β‰ˆ\approxβ‰ˆ 1: The disease is holding steady; this is endemic.

  • R < 1: The disease is on the decline.

🌐 Real-World R0R_0R0​ Examples

  • COVID-19: Estimated R0R_0R0​ a little above 2.

  • 1918 Spanish Flu: Mean estimated R0R_0R0​ around 2.

  • Seasonal Flu: R0R_0R0​ much lower, around 1.3.

πŸ“‰ R Drop with Interventions

  • In the travel case, turning on social distancing and shutting down travel causes R to quickly drop from 2.

  • There can be a lag between implementing an intervention and the observed drop in R, as R is based on currently infectious cases that might have been infected before the intervention.


πŸ“ Revisiting Central Locations with Interventions

⬆️ R0R_0R0​ Impact of Central Locations

  • Introducing a central destination causes R0R_0R0​ to jump as high as 5.8.

  • Mitigation: Conservatively cutting the probability of infection per day in half (e.g., assuming less intense contact at a grocery store than close friends) also halves R0R_0R0​, but the dramatic effect of the central market persists.

🀝 Social Distancing with Active Central Locations

  • If social distancing is turned on but people continue to visit a central location:

    • The peak of the infection curve is slightly lower than doing nothing.

    • However, in terms of total cases, keeping the central location active largely defeats the benefits of social distancing.

βš–οΈ Reducing Frequency vs. Enhanced Hygiene

  • Scenario 1: Decrease frequency of going to the central spot by a factor of 5, in addition to social distancing.

  • Scenario 2: Chop the probability of infection by another factor of 2 (e.g., super cautious hygiene), in addition to social distancing.

  • Outcome: The simulations are nearly identical, showing that enhanced hygiene (even if harder to implement consistently) has a profound impact, comparable to drastic changes in routine.

✨ Combined Interventions

  • Applying social distancing, restricting central location visits, and lowering infection rate all at once is very effective.

🎯 The Power of Isolation

  • Even in simulations with high spread (like the central market), the ability to consistently identify and isolate cases effectively halts the epidemic without needing social distancing or stopping trips to central locations.

  • Real-world epidemiology includes more sophisticated tactics like contact tracing, where not only known cases but also their contacts are identified and isolated.


πŸ’­ Broader Implications and Optimism

⚠️ The Uncomfortable Truth about Social Distancing

  • While social distancing saves lives and prevents overwhelming healthcare, if nothing is in place to contain cases when people return to normal life, a second wave is likely.

  • Cheating or continued regular meetings at central spots disproportionately affect long-term case numbers.

🌟 Value of Disease Control

  • The simulations highlight the inordinate value of early widespread testing and the ability to isolate cases.

  • They also underscore the importance of therapeutics that treat cases and the ease with which this value is underestimated during "good times."

πŸ›‘οΈ Preventing Pandemics

  • Many would-be pandemics are prevented by swift detection and containment, but these successes often go unrecorded in history, leading to an undervaluation of the efforts involved.

πŸš€ Connectedness: A Double-Edged Sword

  • While global travel and urban centers make fighting disease an uphill battle, the same connectedness allows ideas, systems, and technologies to spread rapidly, enabling us to nip outbreaks in the bud.

  • Despite mistakes, there is fundamental optimism in our ability to learn and improve.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent