181 void sampleWithinPop(
Patch* patch, deque<Individual*>& males, deque<Individual*>& females,
unsigned int nsire);
209 virtual void FHread (
string& filename);
Template class for the LCEs StatHandler classes.
Definition: filehandler.h:247
A class to read a pedigree from a file.
Definition: LCEmisc.h:203
virtual void FHwrite()
Definition: LCEmisc.h:208
virtual ~FHPedigreeReader()
Definition: LCEmisc.h:206
vector< unsigned long * > _pedigree
Definition: LCEmisc.h:214
vector< unsigned long * > & getPedigree()
Definition: LCEmisc.h:211
virtual void FHread(string &filename)
Definition: LCEmisc.cc:728
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:52
This class contains traits along with other individual information (sex, pedigree,...
Definition: individual.h:49
Removes all adults from the patches and randomly moves the offspring to the adults age class.
Definition: LCEmisc.h:80
virtual ~LCE_Aging()
Definition: LCEmisc.h:85
virtual LCE_Aging * clone()
Definition: LCEmisc.h:90
virtual bool setParameters()
Definition: LCEmisc.h:88
virtual age_t requiredAgeClass()
Definition: LCEmisc.h:96
virtual void loadFileServices(FileServices *loader)
Definition: LCEmisc.h:91
LCE_Aging()
Definition: LCEmisc.h:83
virtual age_t addAgeClass()
Definition: LCEmisc.h:95
virtual age_t removeAgeClass()
Definition: LCEmisc.h:94
virtual void execute()
Definition: LCEmisc.cc:45
virtual void loadStatServices(StatServices *loader)
Definition: LCEmisc.h:92
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEmisc.h:93
A class to perform crosses within patches, implements the NC1 mating design.
Definition: LCEmisc.h:165
void sampleAmongPop(Patch *patch, deque< Individual * > &males, unsigned int nsire)
Definition: LCEmisc.cc:641
void sampleWithinPop(Patch *patch, deque< Individual * > &males, deque< Individual * > &females, unsigned int nsire)
Definition: LCEmisc.cc:680
virtual void loadStatServices(StatServices *loader)
Definition: LCEmisc.h:192
virtual void loadFileServices(FileServices *loader)
Definition: LCEmisc.cc:434
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEmisc.h:193
unsigned int _nDam
Definition: LCEmisc.h:166
bool _doWithinPop
Definition: LCEmisc.h:169
FHPedigreeReader * _reader
Definition: LCEmisc.h:171
bool _doAmongPop
Definition: LCEmisc.h:169
virtual ~LCE_Cross()
Definition: LCEmisc.h:178
virtual age_t requiredAgeClass()
Definition: LCEmisc.h:196
virtual LifeCycleEvent * clone()
Definition: LCEmisc.h:188
virtual age_t removeAgeClass()
Definition: LCEmisc.h:194
map< unsigned long, Individual * > _pedigree_pop
Definition: LCEmisc.h:173
unsigned int _atGeneration
Definition: LCEmisc.h:168
unsigned int _nSire
Definition: LCEmisc.h:166
bool _doReplace
Definition: LCEmisc.h:169
unsigned int _nOffspring
Definition: LCEmisc.h:167
virtual void execute()
Definition: LCEmisc.cc:453
bool create_individual_ancestors(Individual *ind)
Definition: LCEmisc.cc:575
LCE_Cross()
Definition: LCEmisc.cc:382
virtual age_t addAgeClass()
Definition: LCEmisc.h:195
string _pedigree_file
Definition: LCEmisc.h:172
virtual bool setParameters()
Definition: LCEmisc.cc:400
void generatePedigree()
Definition: LCEmisc.cc:510
Randomly removes individuals from the patches according to the extinction rate parameter.
Definition: LCEmisc.h:104
TMatrix * _harvest_proportion
Proportion of the patch size to remove.
Definition: LCEmisc.h:110
unsigned int(LCE_Patch_Extinction::* _rand_size_fct)(double)
Definition: LCEmisc.h:122
LCE_Patch_Extinction()
Definition: LCEmisc.cc:132
void do_remove(age_idx AGE, Patch *patch)
Definition: LCEmisc.cc:328
void do_flush(Patch *patch)
Definition: LCEmisc.cc:319
virtual void loadFileServices(FileServices *loader)
Definition: LCEmisc.h:151
virtual LifeCycleEvent * clone()
Definition: LCEmisc.h:148
bool _by_proportion
Definition: LCEmisc.h:114
unsigned int rand_exp(double mean)
Definition: LCEmisc.h:127
double _harvest_dist_shape
shape variable to use with the gamma dist.
Definition: LCEmisc.h:118
virtual ~LCE_Patch_Extinction()
Definition: LCEmisc.h:133
double _harvest_dist_stdev
Standard deviate to use with the Gaussian dist.
Definition: LCEmisc.h:116
virtual age_t addAgeClass()
Definition: LCEmisc.h:155
unsigned int rand_lognormal(double mean)
Definition: LCEmisc.h:128
unsigned int rand_uniform(double max)
Definition: LCEmisc.h:124
virtual bool setParameters()
Definition: LCEmisc.cc:150
string _harvest_distribution
Name of the distribution to use.
Definition: LCEmisc.h:112
virtual age_t requiredAgeClass()
Definition: LCEmisc.h:156
virtual age_t removeAgeClass()
Definition: LCEmisc.h:154
unsigned int rand_poisson(double mean)
Definition: LCEmisc.h:125
bool set_matrix_param(TMatrix *mat, string name)
Definition: LCEmisc.cc:255
unsigned int get_harvest_size(age_idx AGE, Patch *patch)
Definition: LCEmisc.cc:357
unsigned int rand_gaussian(double mean)
Definition: LCEmisc.h:126
double _extinction_threshold
Patch extinction threshold in % of total size of the patch.
Definition: LCEmisc.h:120
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEmisc.h:153
bool _harvest_size_varies
Flags.
Definition: LCEmisc.h:114
bool _by_size
Definition: LCEmisc.h:114
TMatrix * _harvest_size
Number of individual to remove per patch.
Definition: LCEmisc.h:108
virtual void execute()
Definition: LCEmisc.cc:284
TMatrix * _Xtion_rate
Patch extinction probability.
Definition: LCEmisc.h:106
virtual void loadStatServices(StatServices *loader)
Definition: LCEmisc.h:152
Regulates the patches to their carrying capacity, acts on each age class separately.
Definition: LCEmisc.h:51
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEmisc.h:66
virtual age_t requiredAgeClass()
Definition: LCEmisc.h:69
virtual void loadFileServices(FileServices *loader)
Definition: LCEmisc.h:64
virtual age_t removeAgeClass()
Definition: LCEmisc.h:67
virtual bool setParameters()
Definition: LCEmisc.h:61
virtual LCE_Regulation * clone()
Definition: LCEmisc.h:63
LCE_Regulation()
Definition: LCEmisc.h:54
void regulatePatch(Patch *patch, age_idx age, sex_t sex)
Definition: LCEmisc.cc:118
virtual void execute()
Definition: LCEmisc.cc:91
virtual void loadStatServices(StatServices *loader)
Definition: LCEmisc.h:65
virtual ~LCE_Regulation()
Definition: LCEmisc.h:56
virtual age_t addAgeClass()
Definition: LCEmisc.h:68
A class to change the size of the population/patches during a simulation.
Definition: LCEmisc.h:222
virtual age_t addAgeClass()
Definition: LCEmisc.h:257
age_t _setAge
Definition: LCEmisc.h:228
void fillPatchWithBackup(unsigned int p, age_idx age)
Definition: LCEmisc.cc:1104
void fillPatchNoBackup(unsigned int p, age_idx age)
Definition: LCEmisc.cc:1091
void fillPop(void(LCE_Resize::*fillFuncPtr)(unsigned int p, age_idx age))
Definition: LCEmisc.cc:1074
Patch * _patchBackup
Definition: LCEmisc.h:229
void regulateAgeClassNoBackup(Patch *patch, age_idx age)
Definition: LCEmisc.cc:1151
virtual void loadStatServices(StatServices *loader)
Definition: LCEmisc.h:254
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEmisc.h:255
TMatrix _patch2keep
Definition: LCEmisc.h:227
int _atGeneration
Definition: LCEmisc.h:224
bool _do_fill
Definition: LCEmisc.h:226
bool _do_regulate
Definition: LCEmisc.h:226
bool updateParameters()
Definition: LCEmisc.cc:837
virtual LifeCycleEvent * clone()
Definition: LCEmisc.h:250
void regulate(void(LCE_Resize::*regFuncPtr)(Patch *patch, age_idx age))
Definition: LCEmisc.cc:1119
void buildNewPatchArrayNoBackup()
Definition: LCEmisc.cc:1000
virtual void execute()
Definition: LCEmisc.cc:882
void updatePatchCapacities()
Definition: LCEmisc.cc:985
list< int > _generations
Definition: LCEmisc.h:225
LCE_Resize()
Definition: LCEmisc.cc:793
void regulateAgeClassWithBackup(Patch *patch, age_idx age)
Definition: LCEmisc.cc:1131
void buildNewPatchArrayWithBackup()
Definition: LCEmisc.cc:1013
virtual bool setParameters()
Definition: LCEmisc.cc:812
void removeDesignatedPatch(bool do_backup)
Definition: LCEmisc.cc:1036
virtual age_t requiredAgeClass()
Definition: LCEmisc.h:258
virtual void loadFileServices(FileServices *loader)
Definition: LCEmisc.h:253
virtual age_t removeAgeClass()
Definition: LCEmisc.h:256
virtual ~LCE_Resize()
Definition: LCEmisc.h:233
list< int >::const_iterator _genITER
Definition: LCEmisc.h:223
bool _do_flush
Definition: LCEmisc.h:226
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:73
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:430
static double Poisson(double mean)
From the Numerical Recieps.
Definition: Uniform.h:220
static double Gaussian(double sigma)
Definition: Uniform.h:262
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:125
static double LogNormal(double zeta, double sigma)
Definition: Uniform.h:358
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:45
The Service class used to manage the StatHandler objects.
Definition: statservices.h:50
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:49
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:36
#define NONE
No age flag.
Definition: types.h:48
unsigned int age_t
Age class flags.
Definition: types.h:46
#define ADULTS
Adults age class flag (breeders).
Definition: types.h:54
#define OFFSPRG
Offspring age class flag.
Definition: types.h:50
age_idx
Array index of the age classes in the patch sizes and containers arrays.
Definition: types.h:41