Generate a suitable set of default cohort introduction times, biased so that introductions are more closely packed at the beginning of time, become increasingly spread out.

cohort_schedule_times_default(max_time)

Arguments

max_time

Time to generate introduction times up to (the last introduction time will be at least max_time).

Value

Vector of introduction times.

Details

The reason for the stepped distribution is to keep step sizes as series of doublings. Doing this limits the range of possible introduction times from an infinite set of possible values to a very limited subset of values (based on combinations of 1, 0.5, 0.25, 0.125 etc). The reason for doing this is to minimise the number of unique introduction times across all species. The ODE stepper needs to stop at each point where a cohort is introduced. If each species was selecting a bunch of points that was essentially unique (compared to those selected for all other species), the number of unique cohort introductions times could get very large, requiring more ODE steps.

Author

Rich FitzJohn, adapted from original C++ code by Daniel S. Falster.