36 #include <gsl/gsl_rng.h>
37 #include <gsl/gsl_randist.h>
97 bool setBasicLatticeMatrix (
int rows,
int cols,
double phi_mal,
double phi_fem,
double disp_mal,
double disp_fem);
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:52
Dispersal event with constant dispersal rates.
Definition: LCEdisperse.h:149
virtual bool setParameters()
Definition: LCEdisperse.h:168
void Migrate()
Definition: LCEdisperse.cc:1427
LCE_Disperse_ConstDisp()
Definition: LCEdisperse.cc:1347
virtual void execute()
Definition: LCEdisperse.cc:1400
void MigratePatch_AbsorbingBorder(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1524
virtual ~LCE_Disperse_ConstDisp()
Definition: LCEdisperse.h:156
void Migrate_propagule()
Definition: LCEdisperse.cc:1453
void(LCE_Disperse_ConstDisp::* doPatchMigration)(sex_t SEX, unsigned int local_patch)
Definition: LCEdisperse.h:151
virtual LifeCycleEvent * clone()
Definition: LCEdisperse.h:170
void(LCE_Disperse_ConstDisp::* doMigration)(void)
Definition: LCEdisperse.h:150
void MigratePatchByNumber(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1487
void MigratePatch(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1461
Dispersal event with an evolving dispersal rate given by the "disp" trait.
Definition: LCEdisperse.h:198
double _fixed_disp_rate
Definition: LCEdisperse.h:200
unsigned int Migrate_Island_Propagule(unsigned int home)
Definition: LCEdisperse.cc:1854
unsigned int(LCE_Disperse_EvolDisp::* getAimedPatch)(unsigned int)
Definition: LCEdisperse.h:201
unsigned int Migrate_Island(unsigned int home)
Definition: LCEdisperse.cc:1841
virtual ~LCE_Disperse_EvolDisp()
Definition: LCEdisperse.h:220
void exec_evolmale()
Definition: LCEdisperse.cc:1739
double _fem_cost
Definition: LCEdisperse.h:200
unsigned int Migrate_Lattice(unsigned int home)
Definition: LCEdisperse.cc:1882
void evoldisp(sex_t SEX, int trait_link, double cost)
Definition: LCEdisperse.cc:1755
virtual bool setParameters()
Definition: LCEdisperse.cc:1588
void fixdisp(sex_t SEX, double rate, double cost)
Definition: LCEdisperse.cc:1800
int _fdisp_trait_link
Definition: LCEdisperse.h:214
unsigned int Migrate_SteppingStone1D(unsigned int home)
Definition: LCEdisperse.cc:1870
virtual void execute()
Definition: LCEdisperse.cc:1696
LCE_Disperse_EvolDisp()
Definition: LCEdisperse.cc:1570
void exec_evol2sex()
Definition: LCEdisperse.cc:1747
virtual LifeCycleEvent * clone()
Definition: LCEdisperse.h:226
int _mdisp_trait_link
Definition: LCEdisperse.h:214
void(LCE_Disperse_EvolDisp::* exec)()
Definition: LCEdisperse.h:202
void exec_evolfemale()
Definition: LCEdisperse.cc:1731
double _mal_cost
Definition: LCEdisperse.h:200
The base class of the dispersal LCEs, all events move offspring to the post-dispersal patch container...
Definition: LCEdisperse.h:44
bool setSteppingStone1DMatrix()
Definition: LCEdisperse.cc:636
bool setReducedDispMatrix()
The reduced dispersal matrix contains the indices of the patches to which each patch is connected.
Definition: LCEdisperse.cc:1109
TMatrix * _DispMatrix[2]
The sex-specific dispersal matrices, [0] for males, [1] for females, might be used as connectivity ma...
Definition: LCEdisperse.h:54
virtual ~LCE_Disperse_base()
Deallocates the disp matrix.
Definition: LCEdisperse.cc:53
unsigned int getMigrationPatchBackward(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1256
bool setLatticeTorrusMatrix(int rows, int cols, double disp_mal, double disp_fem, TMatrix *grid)
Definition: LCEdisperse.cc:900
double _disp_propagule_prob
Definition: LCEdisperse.h:47
bool _isByNumber
Definition: LCEdisperse.h:51
unsigned int getReducedDispersalPatchID(sex_t SEX, unsigned int row, unsigned int col)
Definition: LCEdisperse.cc:1333
double _fem_rate
Definition: LCEdisperse.h:49
unsigned int getPropaguleTarget(unsigned int home)
Definition: LCEdisperse.h:117
double getReducedDispersalRate(sex_t SEX, unsigned int row, unsigned int col)
Definition: LCEdisperse.cc:1323
bool setLatticeAbsorbingMatrix()
Definition: LCEdisperse.cc:1051
double getPropaguleProb()
Definition: LCEdisperse.h:116
void reset_counters()
Definition: LCEdisperse.cc:390
virtual void loadFileServices(FileServices *loader)
Definition: LCEdisperse.h:129
bool setLatticeReflectingMatrix(int rows, int cols, TMatrix *grid)
Definition: LCEdisperse.cc:1010
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEdisperse.h:131
vector< vector< double > > _reducedDispMatProba[2]
Matrix containing the probability to migrate to/from the connected patches.
Definition: LCEdisperse.h:69
bool _isForward
Definition: LCEdisperse.h:50
vector< double > getConnectedPatches(sex_t SEX, unsigned int local_patch)
Definition: LCEdisperse.cc:1301
bool setIsland_MigrantPool_Matrix()
Definition: LCEdisperse.cc:549
bool setIsland_PropagulePool_Matrix()
Definition: LCEdisperse.cc:581
int _disp_model
Definition: LCEdisperse.h:46
void setParamPrefix(string pref)
Definition: LCEdisperse.h:79
virtual age_t addAgeClass()
Definition: LCEdisperse.h:133
bool setLatticeMatrix()
Sets the dispersal matrices for the Lattice dispersal model.
Definition: LCEdisperse.cc:723
LCE_Disperse_base()
Definition: LCEdisperse.cc:45
void swapPostDisp()
Definition: LCEdisperse.cc:377
virtual age_t removeAgeClass()
Definition: LCEdisperse.h:132
virtual void loadStatServices(StatServices *loader)
Definition: LCEdisperse.h:130
vector< unsigned int > _PropaguleTargets
Definition: LCEdisperse.h:48
virtual age_t requiredAgeClass()
Definition: LCEdisperse.h:134
bool setDispMatrix()
Definition: LCEdisperse.cc:516
bool setBaseParameters(string prefix)
Definition: LCEdisperse.cc:88
void set_isForward(bool val)
Definition: LCEdisperse.h:85
bool checkBackwardDispersalMatrix(TMatrix *mat)
Definition: LCEdisperse.cc:439
bool isForward()
Definition: LCEdisperse.h:113
void addParameters(string prefix, ParamUpdaterBase *updater)
Definition: LCEdisperse.cc:62
unsigned int getDispersalModel()
Definition: LCEdisperse.h:115
double _mal_rate
Definition: LCEdisperse.h:49
bool updateDispMatrix()
Definition: LCEdisperse.cc:365
vector< vector< double > > _reducedDispMat[2]
Matrix containing the indexes of the patches connected to each patch.
Definition: LCEdisperse.h:67
unsigned int getMigrationPatchForward(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1236
void allocateDispMatrix(sex_t sex, unsigned int dim)
Definition: LCEdisperse.cc:405
string _prefix
Parameter name prefix (dispersal, seed_disp, breed_disp, etc.)
Definition: LCEdisperse.h:57
vector< double > getConnectedRates(sex_t SEX, unsigned int local_patch)
Definition: LCEdisperse.cc:1312
bool setReducedMatricesBySex(sex_t SEX, Param &connectivity, Param &rate)
Definition: LCEdisperse.cc:310
void setIndentityDispMatrix(TMatrix *mat)
Definition: LCEdisperse.cc:356
bool checkForwardDispersalMatrix(TMatrix *mat)
Definition: LCEdisperse.cc:415
unsigned int getMigrationIndexGSLdiscrete(gsl_ran_discrete_t *rates)
Definition: LCEdisperse.cc:1294
unsigned int _npatch
Number of patches in the population.
Definition: LCEdisperse.h:64
void setPropaguleTargets()
Definition: LCEdisperse.cc:464
bool setBasicLatticeMatrix(int rows, int cols, double phi_mal, double phi_fem, double disp_mal, double disp_fem)
Definition: LCEdisperse.cc:785
unsigned int getMigrationIndex(vector< double > &rates)
Definition: LCEdisperse.cc:1275
bool isByNumber()
Definition: LCEdisperse.h:114
Definition: LCEdisperse.h:176
virtual bool setParameters()
Definition: LCEdisperse.h:182
virtual LifeCycleEvent * clone()
Definition: LCEdisperse.h:183
virtual ~LCE_SeedDisp()
Definition: LCEdisperse.h:181
LCE_SeedDisp()
Definition: LCEdisperse.cc:1555
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:73
Base class of the ParamUpdater class used to handle the temporal parameter argument values.
Definition: param.h:315
This structure stores one parameter, its definition and its string argument.
Definition: param.h:54
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:50
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 OFFSPRG
Offspring age class flag.
Definition: types.h:50