0% found this document useful (0 votes)
18 views10 pages

Predator-Prey and Epidemic Models

Uploaded by

shrutinarang000
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views10 pages

Predator-Prey and Epidemic Models

Uploaded by

shrutinarang000
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

EXPERIMENT -6

AIM :- Modelling and Simulation of the Predator-Prey Model.


DESCRIPTION:-

PREDATOR-PREY MODEL
The predator-prey model is used to describe the interaction between two species: one being a
predator and the other its prey. It can also be extended to model interactions between any two
interdependent populations. The model typically uses difference equations to describe how the
populations of predators and prey change from one time step to the next, based on their
interactions.
The predator-prey model can be written as a system of difference equations:

1. Prey population: The change in the prey population, x , from one time step t to the next t + 1, is
determined by:

𝑥 = (1 + 𝛼) ∗ x − β ∗ y ,

where:

• 𝑥 is the population of prey at time t.


• 𝛼 is the growth rate of the prey in the absence of predators.
• β is the rate at which predators kill prey.
• 𝑦 is the population of predators at time t.

2. Predator population: The change in the predator population, y , from one time step to the next is
given by:

𝑦 = (1 − 𝛾) ∗ 𝑦 + 𝛿 ∗ 𝑥 ,

where:

• 𝑦 is the population of predators at time t.


• 𝛿 is the rate at which predators gain from consuming prey (birth rate of predators).
• 𝛾 is the natural death rate of the predators.
• 𝑥 is the population of prey at time t.

Key Concepts:

• Prey growth: In the absence of predators, the prey population grows

exponentially (with rate 𝛼).

• Predator growth: The predator population increases based on how many prey are
available to consume, and in absence of prey they die off at a rate proportional to their
own population size.
Assumptions:

• The prey population grows exponentially in the absence of predators.


• The predator population depends on the prey for food.
• The prey population is limited by the availability of resources and the number of
predators.
• The predator population is limited by the availability of food (prey).

Commands and Calculations in ‘R’

Example 1. Consider a forest ecosystem consisting of two species: deer (prey) and tigers (predators).
The tigers hunt and kill the deer for food. Let 𝐷 and 𝑇 represent the population of deer and Tiger,
respectively, at the end of year 𝑛. Formulate a discrete-time predator-prey model to describe the
dynamics of the tiger and deer populations. Assume the following general relationships:
• The deer population grows according to a natural growth rate, but decreases due to predation by
the tigers.
• The tiger population increases as they consume deer for food, but decreases due to natural
mortality.

𝐷 = (1 + 𝛼) ∗ 𝐷 − 𝛽 ∗ 𝑇 ,

𝑇 = (1 − 𝛾) ∗ 𝑇 + 𝛿 ∗ 𝐷 ,

We are given the following initial conditions:

• 𝛼 = 0.1 , 𝛽 = 0.05, 𝛾 = 0.5, and 𝛿 = 0.4.


• The initial population of deer is fixed at 𝐷0= 200
• Simulate the population dynamics over time for various initial tiger populations, including cases
where 𝑇 < 500 and 𝑇 = 2300.
CODE:-

Practice Questions
OUTPUT:-

PRACTICE QUESTIONS:-

Ques 1. In a forest ecosystem, the population of oak trees and caterpillars interact
according to the following discrete-time model. The population dynamics of oak trees 𝑂
and caterpillars 𝐶 are governed by the following system of difference equations:

𝑂 = (1 + 𝛼) ∗ 𝑂 − 𝛽 ∗ 𝐶 ,

𝐶 = (1 − 𝛾) ∗ 𝐶 + 𝛿 ∗ 𝑂 ,

We are given the following initial conditions: 𝛼 = 0.5 , 𝛽 = 0.02, 𝛾 = 0.1, and 𝛿 = 0.1. Write
down the difference equations for the oak tree and caterpillar populations, incorporating the
parameters provided. For the initial population of oak trees 𝑂 =1000, Simulate the
population dynamics over 50 years (i.e., for 50 time steps). For each initial caterpillar
population (𝐶 = 200, 500, 800), plot the population of oak trees and caterpillars over time
on the same graph.

CODE:-
OUTPUT:-
EXPERIMENT -7

AIM :- Modelling and Simulation of the Epidemic Model of Influenza.


DESCRIPTION:-

Epidemic Model of Influenza

An epidemic model, is a continuous model that is used to simulate and understand the
spread of influenza (flu) within a population. The model focus on how individuals transition
between different states, such as susceptible, infected, and recovered, and how these
transitions affect the spread of the disease. For an influenza epidemic, a common way to
model this is using a SIR model.

Basic SIR Model :-

The SIR model divides the population into three compartments:

1. 𝑺(𝒕) = Susceptible individuals (those who have not been infected yet and are at risk of
catching it.).
2. 𝑰(𝒕) = Infected individuals (those who are currently infected with the flu and can spread
the disease to others).
3. 𝑹(𝒕) = Recovered individuals (those who have recovered and are assumed to have
immunity).
4. 𝑵: the total population size (assumed to be constant over time), so 𝑁 = 𝑆(𝑡) + 𝐼(𝑡) +
𝑅(𝑡)

The population is assumed to be closed (no births, deaths, or migration), and the disease
is transmitted via contact between susceptible and infected individuals. The model is
governed by a set of differential equations:

where

• 𝛽 is the transmission rate (how likely an infected person is to transmit the disease to a
susceptible person).
• 𝛾 is the recovery rate (the rate at which infected individuals recover).
Basic Reproduction Number 𝑹𝟎:

The basic reproduction number, 𝑅 , is defined as the average number of secondary


infections caused by a single infected individual in a fully susceptible population. In the
SIR model, it is given by:

𝑅0= βS0
γ
Where 𝑆 is the initial number of susceptible.

• If 𝑅0> 1, the disease will spread.


• If 𝑅0< 1, the disease will die out.
Commands and Calculations in ‘R’

Example 1.
Model the spread of an influenza epidemic in a population of N = 1,000 individuals. The
population is initially fully susceptible (i.e., no one is vaccinated or immune). A small
fraction of the population, say 1%, is initially infected, and the rest are susceptible. You will
assume that once individuals recover, they gain immunity and cannot be infected again.
Given the following parameters: 𝛽 = 0.001 (transmission rate), and 𝛾 = 0.1 (recovery rate,
meaning the average infectious period is 10 days). The goal is to simulate and visualize the
progression of the disease over time, showing how the number of susceptible, infected, and
recovered individuals changes over time.

We have:
• Total population (N) = 1000
• Initial infected individuals (I₀) = 1% of the population
• Initial susceptible individuals (S₀) = 99% of the population
• Transmission rate (β) = 0.001
• Recovery rate (γ) = 0.1 (indicating that on average, an individual stays infected for 10
days, as the reciprocal of 0.1 is 10)
CODE:-
OUTPUT:-

PRACTICE QUESTIONS

Ques. 1 Consider a small community where initially there is only one infective but there
are 499 susceptible. The disease spreads at a rate of β=0.002 per day, and the average time
an infected individual remains infectious is 7 days, implying a recovery rate 𝛾 = 1/7.
Generate the timedependent plot on the interval t = [0, 20].
(a) How many susceptible never get infected?
(b) What happens as time progresses if S(0) = 100?

(c) Suppose the transmission coefficient 𝛽 is doubled. How does this effect the maximum
number of infected individuals? Is this what you expect?
CODE:-
OUTPUT:-

Common questions

Powered by AI

Altering initial conditions, such as predator or prey populations, can significantly affect the dynamics observed in simulations. For instance, starting with a low number of predators might allow prey populations to grow unchecked initially, while a high initial number of predators could suppress prey population growth. These dynamics help illustrate the sensitive dependence on initial conditions characteristic of predator-prey interactions .

Initial population assumptions in both the SIR and predator-prey models can impact predictions significantly. Accurate initial conditions are crucial; misestimations can lead to incorrect long-term forecasts affecting policy decisions, such as when and how to implement control measures in disease outbreaks or wildlife management strategies. Proper estimation and flexibility in assumptions enhance the reliability of predictions .

The discrete-time predator-prey model can simulate real-world ecosystems by modeling interactions such as those between deer and tigers or oak trees and caterpillars. It helps predict changes in populations based on factors like growth and predation rates. However, its limitations include the assumption of constant parameters over time and the exclusion of environmental and other biological complexities that affect real ecosystems .

The transmission rate (β) directly impacts how quickly an influenza epidemic spreads. High transmission rates require vigorous interventions like widespread vaccination and social distancing to be effective, whereas lower rates might be controlled with less intensive measures. Understanding β helps optimize intervention strategies to manage health resources efficiently .

Assumptions in the SIR model, such as constant transmission rates and complete population immunity post-recovery, simplify real-world dynamics but may not fully capture variations like changes in virulence or immunity duration, potentially leading to inaccurate epidemic forecasts. Recognizing these limitations is crucial for realistic public health planning and response .

Natural growth rates determine population increases in the absence of limiting factors, while predation rates influence population declines due to interactions with predators. The balance between these rates drives the stability or oscillation in the long-term dynamics of ecosystems, affecting whether populations can coexist or if one might lead to the extinction of the other .

Challenges in using the SIR model include accurately estimating initial populations, such as the number of susceptible and infected individuals, and the difficulty in predicting parameter values like transmission and recovery rates. These uncertainties can lead to significant differences in the simulation outcomes, potentially undermining the effectiveness of the model in real-world applications .

The accuracy of predictions in the predator-prey model is highly dependent on the assumptions regarding growth rates and interactions between populations. The model assumes that the prey population grows exponentially in the absence of predators and that predator populations depend solely on prey for sustenance, ignoring other factors such as environmental changes and availability of alternate resources. If these assumptions are inaccurate, the model may not accurately predict real-world dynamics as it oversimplifies complex ecological interactions .

Difference equations in predator-prey models offer simplicity and ease of computation for discrete time steps, which is beneficial in analyzing population changes over specified intervals. However, they might not capture nuances of continuous interactions within the ecosystem, potentially missing phenomena that occur at smaller time scales and continuous feedback effects .

The basic reproduction number, R0, determines whether a disease will spread within a population; if R0 > 1, the disease will spread, while R0 < 1 implies the disease will die out. This influences public health strategies by indicating the level of intervention needed. For instance, reducing R0 through vaccination campaigns or social distancing can prevent an outbreak from escalating .

You might also like