-
Notifications
You must be signed in to change notification settings - Fork 2
World
This class handles creation of the environment, migration and parsing and saving the simulation output.
The behavior of up down borders and left right borders on the edge of the grid of demes is described using user-defined parameters. There are several ways to handle borders on the edges of the defined world. The emigrants of an extending border are pure natives of population A (left) or B (right). If any non-pure A or B individual emigrating out of the defined world, a new column of demes is created. The behavior of a population border is similar to the extending border with only difference, all migrants crossing population border exit simulated world. All emigrants attempting to leave the universe through reflective edge return to the deme at which they have started. A wrapping edge connecting the first deme in row or column with the last as neighbors, allowing eg simulation on a torus. Edge behavior is defined though two parameters only; Type of Up-Down edges and type of Left-Right edges.
The space on the Figure contains 2 × 2 demes. The left edge behaves as an extending border. The right edge is a population border to native ’B’ population. Up-Down edge type of the first column is reflective. The Up-Down edge of the second column is wrapping. Note, that user defines left-right edges and up-down edges using two parameters only, therefore the figure is just illustrative.
Implementation of migration fixes the scale of dispersal σ in a given spatial dimension. Migration is symmetrical, so the expectation for displacement X is E[X] = 0, then for a one dimensional simulation standard deviation of the parent offspring position (σ) is
where pi is probability of an individual moving to position −1 or 1 respectively.
