The University of Melbourne SWEN90004: Modelling Complex Software Systems Workshop Cx.02: Dynamical Systems and ODE Models First Semester, 2022
This workshop aims to give students more experience at exploring models of dynamical systems and modelling with ODEs in MATLAB.
Your tasks
1. Logistic Map
Copyright By PowCoder代写 加微信 powcoder
Consider a simple discrete time dynamical system: The Logistic Map.
xt+1 = rxt(1 − xt) (1)
If we consider an ecological based scenario, the Logistic Map could be used to describe population dynamics at a fundamental level. Here, xt represents the proportion Pt/A of the population present at time t given the maximum carrying capacity A.
Which parts of the equation are the positive and negative feedback loops. Can you explain the impact of the loops in a simple ecological scenario.
In the following tasks, you will investigate the effects of the system parameter r and initial starting value x0.
(a) What behaviour do you see for 0 < r < 1?
How do these results depend on the starting value of x0?
(b) What behaviour do you see for 1 < r < 3?
How do these results depend on the starting value of x0?
(c) What behaviour do you see for 3 < r < 3.4?
How do these results depend on the starting value of x0?
Given the ecological scenario described above, describe what it would be like living a world where the population dynamic were governed by the Logistic Map with 3 < r < 3.4.
(d) What would you expect the value of x∞ to be if you iterated the map for a large
number of iterations with r = 1 +
For large value of r, does the result depend on the choice of the initial value of x0? What happens when r > 4?
(e) A bifurcation diagram is a plot that shows the value of the changing parameter, r in our case, on one axis and the solution to the system on the other axis.
Using the Matlab code for the bifurcation diagram, zoom in by changing the scale on the axis in the plot. What do you notice? Plot time series values for the “interesting” zones in the bifurcation diagram.
2. Lotka-Volterra Model
Consider the Lotka-Volterra predator-prey equations and corresponding Matlab code. If x is the prey species and y the predator:
dx = αx − βxy dt
dy = γxy − δy dt
where α is the natural reproduction rate of the prey in the absence of predators; β is the death rate of prey due to predators; γ is the efficiency of turning “predate prey” into new predators; and δ is the natural death rate of predators in the absence of food (prey).
(a) Using the default values for parameter values in the Matlab code supplied, trace the time-series plots of the population levels of each species and the corresponding phase plots. What do the plots of the simulation results mean?
(b) Investigate the effects of different sizes for the initial populations. Investigate the effects of different values for the parameters in the ODE-system. You should systematically modify each parameter and observe the output.
(c) Investigate the impact of intra-species competition. Describe the changes in system behaviour you observe in the language of dynamical systems (equilibria, trajecto- ries, etc.)
(d) (more advanced): Try adding a third species to the model. Choose for yourself the properties of this third species and include these properties in the ODE-system. Can you induce chaotic behaviour?
3. SIR model
Consider the SIR model and the corresponding Matlab code.
The model consists of a system of three coupled nonlinear ordinary differential equations:
dS = −βSI dt
dI =βSI−γI (3) dt
dR = γI dt
where S is the fraction of the population who are currently susceptible; I is the fraction of the population who are currently infectious; R is the fraction of the population who are currently recovered (such that S+I+R = 1); β is the transmission coefficient, which determines the rate at which the disease spreads; and γ is the mean rate of recovery of infectious people.
In this task, you will investigate specific scenaros using the SIR model.
Assume that the total population is N = 5 million people. The time period t of interest
for the disease spread is meaured in months 0 ≤ t ≤ 6. For a certain strain of flu 2
spreading through this population, the parameters of the SIR model were estimated to be β = 1.1 and γ = 0.4.
(a) If there were initially 1 million infected people and there were 3 million individuals who do not have, nor have ever had, this particular strain of flu virus, what would be the expected maximum number of infected individuals (at a given point in time) during the first 4 months of the outbreak? Estimate when this occurs.
Is the number of susceptible people ever the same as the number of infected people when 0 ≤ t ≤ 6? If so, estimate when this occurs.
(b) Suppose that at t = 0.5 the flu virus mutates so that the value of β changes, however the value of γ does not change. You can assume that the new value of β is 0.3.
Estimate the number of infected people at the point in time 1 month after the virus mutates. Compare this to the value of the original estimate of the number of infected people (if the virus did not mutate). Explain any differences that you observe.
(c) Investigate the sensitivity of the original model using a range of different parameter values—consider the ratio of β : γ and different values for S0 and I0.
(d) Using the SIR model with demography (birth and death), investigate the relation- ship between the disease parameters and the birth/death rate μ. What effect does this have on the periodic behaviour?
(e) (more advanced): Starting with the original SIR model (ie, without demogra- phy), try modifying the equations to include waning immunity (ie, people move from R back to S at some rate. What effect does this have on system dynamics?
(f) (more advanced): Starting with the demographic model, add vaccination. That is, assume a fraction p of births are into the R compartment rather than the S compartment. Investigate the relationship between the disease parameters and the level of vaccination required to prevent an outbreak from occurring.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com