Variability in the Super-individual
This page contains 3 scripts for a final project in QERM 550. For the project, a simple generic IBM was coded, modeling young-of-the-year fish foraging on a limited food population. Then this model was recoded twice using two different super-individual approaches described by Grimm and Railsback (2005). A full description is given by Scheffer et. al (1995). The extent to which variability was lost or retained in the super-individual schemes compared to the purely individual based was the focus of the project.
Here is the code used for the pure IBM. The real simulated population size used in the project has been reduced for efficiency.
super IBM 1
Here is the code used for the first super individual approach. When in starvation mode, this approach reduces the internal amount of each super-individual by a random draw from a Binomial(n,p) distribution.
super IBM 2
Here is the code used for the second super individual approach. When in starvation mode, this approach reduces the internal amount of each super-individual by a random draw from a Binomial(n,p) distribution. When this internal amount falls belows 25% of it's original value it is recombined with another super-individual based on several criteria. Unfortunately, the recombination function was coded with a for loop and this script runs a bit slower.