|
void | reproduce () |
| give birth to children
|
|
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 (SubPopulation &, const std::vector< uint_fast32_t > &litter_sizes) |
| Append new individuals to SubPopulation::juveniles. 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.
|
|
std::vector< uint_fast32_t > | litter_sizes_logistic (const std::vector< ShPtrIndividual > &females, size_t popsize) |
| Calculate stochastic litter sizes proportional to female weight.
|
|
void | survive (int_fast32_t season) |
| Evaluate survival.
|
|
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.
|
|
uint_fast32_t | destination (int_fast32_t age, uint_fast32_t loc) |
| Generate random number for new location.
|
|
void | sample (SubPopulation &subpops, size_t n_adults, size_t n_juveniles) |
| Move individuals to SubPopulation::samples.
|
|
size_t | sample (std::vector< ShPtrIndividual > &src, std::vector< ShPtrIndividual > &dst, size_t n) |
| Implementation of sample().
|
|
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.