Theoretical Modelling in Biology (G0G41A ) Pt II

Download Report

Transcript Theoretical Modelling in Biology (G0G41A ) Pt II

Theoretical Modelling in Biology (G0G41A )
Pt II. Numerical Models
II. multispecies models
Joost Vanoverbeke
Dept. of Biology, K.U.Leuven
(Very) short introduction to programming
•
•
•
•
Data representation
Operations on data: functions
Decision making: conditional expressions
Iteration
Data representation
• Basic data types:
- Integer
..., -1, 0, 1, 2, 3, ...
- Real = floating point
1.5, 3.33333333, 0.0004, ...
- Character
‘a’, ‘b’, ‘c’, ... ‘1’, ‘2’, ‘.’, ‘&’, ...
- Bool
true – false; 1 – 0
Data representation
• Variables & constants
int x = 5;
x => 5
float y = 3.2;
char c = ‘d’;
const int z 6;
x = 7; OK
z = 3; NO
Data representation
• Compound data types
- Array, Vector; (List)
5
3 34
A= 1
A[2] => 5; A[6] => 18
7
18
12
...
- String
= array of characters
“Hello world” = ‘H’ ‘e’
‘l’
‘l’
‘o’
‘’
‘w’
‘o’
‘r’
‘l’
‘d’
Operations on data
• function sum(x, y) = x + y;
a = 2;
b = 3;
c = sum(a, b);
c => 5
• function double_sum(x, y)
= sum(x, y) + sum(x, y);
double_sum(a, b) => 10
Conditional expression
• Boolean expression: result = true or false
3<5
4 >= 7
=> true
=> false
• Conditional expression: if then else
if <boolean expression> = true
then do <expression 1>
else do <expression 2>
• a = 5; b = 7;
if a < 4 then sum(a, b) else double_sum(a, b)
=> 24
Iteration & loops
•
•
Repeat a give sequence of programming instructions for a number of times
Predefined number of times:
-
•
No predefined number of times:
-
•
for x between 1 and 10 do
{
instructions...;
x=x+1;
}
while x < 10 do
{
instructions...;
x = a_function(x)
}
Numerical integration = loop over discrete time intervals ∆t
-
for time between 1 and 100 do
{
N = dN/dt * ∆t;
time = time + ∆t;
}
Exercise 3: individual based model
• Extend the given individual based model (‘indivpop1.sml’) to include
age dependent reproduction rate and mortality rate
- Age of an individual:
• can be calculated as time(1) – init_time(1); both time() and init_time() are
build-in functions in simile
- Reproduction:
• Individuals will only reproduce when their age is equal or larger than 10
• This can be programmed by using an ‘if ... then ... else ...’ statement.
- Mortality:
• Make mortality linearly dependent on age: mortality = d*age
- Plot the population size over time
- Calculate the average age of the individuals and plot over time
Multispecies models
• Modelling the interactions between multiple species
within a community
Two species competition
N1(- -)N2
 K  N1  12 N 2 
dN1

 r1 N1  1
dt
K1


 K 2  N 2   21 N1 
dN2

 r2 N 2 
dt
K2


• Stable coexistence if
K1 < K2/α21
K2 < K1/α12
• Competition is weak:
intraspecific competition >
interspecific competition
N2 Stable coexistence
K1/ α12
>
K2
dN 1
0
dt
dN 2
0
dt
K1 > K2/ α21
N1
Interactions between more than two
species
 K  N1  12 N 2 


dN1
r
r
  N1  r1  1 11 N1  1 12 N 2 
 r1 N1  1
dt
K1
K1
K1




with α11 = 1
n  r


dNi
i ij

 N i  ri  
N j 
dt
Ki
j 1


Lotka Volterra Predator Prey
N1(- +)N2
dN1
 N1 
 rN1 1    hN1 N 2
dt
K 

dN2
 hN1 N 2  m N2
dt
•
•
•
•
•
h = prey capture rate
β = conversion efficiency
Stable coexistence if
K > m/(βh)
Carrying capacity > output/input
budget of predator
P
Stable coexistence
m
h
P
< K
N
Prey only
m
K <h
N
Lotka Volterra Predator Prey
N1(- +)N2
dN1
r


 N1  r  N1  hN2 
dt
K


dN2
 N 2  m  hN1 
dt
•
Reformulate :
-
Prey (N1) : intrapspecific response -r/K = a11
Prey : interspecific response -h = a12
Predator (N2) : intrinsic rate of increase b – m with b = 0 => -m = r2
Predator : intraspecific response 0 = a22
Predator : interspecific response βh = a21
dN1
 N1 r1  a11 N1  a12 N 2 
dt
dN2
 N 2 r2  a22 N 2  a21 N1 
dt
=>
n


dNi

 N i  ri   aij N j 
dt
j 1


Multispecies models
• Competition :
n  r


dNi
i ij

 N i  ri  
N j 
dt
Ki
j 1


• -riαij/Ki = aij
• All Lotka-Volterra interactions can be written as:
n


dNi

 N i  ri   aij N j 
dt
j 1


• aij(- -)aji
: competition
• aij(+ +)aji
: mutualism
• aij(- +)aji
: predator – prey
• aij(0 +)aji
: commensalism
Community and food web models
8
• Community model:
- Focus on all possible interactions
between species
- (- -), (- +), (+ +), (+ 0)
4
9
5
7
6
1
3
2
8
9
• Food web model:
- Focus on predator-prey interactions
- (- +)
4
5
1
7
6
2
3
Characteristics of multispecies models
• Size of the community or food web
- S : Number of species
- Number of ‘trophic’ species: collective term for all the species
having a common set of predators and prey
• Complexity
- L : total number of links between species in food web
- Relative to S:
• Linkage density : L/S
• Connectance : L/S(S-1)
With S(S-1) = total possible number of interactions between S
species
Characteristics of multispecies models
8
4
5
1
9
• Length of food chains
7
6
2
- Top level: species have no predators
- Intermediate level(s): species have both
predators and prey
- Basal level: species have no prey
• Obtain their resources directly from the
environment
3
2
5
1
7
6
8
4
• Type of species & Trophic levels
9
3
- Food chain: set of (predator prey) links
along a particular path starting from a
basal species and endig at a top species
- Mean chain length
Stability analysis of multispecies models
•
•
•
•
Equilibrium densities of the species?
Dependence on number of species S?
Dependence on number of links L?
Dependence on type of interactions?
(- -), (- +), (+ +), (+ 0)
Equilibrium densities
• Set of coupled equations:
S


dNi
 N i  ri   aij N j   0
dt
j 1


• Solve for equilibrium solutions for all Ni
• Are equilibrium solutions stable or unstable?
Stability analysis
• Analytical solution:
- Jacobian matrix = matrix with partial derivatives of growth rate
functions dNi/dt on each Nj
- Solve for the eigenvalues of the Jacobian matrix for each
equilibrium solution
- Parameter settings (ri, aij) for which all eigenvalues have
negative real parts give stable equilibrium solutions
• For number of species S >= 5 general analytical
solutions are impossible
• Other approaches for stability analysis needed
Stability analysis
• Approach 1
- Numerical simulation of the trajectories of the species densities
Ni over time
- Analyse the simulation results for different parameter settings
• Approach 2
- Numerical solutions of the Jacobian matrix for particular
parameter settings
- Find solutions for different parameter settings
- Determine parameter settings for which equilibria are stable
Stability analysis
• Approach 3:
- Derive qualitative rules
- Given the relative strength of intraspecific (aii) versus interspecific (aij)
interactions, what is the likelihood of community stability?
- Given the signs of the elements aij, what is the likelihood of community
stability?
- Some qualitative rules:
• Increasing the number of species S will likely decrease stability of
community and food web models
• Increasing connectance L/S(S-1) will also likely decrease stability
• Strong intraspecific (aii) and weak interspecific (aij) interactions will increase
community stability
• Predator-prey interactions are more likely to be stable than other types of
interactions
=> different trophic levels increase probability of stable food webs
Exercise 4: food webs
•
Given a community with one predator and two competing prey species:
dP
 m P  1h1 N1 P   2 h2 N 2 P
dt


dN1
r
r
 N1  r1  1 N1  1 12 N 2   h1 N1 P
dt
K1
K1




dN2
r
r
 N 2  r2  2 N 2  2 21 N1   h2 N 2 P
dt
K2
K2


•
•
•
•
•
•
With m = 0.3; β1 = 0.2; h1 = 0.1; β2 = 0.1; h2 = 0.1
And r1 = 0.5; K1 = 100; α12 = 0.7; r2 = 0.4; K2 = 120; α21 = 0.8
Reformulate the model in terms of aij and calculate their value
Open the simile file ‘foodweb.sml’ and change the model to the reformulated
model in terms of aij values
Start the model with initial densities P = 5, N1 = 10, N2 = 10 and plot the
species densities over time
Is there stable coexistence of all three species?
Exercise 4: food webs
• dP/dt = P(rP + ap1N1 + ap2 N2)
• dN1/dt = N1(r1 + a11N1 + a12N2 + a1PP)
• dN2/dt = N2(r2 + a22N2 + a21N1 + a2PP)
• ap1 = β1h1
• …
Example multispecies competition
• ‘MultiComp1.sml’
• Multispecies competition model for arbitrary number of competing
species
n


dNi
 N i  ri   aij N j 
dt
j 1


• For all species: intraspecific competition (aij for i = j) equals -0.05
• Interspecific competition strength (aij for i ≠ j) is determined at
random during initialization of the model
all aij range between -0.05 and 0
• Such a model can be used for example to analyse effect of
community size, connectance and relative importance of intraversus interspecific interactions on community stability
Exercise 5: multispecies competition
• Open the simile file ‘MultiComp1.sml’
• Adapt the simile model to represent the following multispecies
competition model:
S


 K i    ij N j 
dNi
j 1

 ri N i 

dt
Ki




• Ki are randomly created during initialization of the model and
range between 50 and 100 (use the build in rand_const()
function)
• αij = 1 for i = j ; for i ≠ j , αij are randomly created during
initialization of the model and range between 0.7 and 1.1
• Start the model with initial densities Ni = 10