Modelling and Simulation
Modelling and Simulation
ASSIGNMENT # 01
Submission Date (OCTOBER 23, 2024)
BY
SAMAN ZAHRA
ROLL #
21021509-108
Submitted To:
Dr Jamshed
Department Of Mathematics
Modelling and simulation are essential tools in mathematics, offering a structured approach to
analyzing systems by defining relationships through equations and simulating their evolution
under various conditions. In this assignment, the Lotka-Volterra model serves as a prime
example, using differential equations to depict biological processes that are applicable not only
to ecology but also to fields like economics and sociology.
The assignment includes parameter definition, the use of numerical solvers, and graphical
analysis, emphasizing the importance of data visualization in understanding the interplay
between variables. The oscillatory patterns in predator-prey dynamics underline the principles of
population control and resource availability.
I am grateful to my instructor, Dr. Jamshed, for his guidance and for fostering an engaging
learning environment. Through this assignment, I aim to enhance my understanding of
mathematical models and their applications, showcasing their relevance in solving complex real-
world problems.
MODELLING AND SIMULATION
Modeling involves creating a representation of a system, process, or phenomenon. This can be done
through mathematical equations, diagrams, or physical models. Simulation involves using a model to
replicate the behavior of a system over time, often through computational means.
Lotka-Volterra Model
The Lotka-Volterra model describes the dynamics between two species: prey and predators. The model
consists of two differential equations that represent how the populations of these species interact over
time.
Prey Population: Grows exponentially when there are few predators but declines due to predation.
Predator Population: Increases when there are abundant prey but decreases when prey becomes
scarce.
Parameters:
Prey Growth Rate (𝛼): Natural growth rate of the prey.
Predation Rate (𝛽): Rate at which predators consume prey.
Predator Growth Rate (𝛿): Growth rate of predators based on the availability of prey.
Predator Death Rate (𝛾): Natural death rate of predators.
Code Explanation
Parameters: Define initial populations and rates for prey and predators.
ODE Function: The lotka_volterra function calculates changes in populations based on current values.
ODE Solver: ode45 is used to solve the system over a specified time span with initial conditions.
Extracting Results: Populations are extracted from the solution for plotting and analysis.
Plotting: Visualizes how prey and predator populations change over time.
Results Table: Displays time series data for both populations.
Graph Interpretation
Prey (Blue Curve): Fluctuates based on natural growth and predation.
Predators (Red Curve): Increases with available prey and decreases when prey is scarce.
Conclusion
This simulation illustrates predator-prey dynamics over time using the Lotka-Volterra model. The
oscillatory behavior reflects the interdependence of the two populations.