|
void | reproduce () |
| Call reproduce_impl() via reproduce_lognormal() or reproduce_logistic() depending on Parameters::med_recruitment. The expected number of children for each adult is proportional to its weight. All the females are evaluated for recruitment, whereas males are stochastically chosen. All the SubPopulation::adults are evaluated regardless of age. Currently, the breeding places are hardcoded to subpopulations 0 and 1.
|
void | reproduce_lognormal () |
| Reproduce according to constant lognormal distribution. Total recruitment is calculated first, and then split it.
|
void | reproduce_logistic () |
| Reproduce according to population size and carrying capacity.
|
void | reproduce_impl (const int_fast32_t loc, std::vector< int_fast32_t > litter_sizes) |
| Call survive_juvenile() and append survived ones to SubPopulation::juveniles. "Juveniles" are sampled from first-year individuals died in the final season.
|
std::vector< int_fast32_t > | litter_sizes_logistic (const std::vector< ShPtrIndividual > &females, int_fast32_t popsize) |
| Calculate stochastic litter sizes proportional to female weight.
|
std::vector< double > | survive_juvenile (std::vector< int_fast32_t > &litter_sizes, std::array< std::vector< int_fast32_t >, 4 > &demography_y, const int_fast32_t sample_size) |
| Evaluate and record survival of juveniles.
|
int_fast32_t | sample_size_juvenile (int_fast32_t loc) const |
| Return sample size of juveniles at location loc in current year_.
|
void | survive (int_fast32_t season) |
| Evaluate survival using death_rate(). "Adults" are sampled from individuals died in the final season.
|
double | death_rate (const int_fast32_t age, const int_fast32_t season) const |
| Finite death rate per quarter year: \( d = 1 - \exp(- M - eF) \).
|
void | migrate () |
| Evaluate migration. Merge SubPopulation::juveniles to SubPopulation::adults.
|
int_fast32_t | destination (int_fast32_t age, int_fast32_t loc) |
| Generate random number for new location.
|
void | init_demography (int_fast32_t duration) |
| Initialize SubPopulation::demography.
|
void | record_demography (int_fast32_t season) |
| Record current state to SubPopulation::demography.
|
std::vector< double > | weights (const std::vector< ShPtrIndividual > &) const |
| For male selection.
|
void | propagate_params () |
| Call all the init* functions.
|
void | init_migration () |
| Prepare MIGRATION_DESTINATION_.
|
void | init_mortality () |
| Prepare NATURAL_MORTALITY_, FISHING_MORTALITY_, FISHING_COEF_.
|
void | init_weight () |
| Prepare WEIGHT_FOR_AGE_.
|
bool | is_ready () const |
| Test if dependent variables are ready.
|
Main class that implements simulation.