0% found this document useful (0 votes)
31 views6 pages

Modelling and Simulation

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

Modelling and Simulation

Modeling project
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

MODELLING AND SIMULATION

ASSIGNMENT # 01
Submission Date (OCTOBER 23, 2024)

BY
SAMAN ZAHRA
ROLL #
21021509-108

MATH-406 (MODELLING AND SIMULATION)


BS Mathematics (7’B’)

Submitted To:
Dr Jamshed

Department Of Mathematics

UNIVERSITY OF GUJRAT (HAFIZ HAYAT CAMPUS)


Table of Contents
MODELLING AND SIMULATION...............................................................................................................3
Overview of the Simple Harmonic Oscillator...........................................................................................3
2.1 Simple harmonic motion (SHM..............................................................................................................3
Model Description...................................................................................................................................4
3.1 Key Parameters:....................................................................................................................................4
MATLAB Implementation for the Simple Harmonic Oscillator................................................................4
Explanation of the Code..........................................................................................................................5
5.1 Parameter Initialization:........................................................................................................................5
5.2 Time vector:...........................................................................................................................................5
5.3 Initial Conditions:...................................................................................................................................6
5.4 Model Function:....................................................................................................................................6
5.5 ODE Solver:............................................................................................................................................6
5.6 Data Extraction:.....................................................................................................................................6
5.7 Visualization:.........................................................................................................................................6
5.8 Results Table:.........................................................................................................................................6
Graph Analysis.........................................................................................................................................7
Sample Data Table...................................................................................................................................7
Summary.................................................................................................................................................8
Reference................................................................................................................................................8
Preface
This assignment, as part of the Modelling and Simulation course, explores the practical and
theoretical aspects of simulating real-world systems through mathematical frameworks. By
focusing on the Lotka-Volterra model, this work demonstrates the dynamic interactions between
predator and prey populations, providing valuable insights into their interdependence and
behavior over time.

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.

Tabular Data Sample:

Conclusion
This simulation illustrates predator-prey dynamics over time using the Lotka-Volterra model. The
oscillatory behavior reflects the interdependence of the two populations.

You might also like