34 #include <gsl/gsl_rng.h>
35 #include <gsl/gsl_randist.h>
95 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:50
Dispersal event with constant dispersal rates.
Definition: LCEdisperse.h:147
virtual bool setParameters()
Definition: LCEdisperse.h:166
void Migrate()
Definition: LCEdisperse.cc:1425
LCE_Disperse_ConstDisp()
Definition: LCEdisperse.cc:1345
virtual void execute()
Definition: LCEdisperse.cc:1398
void MigratePatch_AbsorbingBorder(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1524
virtual ~LCE_Disperse_ConstDisp()
Definition: LCEdisperse.h:154
void Migrate_propagule()
Definition: LCEdisperse.cc:1451
void(LCE_Disperse_ConstDisp::* doPatchMigration)(sex_t SEX, unsigned int local_patch)
Definition: LCEdisperse.h:149
virtual LifeCycleEvent * clone()
Definition: LCEdisperse.h:168
void(LCE_Disperse_ConstDisp::* doMigration)(void)
Definition: LCEdisperse.h:148
void MigratePatchByNumber(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1485
void MigratePatch(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1459
Dispersal event with an evolving dispersal rate given by the "disp" trait.
Definition: LCEdisperse.h:196
double _fixed_disp_rate
Definition: LCEdisperse.h:198
unsigned int Migrate_Island_Propagule(unsigned int home)
Definition: LCEdisperse.cc:1854
unsigned int(LCE_Disperse_EvolDisp::* getAimedPatch)(unsigned int)
Definition: LCEdisperse.h:199
unsigned int Migrate_Island(unsigned int home)
Definition: LCEdisperse.cc:1841
virtual ~LCE_Disperse_EvolDisp()
Definition: LCEdisperse.h:218
void exec_evolmale()
Definition: LCEdisperse.cc:1739
double _fem_cost
Definition: LCEdisperse.h:198
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:212
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:224
int _mdisp_trait_link
Definition: LCEdisperse.h:212
void(LCE_Disperse_EvolDisp::* exec)()
Definition: LCEdisperse.h:200
void exec_evolfemale()
Definition: LCEdisperse.cc:1731
double _mal_cost
Definition: LCEdisperse.h:198
The base class of the dispersal LCEs, all events move offspring to the post-dispersal patch container...
Definition: LCEdisperse.h:42
bool setSteppingStone1DMatrix()
Definition: LCEdisperse.cc:634
bool setReducedDispMatrix()
The reduced dispersal matrix contains the indices of the patches to which each patch is connected.
Definition: LCEdisperse.cc:1107
TMatrix * _DispMatrix[2]
The sex-specific dispersal matrices, [0] for males, [1] for females, might be used as connectivity ma...
Definition: LCEdisperse.h:52
virtual ~LCE_Disperse_base()
Deallocates the disp matrix.
Definition: LCEdisperse.cc:51
unsigned int getMigrationPatchBackward(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1254
bool setLatticeTorrusMatrix(int rows, int cols, double disp_mal, double disp_fem, TMatrix *grid)
Definition: LCEdisperse.cc:898
double _disp_propagule_prob
Definition: LCEdisperse.h:45
bool _isByNumber
Definition: LCEdisperse.h:49
unsigned int getReducedDispersalPatchID(sex_t SEX, unsigned int row, unsigned int col)
Definition: LCEdisperse.cc:1331
double _fem_rate
Definition: LCEdisperse.h:47
unsigned int getPropaguleTarget(unsigned int home)
Definition: LCEdisperse.h:115
double getReducedDispersalRate(sex_t SEX, unsigned int row, unsigned int col)
Definition: LCEdisperse.cc:1321
bool setLatticeAbsorbingMatrix()
Definition: LCEdisperse.cc:1049
double getPropaguleProb()
Definition: LCEdisperse.h:114
void reset_counters()
Definition: LCEdisperse.cc:388
virtual void loadFileServices(FileServices *loader)
Definition: LCEdisperse.h:127
bool setLatticeReflectingMatrix(int rows, int cols, TMatrix *grid)
Definition: LCEdisperse.cc:1008
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEdisperse.h:129
vector< vector< double > > _reducedDispMatProba[2]
Matrix containing the probability to migrate to/from the connected patches.
Definition: LCEdisperse.h:67
bool _isForward
Definition: LCEdisperse.h:48
vector< double > getConnectedPatches(sex_t SEX, unsigned int local_patch)
Definition: LCEdisperse.cc:1299
bool setIsland_MigrantPool_Matrix()
Definition: LCEdisperse.cc:547
bool setIsland_PropagulePool_Matrix()
Definition: LCEdisperse.cc:579
int _disp_model
Definition: LCEdisperse.h:44
void setParamPrefix(string pref)
Definition: LCEdisperse.h:77
virtual age_t addAgeClass()
Definition: LCEdisperse.h:131
bool setLatticeMatrix()
Sets the dispersal matrices for the Lattice dispersal model.
Definition: LCEdisperse.cc:721
LCE_Disperse_base()
Definition: LCEdisperse.cc:43
void swapPostDisp()
Definition: LCEdisperse.cc:375
virtual age_t removeAgeClass()
Definition: LCEdisperse.h:130
virtual void loadStatServices(StatServices *loader)
Definition: LCEdisperse.h:128
vector< unsigned int > _PropaguleTargets
Definition: LCEdisperse.h:46
virtual age_t requiredAgeClass()
Definition: LCEdisperse.h:132
bool setDispMatrix()
Definition: LCEdisperse.cc:514
bool setBaseParameters(string prefix)
Definition: LCEdisperse.cc:86
void set_isForward(bool val)
Definition: LCEdisperse.h:83
bool checkBackwardDispersalMatrix(TMatrix *mat)
Definition: LCEdisperse.cc:437
bool isForward()
Definition: LCEdisperse.h:111
void addParameters(string prefix, ParamUpdaterBase *updater)
Definition: LCEdisperse.cc:60
unsigned int getDispersalModel()
Definition: LCEdisperse.h:113
double _mal_rate
Definition: LCEdisperse.h:47
bool updateDispMatrix()
Definition: LCEdisperse.cc:363
vector< vector< double > > _reducedDispMat[2]
Matrix containing the indexes of the patches connected to each patch.
Definition: LCEdisperse.h:65
unsigned int getMigrationPatchForward(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1234
void allocateDispMatrix(sex_t sex, unsigned int dim)
Definition: LCEdisperse.cc:403
string _prefix
Parameter name prefix (dispersal, seed_disp, breed_disp, etc.)
Definition: LCEdisperse.h:55
vector< double > getConnectedRates(sex_t SEX, unsigned int local_patch)
Definition: LCEdisperse.cc:1310
bool setReducedMatricesBySex(sex_t SEX, Param &connectivity, Param &rate)
Definition: LCEdisperse.cc:308
void setIndentityDispMatrix(TMatrix *mat)
Definition: LCEdisperse.cc:354
bool checkForwardDispersalMatrix(TMatrix *mat)
Definition: LCEdisperse.cc:413
unsigned int getMigrationIndexGSLdiscrete(gsl_ran_discrete_t *rates)
Definition: LCEdisperse.cc:1292
unsigned int _npatch
Number of patches in the population.
Definition: LCEdisperse.h:62
void setPropaguleTargets()
Definition: LCEdisperse.cc:462
bool setBasicLatticeMatrix(int rows, int cols, double phi_mal, double phi_fem, double disp_mal, double disp_fem)
Definition: LCEdisperse.cc:783
unsigned int getMigrationIndex(vector< double > &rates)
Definition: LCEdisperse.cc:1273
bool isByNumber()
Definition: LCEdisperse.h:112
Definition: LCEdisperse.h:174
virtual bool setParameters()
Definition: LCEdisperse.h:180
virtual LifeCycleEvent * clone()
Definition: LCEdisperse.h:181
virtual ~LCE_SeedDisp()
Definition: LCEdisperse.h:179
LCE_SeedDisp()
Definition: LCEdisperse.cc:1555
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:71
Base class of the ParamUpdater class used to handle the temporal parameter argument values.
Definition: param.h:323
This structure stores one parameter, its definition and its string argument.
Definition: param.h:52
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:43
The Service class used to manage the StatHandler objects.
Definition: statservices.h:48
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:48
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:34
#define NONE
No age flag.
Definition: types.h:46
unsigned int age_t
Age class flags.
Definition: types.h:44
#define OFFSPRG
Offspring age class flag.
Definition: types.h:48