- •Preface
- •1.1 Introduction
- •1.2 Models and modelling
- •1.3 The learning process for mathematical modelling
- •Summary
- •Aims and objectives
- •2.1 Introduction
- •2.2 Examples
- •2.3 Further examples
- •Appendix 1
- •Appendix 2
- •Aims and objectives
- •3.1 Introduction
- •3.2 Definitions and terminology
- •3.3 Methodology and modelling flow chart
- •3.4 The methodology in practice
- •Background to the problem
- •Summary
- •Aims and objectives
- •4.1 Introduction
- •4.2 Listing factors
- •4.3 Making assumptions
- •4.4 Types of behaviour
- •4.5 Translating into mathematics
- •4.6 Choosing mathematical functions
- •Case 1
- •Case 2
- •Case 3
- •4.7 Relative sizes of terms
- •4.8 Units
- •4.9 Dimensions
- •4.10 Dimensional analysis
- •Summary
- •Aims and objectives
- •5.1 Introduction
- •5.2 First-order linear difference equations
- •5.3 Tending to a limit
- •5.4 More than one variable
- •5.5 Matrix models
- •5.6 Non-linear models and chaos
- •5.7 Using spreadsheets
- •Aims and objectives
- •6.1 Introduction
- •6.2 First order, one variable
- •6.3 Second order, one variable
- •6.4 Second order, two variables (uncoupled)
- •6.5 Simultaneous coupled differential equations
- •Summary
- •Aims and objectives
- •7.1 Introduction
- •7.2 Modelling random variables
- •7.3 Generating random numbers
- •7.4 Simulations
- •7.5 Using simulation models
- •7.6 Packages and simulation languages
- •Summary
- •Aims and objectives
- •8.1 Introduction
- •8.2 Data collection
- •8.3 Empirical models
- •8.4 Estimating parameters
- •8.5 Errors and accuracy
- •8.6 Testing models
- •Summary
- •Aims and objectives
- •9.1 Introduction
- •9.2 Driving speeds
- •Context
- •Problem statement
- •Formulate a mathematical model
- •Rewritten problem statement
- •Obtain the mathematical solution
- •9.3 Tax on cigarette smoking
- •Context
- •Problem statement
- •Formulate a mathematical model
- •Obtain the mathematical solution
- •9.4 Shopping trips
- •Context
- •Problem statement
- •Formulate a mathematical model
- •Obtain the mathematical solution
- •Interpret the mathematical solution
- •Using the model
- •9.5 Disk pressing
- •Context
- •Problem statement
- •Formulate a mathematical model
- •Obtain the mathematical solution
- •Interpret the mathematical solution
- •Further thoughts
- •9.6 Gutter
- •Context and problem statement
- •Formulate a mathematical model
- •Obtain the mathematical solution
- •9.7 Turf
- •Context
- •Problem statement
- •Formulate a mathematical model
- •Obtain the mathematical solution
- •Interpret the solution
- •9.8 Parachute jump
- •Context and problem statement
- •Formulate a mathematical model
- •Obtain the mathematical solution
- •9.9 On the buses
- •Context
- •Problem statement
- •Formulate a mathematical model
- •Obtain the mathematical solution
- •9.10 Further battles
- •Discrete deterministic model
- •Discrete stochastic model
- •Comparing the models
- •9.11 Snooker
- •Context
- •Problem statement
- •Formulate a mathematical model
- •Obtain the mathematical solution
- •Interpret the mathematical solution
- •9.12 Further models
- •Mileage
- •Heads or tails
- •Picture hanging
- •Motorway
- •Vehicle-merging delay at a junction
- •Family names
- •Estimating animal populations
- •Simulation of population growth
- •Needle crystals
- •Car parking
- •Overhead projector
- •Sheep farming
- •Aims and objectives
- •10.1 Introduction
- •10.2 Report writing
- •Preliminary
- •Main body
- •Appendices
- •Summary
- •General remarks
- •10.3 A specimen report
- •Contents
- •1 PRELIMINARY SECTIONS
- •1.1 Summary and conclusions
- •1.2 Glossary
- •2 MAIN SECTIONS
- •2.1 Problem statement
- •2.2 Assumptions
- •2.3 Individual testing
- •2.4 Single-stage procedure
- •2.5 Two-stage procedure
- •2.6 Results
- •2.7 Regular section procedures
- •2.8 Conclusions
- •3 APPENDICES
- •3.1 Possible extensions
- •3.2 Mathematical analysis
- •10.4 Presentation
- •Preparation
- •Giving the presentation
- •Bibliography
- •Solutions to Exercises
- •Chapter 2
- •Example 2.2 – Double wiper overlap problem
- •Chapter 4
- •Chapter 5
- •Chapter 6
- •Chapter 8
- •Index
gave the following results:
For this run, all passenger journeys were set to one stop only.
With the interval changed to 60 s for the buses and the mean time between passenger arrivals reduced to 10 s, bunching and overtaking of buses can be seen, as follows.
In a fully stochastic version of the model, we would of course collect statistical summaries of the results of several runs.
9.10 Further battles
We have frequently mentioned the fact that many different models can be devised for the same physical situation. We now return to a topic previously
considered in chapter 6 where we used a differential equation model to predict the outcome of a battle between two armies. To be more precise, this was a continuous deterministic model. No randomness was involved and each army was represented as a continuous function of time. In the model the progress of the battle was represented by the graph shown again here in Figure 9.20.
Time is of course a truly continuous variable but the numbers of troops still fighting on both sides at time t are really integers. We now wish to study this problem using two other models, both of which are discrete, the first being deterministic and the second stochastic.
Discrete deterministic model
For this we represent our two armies by integer variables x and y and also let time progress in a series of discrete jumps. We recall that in section 6.5 we made the following explicit assumptions. In 1 h, each surviving X soldier kills 0.1 Y soldiers; in 1 h, each surviving Y soldier kills 0.15 X soldiers. We started with x = 5000 and y = 10 000 and we found that the battle ended with x = 7906 and y = 0 after about 5.8 h. Let us choose 0.1 h as a time step and use x n and y n to denote the number of X and Y troops still alive after n time steps (where n is necessarily a positive integer). We shall take the above assumptions to be equivalent to the following. In one time step, each X soldier kills 0.01 Y soldiers; in one time step, each Y soldier kills 0.015 X soldiers. The model can now be written as
Figure 9.20
i.e.
and
Note that, by using the INT function, we are making x i and y i into integer variables. We could have left x i and y i as discrete but real variables and ignored the decimal parts in our final evaluation. This
leads to similar but slightly different results owing to the accumulated rounding errors. (Try it!)
Starting with x = 10 000 and y = 5000, we can now very easily generate x 1 , y 1 ; x 2 , y 2 ; …, from our two equations to give Table 9.17.
Discrete stochastic model
The fact that there are more troops on one side or that they are more effective fighters makes it more likely that the next single casualty in a battle will be from the other side. We can put together a model which allows chance to enter while at the same time taking account of this bias in the following way. If at any stage in the battle, there are x and y troops surviving and fighting, then the probability that the next death is that of an X soldier can be represented by
and of a Y soldier
Note that the two probabilities add up to 1 (the next death must be on one side or the other) and are in the correct ratio bx : ay.
Table 9.17
Our stochastic model is therefore quite simple. We start with the values x = 10000 and y = 5000 and substitute in the above expressions to calculate the probabilities:
Taking a uniform [0,1] random variable RND from a random-number generator, we let x become x − 1 if RND < 0.429; otherwise y becomes y − 1. We then recalculate the probabilities and take another random number, and so on. The graph describing the progress of the battle can be represented as in Figure 9.21.
We start from the point x = 10 000, y = 5000, and move in regular horizontal or vertical jumps along the grid until we finally reach one of the axes and one army or the other has been reduced to zero. Three particular runs from the same initial conditions gave the following results: y = 0 when x = 7958; y = 0 when x = 7961; y = 0 when x = 7895. By carrying out several runs, we can estimate the spread of likely results under identical conditions. Note that it is possible for army Y to win (but very unlikely).
Figure 9.21
Comparing the models
Why do the figures obtained from the deterministic discrete model not quite agree with those given by the continuous model? Note that in the discrete model the x and y values remain constant for 0.1 h at a time. The ‘kill rates’ of 0.015 and 0.01 per time unit which we have used are not precisely equivalent to the instantaneous rates 0.15 and 0.1 in the continuous model.
With the discrete stochastic model, different runs will of course produce different results but, if we take the mean of a large number of runs, then we would expect to reach very similar conclusions about the eventual outcome of the battle, as in the other two models. Note that one deficiency of the discrete stochastic model is that time does not explicitly appear, so that we have no way of estimating the duration of the battle. This could be done, however, by extending the model to make the deaths events in a ‘pooled Poisson process’. At any stage in the battle the time between deaths is then a negative exponentially distributed random variable with mean 1/( bx + ay ); so we can simulate it by taking
Note that at the beginning of the battle, when x and y are large, T is likely to be smaller, while towards the end of the battle we get longer time intervals between deaths, as we would expect.