0% found this document useful (0 votes)
6 views

Week9 Simulation

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Week9 Simulation

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Mathematical

Modelling
Part 2: Dynamic Model
Content of part 2

Chapter 1: Introduction to dynamic models

Chapter 2: Analysis of dynamic models

Chapter 3: Simulation of dynamic models

3
Simulation of dynamic models
• The fact is that we do not know how to solve
very many differential equations.
• The qualitative methods are more widely
applicable, but for some problems we need a
quantitative answer and a high degree of
accuracy.
• Simulation method provide both for practical
problems with reasonable accuracy and very
flexible.
• Simulation method has a drawback in
sensitivity analysis.
4
Outline
• Introduction to simulation

• Continuous-time models

5
Introduction to simulation
• There are essentially two ways to approach the
analysis of a dynamic system model.
• The analytic approach attempts to predict what will
happen according to the model in a variety of
circumstances.
• In the simulation approach, we build the model, turn
it on, and find out.

6
Example: War problem
Two forces, which we will call red (R) and blue (B),
are engaged in battle. In this conventional battle,
attrition is due to direct fire (infantry) and area fire
(artillery). The attrition rate due to direct fire is
assumed proportional to the number of enemy
infantry. The attrition rate due to artillery depends on
both the amount of enemy artillery and the density
of friendly troops. Red has amassed five divisions to
attack a blue force of two divisions. Blue has the
advantage of defense, and superior weapon
effectiveness besides. How much more effective
does blue have to be in order to prevail in battle?
7
Step 1: Ask a question

8
Step 2: Select a modelling approach

• We will model this problem as a discrete-time


dynamical system model and solve this model
by simulation.

9
Step 2: Select a modelling approach

10
Step 3: Formulate the problem
• We will model the war problem as a discrete–time
dynamical system with two state variables: 𝑥1 = 𝑅, the
number of red force units; and 𝑥2 = 𝐵, the number of
blue force units. The difference equations are

• We will start with 𝑥1 (0) = 5 and 𝑥2 (0) = 2 divisions of


troops. We will use a time step of ∆𝑡 = 1 hour. We will
also need numerical values for 𝑎𝑖 and 𝑏𝑖 in order to run
the simulation program.

11
Step 3: Formulate the problem
• Suppose that a typical conventional battle lasts
about 5 days and that engagement takes place
about 12 hours per day. That means that one force
is depleted in about 60 hours of battle.
• If a force were to be depleted by 5% per hour for
60 hours, the fraction remaining would be
0.95 60 = 0.05.
• We will assume that 𝑎2 = 0.05. Since area fire is
not generally as effective as direct fire in terms of
attrition, we will assume 𝑏2 = 0.005.

12
Step 3: Formulate the problem
• Now blue is supposed to have greater weapon
effectiveness than red, so we should have 𝑎1 > 𝑎2 and
𝑏1 > 𝑏2 . Let us assume that 𝑎1 = 𝜆𝑎2 and 𝑏1 = 𝜆𝑏2 for
some 𝜆 > 1. The analysis objective is to determine the
smallest 𝜆 that will make 𝑥1 → 0 before 𝑥2 → 0. Now the
difference equations are

13
Step 4: Solve the problem
• We will solve the problem by running the simulation for
several values of 𝜆. We begin exercising the model for
𝜆 = 1, 1.5, 2, 3 and 5.
• Case 𝜆 = 1

14
Step 4: Solve the problem
• Case 𝜆 = 1.5

15
Step 4: Solve the problem
• Case 𝜆 =2

16
Step 4: Solve the problem
• Case 𝜆 = 5

17
Step 4: Solve the problem

18
Step 4: Solve the model
We decided to make a few more model runs to find out
just how big λ would have to be for blue to win. At 𝜆 =
6.0, the blue side won after 13 hours of battle, with 0.6
units remaining.

19
Outline
• Introduction to simulation

• Continuous-time models

20
Continuous-time models
• To simulate continuous-time dynamical
systems, we apply a following approximation

to transform our continuous-time dynamical


systems to discrete-time models.

21
Example: Whale problem
The blue whale and fin whale are two similar species that
inhabit the same areas. Hence, they are thought to
compete. The intrinsic growth rate of each species is
estimated at 5% per year for the blue whale and 8% per
year for the fin whale. The environmental carrying capacity
(the maximum number of whales that the environment can
support) is estimated at 150,000 blues and 400,000 fins.
The extent to which the whales compete is unknown. In the
last 100 years intense harvesting has reduced the whale
population to around 5,000 blues and 70,000 fins and
assuming a competition coefficient of 𝛼 < 1.25 × 10−7 ,
both populations of whales will eventually grow back to
their natural levels in the absence of any further harvesting.
How long will this take?
22
Step 1: Ask a question

Objectives: How long does it take to get the equilibrium starting from 𝐵 =
5000, 𝐹 = 70000.

23
Step 2: Select a modelling approach

• We will model this problem as a discrete-time


dynamical system model and solve this model
by simulation.
• Let consider a case of continuous-time
dynamical system in 𝑛 variables, where we are
given the rate of changes 𝐹 = (𝑓1 , … , 𝑓𝑛 ) for
each of variables 𝑥1 , … , 𝑥𝑛 , but we have not yet
decided whether to model the systems as a
continuous-time or discrete-time dynamical
system.

24
Step 2: Select a modelling approach

• The discrete-time dynamical systems looks like

Where Δ𝑥𝑖 represents the change in 𝑥𝑖 over 1


unit of time (Δ𝑡 = 1). The units of time are
already specified.

25
Step 2: Select a modelling approach

• If we decided on a continuous-time model instead, we


would have

which we would still need to figure out how to simulate.


We certainly can’t expect the computer to calculate 𝑥(𝑡)
for every value of 𝑡. Instead, we must calculate 𝑥(𝑡) at a
finite number of points in time.

26
Step 2: Select a modelling approach

• In other words, we must replace the continuous-


time model by a discrete-time model in order to
simulate it. If we use a time step of Δ𝑡 = 1 unit, it
will be exactly the same as the discrete-time
model we could have chosen in the first place.

27
Step 3: Formulate the problem
• We let 𝑥1 = 𝐵, 𝑥2 = 𝐹 represent the population levels of
each species. The dynamical system equations are

On the state space 𝑥1 ≥ 0, 𝑥2 ≥ 0. In order to simulate


this model we will begin by transforming to a set of
difference equations

28
Step 3: Formulate the problem

over the same state space. Here, Δ𝑥𝑖 represents the


change in population 𝑥𝑖 over a period of Δ𝑡 = 1 year.

We will have to supply a value for 𝛼 = 10−7 to start with.

29
Step 4: Solve the problem
We solve the model using a computer implementation of the
algorithm in previous slide. We begin the simulation with
𝑁 = 20 years, starting with 𝑥1 0 = 5000, 𝑥2 0 = 70000.

30
Step 5: Answer the question
• It takes a long time for the whale populations to
grow back: about 100 years for the fin whale,
and several centuries for the more severely
depleted blue whale.

31
Exercises

32
Exercises

33

You might also like