0% found this document useful (0 votes)
24 views4 pages

Simulation Exercises in Biological Modeling

On June 16th, the document discusses exercises using simulation tools like MATLAB, MAPLE and XPPAUT to model biological systems. Exercise 17 involves simulating a SIR model in MATLAB. Exercise 18 involves finding stationary points and stability of a competition model in MAPLE. Exercise 19 involves plotting solutions and isoclines of a predator-prey model, investigating how dynamics change with parameters and initial conditions, in XPPAUT. A short introduction is also provided on using XPPAUT.

Uploaded by

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

Simulation Exercises in Biological Modeling

On June 16th, the document discusses exercises using simulation tools like MATLAB, MAPLE and XPPAUT to model biological systems. Exercise 17 involves simulating a SIR model in MATLAB. Exercise 18 involves finding stationary points and stability of a competition model in MAPLE. Exercise 19 involves plotting solutions and isoclines of a predator-prey model, investigating how dynamics change with parameters and initial conditions, in XPPAUT. A short introduction is also provided on using XPPAUT.

Uploaded by

Arij Daou
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

TU Munich SS 2009

Prof. Dr. C. Kuttler


[Link]. M. Barbarossa 16.06.2009

Mathematical models in biology 2


Exercise Sheet 6
Making some practice with simulation tools

On Tuesday June, 16th we will work together to get a little more practice with simulation tools
like MATLAB, MAPLE or XPPAUT.
The following exercises and their resolution will be discussed in this class.

Exercise 17:
Simulate in MATLAB the SIR model without population dynamics (already known form the
lecture “Mathematical models in biology”):

Ṡ = −βSI + γR,
I˙ = βSI − αI,
Ṙ = αI − γR.

Choose the following parameter values:

α = 0.4, β = 0.8, γ = 0.3

and the following initial values S(0) = 5, I(0) = 2, R(0) = 3.

Exercise 18:
Consider the Volterra’s competition model:
x1 + b1 x2
 
x˙1 = r1 x1 1 −
K1
x2 + b2 x1
 
x˙2 = r2 x2 1 −
K2
with the following parameters: r1 = 0.75, r2 = 0.55, K1 = 150, K2 = 100, b1 = 0.2, b2 = 0.5. Find
the stationary points of the system. Compute in MAPLE the Jacobian matrix and the stability
of the stationary points.

Exercise 19:
Start XPPAUT with the already given file [Link].
a) Plot the solutions of the problem.

b) What happens when a = 0 or c = 0?

c) Change the initial conditions and observe the changes in the dynamics of the system.

d) Plot the isoclines of the system and observe the evolution of the system in the phase-space
(choose your initial point wiht Mouse).
A short introduction to XPPAUT
Run XPPAUT and load the required file [Link] (all the files you are going to use in
XPPAUT have the extension .ode).

Once you get the file loaded and it is valid, the program will pop up a new window in which
you find a graphic window, a menu on the left and few blue commands in the upper part.

We will now learn something about the commands we will need in this lecture.
Let us start from the blue commands:
• ICs allows you to change the initial conditions of the problem;

• BCs allows you to change the boundary conditions of the problem (it is not our case);

• Delay is related to delay differential equations, you will not need it in this lecture;

• Param allows you to change one or more parameters, without changing the .ode file;

• Eqns here you can visualize the equations of the problem;

• Data shows you all the values needed to plot the results.

Once you click on one of these options, a window with a table will pop up. There you find also
five commands:
• Close which closes the window;

• Ok which confirms the chosen parameters;

• Default and Cancel which restores the default parameters (the ones written in the .ode
file);

• Go which runs the program and plots the solution with the new inputs.
To solve the problem, run the program clicking on (I)nitialconds and choosing (G)o from the
list of options.

From the main list (the one on the left of the graphical window) you may need the followi-
ng commands:
• (I)nitialconds ⇒ (G)o runs the program;

• Erase erases the contents of the active window, redraws the axes;

• Viewaxes ⇒ 2D allows you to set the limits of the command window as well as the
variables to place on the axes and the label of the axes;

• Xi vs t prompts you for the variable name, you want to plot w.r.t. the time t. The window
is automatically fitted and the data plotted.

To plot a solution you need always (I)nitialconds ⇒ (G)o and once it is ready, click on Xi vs t.

To plot the Nullclines (Null-Isoklinen) of a system, you first should change the view axes, e.g.
from x vs. t into y vs. x. Then click on Window/zoom ⇒ (F)it to fit the window to the
interesting part of your plot.
If you want to see how the solution of the system behaves in the xy-plane, choose manually a
starting point with Initialconds ⇒ (M)ouse and click with the mouse on the initial data you
re interested in.

To change one or more equations of your problem, open the editor which allows you to change
directly the .ode file.

To quit the program, from the main list choose File ⇒ Quit.
0.1 Ein paar kleine Übungen zum logistischen Wachstum
Starten Sie das XPPAUT mit der bereits vorbereiteten Datei [Link].

a) Wie sieht die Lsung des Modell aus?

b) Was passiert wenn m  b? Und wenn N0  K (bzw. N0  K) ?

c) Was passiert wenn man anstatt des logistischen Modells


(
Ṅ (t) = r · N (t)
N (0) = N0

mit r > 0 betrachtet? Was ist die biologische Bedeutung?

You might also like