18. Ecology
[status: barely-started]
18.1. Motivation, Prerequisites, Plan
As I write this, in April of 2020, it seems like a good opportunity ot get comfortable with some of the equations that come up when we talk about growth. We will look at the growth of a population, or growth of the number of infected humans (which is related to the growth of the population that carries the infection).
Let us start with mosquitoes and West Nile Virus in Texas. Watch this crash course video at:
https://www.youtube.com/watch?v=RBOsqmBQBQk&index=2&list=PL8dPuuaLjXtNdTKZkV_GiIYXpV9w4WxbX
Then have ready this nature paper on basics of ecology:
https://www.nature.com/scitable/knowledge/library/an-introduction-to-population-growth-84225544/
18.2. Factors that come up in modeling population ecology
name |
variable |
|
initial pop: |
N |
|
birth rate: |
B |
|
death rate: |
D |
|
growth rate: |
r |
= (B - D) / N |
predation |
||
immigration |
||
emigration |
||
mates |
||
food |
||
space |
18.3. Exponential growth
18.3.1. Unlimited
Spend some time plotting exponentials in gnuplot. Show how they dwarf linear growth, and how you need log scale to compare them.
The equation that represents population growth is:
This is studied in detail in Section 17.5, with solutions looking like
But if you could not solve it easily then you would write it out like this:
This can be demonstrated with a simple program that calculates:
P0 = 10
rate = 1.2
delta_t = 1
P = P0
print('## generation population')
for generation in range(100):
P = P + P * (rate-1) * delta_t
print(generation, ' ', P)
18.3.2. Resource-constrained - r-selection versus K-selection
- r-selection
A strategy in which you reproduce as quickly as you can.
- K-selection
A strategy in which you reproduce less and put more effort into your children.
18.3.2.1. Simulating with the logistic equation
The balance between these two is given by having large or small \(r\) or \(k\) in the logistic equation:
This can be solved with:
where
This can be visualized with a simple program:
#! /usr/bin/env python3
import math
def main():
P0 = 30
delta_t = 0.01
print('# time P_bigr P_medr P_smallr')
for tstep in range(5000):
t = delta_t * tstep
P_0 = logistic(P0, t, 0.1, 500)
P_1 = logistic(P0, t, 0.25, 500)
P_2 = logistic(P0, t, 0.5, 500)
P_3 = logistic(P0, t, 0.75, 500)
P_4 = logistic(P0, t, 1.0, 500)
print(f'{t:3}', ' ', P_0, ' ', P_1, ' ', P_2, ' ', P_3, ' ', P_4)
def logistic(P0, t, r, K):
A = (K - P0) / P0
result = K / (1 + A * math.exp(-r*t))
return result
main()
$ python3 logistic_solution.py > rk.out
$ gnuplot
plot [] [0:500] 'rk.out' using 1:2 title 'r = 0.1'
replot 'rk.out' using 1:3
replot 'rk.out' using 1:4
replot 'rk.out' using 1:5
replot 'rk.out' using 1:6
18.3.2.2. Simulating with the logistic equation
18.4. History of the human population on earth
Peruse the Wikipedia page on historical population estimates:
https://en.wikipedia.org/wiki/Estimates_of_historical_world_population
and the study at:
https://www.prb.org/howmanypeoplehaveeverlivedonearth/
Spend some time exploring the interactive graphs at:
https://ourworldindata.org/world-population-growth
Expand the title on “All our charts on World Population Growth”, and pick the population by country since 1500 and try to understand what areas are exponential.
Then look at the link “World population since 10,000 BCE (OurWorldInData series)”.
Download the data for this graph and zoom in on some specific periods. Look at both linear and logarithmic scales.
Following the indications shown in
https://www.nature.com/scitable/knowledge/library/an-introduction-to-population-growth-84225544/
we can look at the table below and seek certain interesting periods in the data.
Start |
End |
What to look for |
---|---|---|
-10000 |
-4000 |
Agricultural revolution |
-4000 |
-600 |
Early empires |
-1000 |
300 |
Alexander and Rome |
1 |
300 |
Imperial Rome |
1 |
1600 |
Largely steady world population |
1200 |
1400 |
Medieval black death |
1500 |
present |
Modern world |
1850 |
present |
Industrial revolution |
1900 |
present |
Large scale science |
18.5. The logistic function
Although the earth’s population as a whole appears to still be in an exponential growth phase, the Pew Research Center predicts that it will flatten by the end of the 21st century:
This type of function is not exponential growth anymore: it shows exponential growth, but that then slows down and we end up with what is called the Logistic Function:
https://en.wikipedia.org/wiki/Logistic_function
Think of fidget spinners.
Let’s start getting to work on the equations that represent population growth
18.6. The Lotka-Volterra differential equations
18.7. Further reading
https://www.youtube.com/watch?v=NYq2078_xqc - Khan Academy video with pleasant intro to cycles and real examples, 5min.
https://www.youtube.com/watch?v=mFDiiSqGB7M - crash course on predator-prey ecology
https://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations#A_simple_example
http://mc-stan.org/users/documentation/case-studies/lotka-volterra-predator-prey.html
Still have to look at articles on 3-way predator-prey:
chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/https://www.cs.unm.edu/~forrest/classes/cs365/lectures/Lotka-Volterra.pdf
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.360.1552&rep=rep1&type=pdf
And how about simple models of a full society collapse?
https://en.wikipedia.org/wiki/Collapse:_How_Societies_Choose_to_Fail_or_Succeed
http://necsi.edu/projects/evolution/co-evolution/pred-prey/co-evolution_predator.html
https://www.ted.com/talks/jared_diamond_on_why_societies_collapse
https://faustusnotes.wordpress.com/2014/05/15/mathematical-modeling-of-civilization-collapse/
Cliometrics