M. Drew LaMar
April 17, 2020
We will discover a population model of logistic growth from observing the output of an agent-based simulation. The resulting model should be of the form
\[ P_{t+1} = P_{t} + F(P_{t}), \]
which deterministically determines the population size in the next generation (\( P_{t+1} \)) as a function of the current population size (\( P_{t} \)). This is known as a discrete map, which will be the focus of our future investigations.
This file describes a model of logistic growth. The initial idea came from Glenn Ledder at the October 2016 NIMBioS Quantitative Biology Working Group.
The model was designed to explore questions about logistic growth - in particular, to understand the growth of individuals in an environment with limited resources and size. The purpose is mainly for classroom use as an experiential model whereby students run simluations, visualize output, and then construct the discrete logistic growth map from the results.
The model has two kinds of entities: turtles and patches of empty land. The patches make up a square grid landscape of patches in a checkerboard pattern. Turtles are characterized only by their location, described as the patch they are on. Therefore, turtle locations are in discrete units, the x- and y- coordinates of the center of their patch. Patch size and the length of one time step in the simulation are not specified because the model is generic. Simulations go until the entire board is full; the length of one time step is not specified.
There is only one process in the model: birth and spread of the turtles to neighboring patches. On each time step, each turtle spreads to neighboring patches. The order in which the turtles execute this action is unimportant.
The model does not include direct interaction among turtles. Instead, interaction is implicit in that turtles are unable to spread to occupied neighboring patches.
Stochasticity is used to represent random birth and spreading into neighboring patches.
To observe the population dynamics, two plots are updated: (1) a plot of number of turtles as a function of time (ticks), and (2) a plot of the population change as a function of current population size.
The grid-size is initialized to 8 x 8 upon startup. The prob-grow is initialized to 0.1 upon startup. The turtles are initialized by creating four of them in the center of the region.
The environment is assumed to be constant, so the model has no input data.
The birth and spreading submodel defines exactly how turtles give birth and spread to neighboring patches. “Give birth and spread” corresponds to the simple creation of a new turtle in a neighboring patch. “Neighboring patches” are the four patches surrounding the turtle’s current patch (N, S, E, and W).
On each time step, each unoccupied neighbor patch of a turtle is colonized with probability prob-grow. A random number from a uniform distribution between 0.0 and 1.0 . If this random number is less than prob-grow, that neighbor patch is colonized.
Question: Look at the code and make sure it matches the ODD description. Is there anything that is vague or doesn’t match the description?
Question: As grid-size is increased, describe what you see in plot (A) and (B). Explain the patterns that you see.
Answer: In plot (A), we begin to see smoother and smoother versions of an S-shaped curve, which is typical of logistic growth. The curve levels off at what is known as the carrying capacity, which is at grid-size*grid-size.
Question: What type of (simple) curve fits the pattern that you see in plot (B)?
Answer: While the curve is not symmetric, a simple curve that might do reasonably well fitting this curve would be a quadratic function, or more specifically an upside-down parabola.
Question: Write down a function \( F \) for the upside-down parabola from the previous question. Note that the function satisfies the following formula
\[ \Delta P_{t} = P_{t+1}-P_{t} = F(P_{t}) \]
**Hint**: Which points does the curve have to go through?
Based on the hint, the two points that must be on the curve are \( (P_{t}, \Delta P_{t}) = (0,0) \) (no population therefore no growth) and \( (P_{t}, \Delta P_{t}) = (s^2, 0) \) (maximum population therefore no growth), where \( s = \textrm{grid-size} \). The general formula for a quadratic is
\[ F(P_{t}) = aP_{t}^2 + bP_{t} + c \]
First, plug in \( (0,0) \):
\[ \begin{align} 0 & = F(0) \\ & = a\times 0^2 + b\times 0 + c \\ & = c \end{align} \]
Thus, \( c = 0 \).
Based on the hint, the two points that must be on the curve are \( (P_{t}, \Delta P_{t}) = (0,0) \) (no population therefore no growth) and \( (P_{t}, \Delta P_{t}) = (s^2, 0) \) (maximum population therefore no growth), where \( s = \textrm{grid-size} \). The general formula for a quadratic is
\[ F(P_{t}) = aP_{t}^2 + bP_{t} \]
Now, plug in \( (P_{t}, F(P_{t})) = (s^2, 0) \):
\[ \begin{align} & \ 0 = F(s^2) = a\left(s^2\right)^2 + bs^2 \\ \Rightarrow & \ 0 = as^2 + b \ \textrm{(dividing by $s^2$ on both sides)} \\ \Rightarrow & \ b = -as^2. \end{align} \]
Thus, \( b = -as^2 \).
Thus, \( c = 0 \).
Based on the hint, the two points that must be on the curve are \( (P_{t}, \Delta P_{t}) = (0,0) \) (no population therefore no growth) and \( (P_{t}, \Delta P_{t}) = (s^2, 0) \) (maximum population therefore no growth), where \( s = \textrm{grid-size} \). The general formula for a quadratic is
\[ \begin{align} \Delta P_{t} & = F(P_{t}) \\ & = aP_{t}^2 + bP_{t} \\ & = aP_{t}^2 - as^2P_{t} \ \textrm{(since $b = -as^2$)} \\ & = aP_{t}\left(P_{t}-s^2\right) \\ \end{align} \]
In discrete map form, since \( \Delta P_{t} = P_{t+1} - P_{t} \), we arrive at:
\[ P_{t+1} = P_{t} + aP_{t}\left(P_{t}-s^2\right) \]
Note that \( a \) and \( s \) are parameters: \( s \) denotes the grid-size
and \( a \) controls the height of the parabola (which is determined by growth rate, in this model given by prob-grow
). Also, \( a \) must be negative (downward facing parabola), so in order to deal only with positive numbers, we will replace \( a \) with \( -|a| \) to arrive at
\[ P_{t+1} = P_{t} - |a|P_{t}\left(P_{t} - s^2\right). \]
or after some algebra
\[ P_{t+1} = P_{t} + |a|s^2 P_{t}\left(1 - \frac{P_{t}}{s^2}\right). \]
If we let \( K = s^2 \) and \( r = |a|K \), we arrive at
\[ P_{t+1} = P_{t} + rP_{t}\left(1 - \frac{P_{t}}{K}\right). \]