Nested functions for initializing, calculating and collecting population simulator results.
Useful links