Showing changes from revision #0 to #1:
Added | Removed | Changed
Working example for author developing a C++ discrete time simulation framework.
NOTE: these are messing-about experiments so the graphs below don’t have axis ticks labelled correctly.
Incredibly simplified model where both rabbits and foxes live at most 2 years, and essentially reproduce when they turn 1 year old. They hvae fertility rates specified per individual, with no tracking of males/females, and the number of babies produced by the population in total is taken as uniform rather than a more appropriate distribution. It also uses the oversimplified rule that if a fox needs to eat rabbits to survive for 1 year, then they “telepathically” arrange so that a fox eats either rabbits or no rabbits at all.
quantity | symbol |
---|---|
no of foxes born this year | |
no of 1 year old foxes | |
half of maximum offspring from pair of foxes | |
no of rabbits a fog needs to eat in a year to survive | |
no of rabbits born this year | |
no of 1 year old rabbits | |
half of maximum offspring from pair of rabbits | |
maximum no rabbits vegetation can support |
Next years values are primed versions of existing years values:
where denotes a fresh random variable uniformly distributed on for each occurrence.
Running the system for different random simulation runs for various values of fox and rabbit fertility (for fixed , , etc), the “fox population has not died outd” probabilities after 50 years can be visualised in the below plot (where horizontal axis left to right is increasing fox fertility and vertical axis top to bottom is increasing rabbit fertility):
The “reasonably favourable values of fertility” for foxes lie in a range of about , and providing it’s above a minimum value rabbit fertility doesn’t matter.
The surival probabilities taken as a series of slices parallel to the “fox fertility axis”:
This looks like it might be a gamma distribution (speculation: might possibly because the “suviving trajectories” are ones that don’t hit any of the clamping terms, so somehow is leading to the closed-form probability arguments). Running a simulation with only different random simulation runs has “kinks” which one couldn’t tell if are genuinely significant parts of the distribution or are “under-sampling” artifacts:
(The horizontal axis tick labels are correct here: the absolute probability of surviing 50 years is indeed below .) The surival probabilities taken as a series of slices parallel to the “rabbit fertility axis”:
At least part of the reason why the curves go to a horizontal line is that, with a fixed “rabbit carrying capacity”, above a certain level it’s carrying capacity rather than rabbit fertility that determines the number of rabbits.
Fixed system parameters | Value |
---|---|
c | 200 |
initial | 100 |
initial | 0 |
initial | |
initial | 0 |
evaluations of this incredibly simple system for a grid of system parameter values took about 5 hours on my PC.