|
| | LCE_Disperse_EvolDisp () |
| |
| virtual | ~LCE_Disperse_EvolDisp () |
| |
|
| virtual bool | setParameters () |
| |
| virtual void | execute () |
| |
| virtual LifeCycleEvent * | clone () |
| |
| | LCE_Disperse_base () |
| |
| virtual | ~LCE_Disperse_base () |
| | Deallocates the disp matrix. More...
|
| |
| bool | setBaseParameters (string prefix) |
| |
| void | setParamPrefix (string pref) |
| |
| void | addParameters (string prefix, ParamUpdaterBase *updater) |
| |
| void | setIndentityDispMatrix (TMatrix *mat) |
| |
| unsigned int | getMigrationPatchForward (sex_t SEX, unsigned int LocalPatch) |
| |
| unsigned int | getMigrationPatchBackward (sex_t SEX, unsigned int LocalPatch) |
| |
| unsigned int | getMigrationIndex (vector< double > &rates) |
| |
| unsigned int | getMigrationIndexGSLdiscrete (gsl_ran_discrete_t *rates) |
| |
| void | setPropaguleTargets () |
| |
| void | swapPostDisp () |
| |
| void | reset_counters () |
| |
| void | set_isForward (bool val) |
| |
| bool | checkForwardDispersalMatrix (TMatrix *mat) |
| |
| bool | checkBackwardDispersalMatrix (TMatrix *mat) |
| |
| void | allocateDispMatrix (sex_t sex, unsigned int dim) |
| |
| bool | updateDispMatrix () |
| |
| bool | setDispMatrix () |
| |
| bool | setReducedMatricesBySex (sex_t SEX, Param &connectivity, Param &rate) |
| |
| bool | setReducedDispMatrix () |
| | The reduced dispersal matrix contains the indices of the patches to which each patch is connected. More...
|
| |
| bool | setIsland_MigrantPool_Matrix () |
| |
| bool | setIsland_PropagulePool_Matrix () |
| |
| bool | setSteppingStone1DMatrix () |
| |
| bool | setLatticeMatrix () |
| | Sets the dispersal matrices for the Lattice dispersal model. More...
|
| |
| bool | setBasicLatticeMatrix (int rows, int cols, double phi_mal, double phi_fem, double disp_mal, double disp_fem) |
| |
| bool | setLatticeTorrusMatrix (int rows, int cols, double disp_mal, double disp_fem, TMatrix *grid) |
| |
| bool | setLatticeAbsorbingMatrix () |
| |
| bool | setLatticeReflectingMatrix (int rows, int cols, TMatrix *grid) |
| |
| bool | isForward () |
| |
| bool | isByNumber () |
| |
| unsigned int | getDispersalModel () |
| |
| double | getPropaguleProb () |
| |
| unsigned int | getPropaguleTarget (unsigned int home) |
| |
| vector< double > | getConnectedPatches (sex_t SEX, unsigned int local_patch) |
| |
| vector< double > | getConnectedRates (sex_t SEX, unsigned int local_patch) |
| |
| double | getReducedDispersalRate (sex_t SEX, unsigned int row, unsigned int col) |
| |
| unsigned int | getReducedDispersalPatchID (sex_t SEX, unsigned int row, unsigned int col) |
| |
| virtual void | loadFileServices (FileServices *loader) |
| |
| virtual void | loadStatServices (StatServices *loader) |
| |
| virtual bool | resetParameterFromSource (std::string param, SimComponent *cmpt) |
| |
| virtual age_t | removeAgeClass () |
| |
| virtual age_t | addAgeClass () |
| |
| virtual age_t | requiredAgeClass () |
| |
| | LifeCycleEvent (const char *name, const char *trait_link) |
| | Cstor. More...
|
| |
| virtual | ~LifeCycleEvent () |
| |
| virtual void | init (Metapop *popPtr) |
| | Sets the pointer to the current Metapop and the trait link if applicable. More...
|
| |
| virtual bool | attach_trait (string trait) |
| |
| virtual void | set_paramset (std::string name, bool required, SimComponent *owner) |
| |
| virtual void | set_event_name (std::string &name) |
| | Set the name of the event (name of the ParamSet) and add the corresponding parameter to the set. More...
|
| |
| virtual void | set_event_name (const char *name) |
| |
| virtual string & | get_event_name () |
| | Accessor to the LCE's name. More...
|
| |
| virtual int | get_rank () |
| | Accessor to the LCE rank in the life cycle. More...
|
| |
| virtual void | set_pop_ptr (Metapop *popPtr) |
| | Accessors for the population pointer. More...
|
| |
| virtual Metapop * | get_pop_ptr () |
| |
| | SimComponent () |
| |
| virtual | ~SimComponent () |
| |
| virtual void | loadUpdaters (UpdaterServices *loader) |
| | Loads the parameters and component updater onto the updater manager. More...
|
| |
| virtual void | set_paramset (ParamSet *paramset) |
| | Sets the ParamSet member. More...
|
| |
| virtual void | set_paramsetFromCopy (const ParamSet &PSet) |
| | Reset the set of parameters from a another set. More...
|
| |
| virtual ParamSet * | get_paramset () |
| | ParamSet accessor. More...
|
| |
| virtual void | add_parameter (Param *param) |
| | Interface to add a parameter to the set. More...
|
| |
| virtual void | add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd) |
| | Interface to add a parameter to the set. More...
|
| |
| virtual void | add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd, ParamUpdaterBase *updater) |
| | Interface to add a parameter and its updater to the set. More...
|
| |
| virtual Param * | get_parameter (std::string name) |
| | Param getter. More...
|
| |
| virtual double | get_parameter_value (std::string name) |
| | Param value getter. More...
|
| |
| virtual string | get_name () |
| | Returnd the name of the ParamSet, i.e. More...
|
| |
| virtual bool | has_parameter (std::string name) |
| | Param getter. More...
|
| |
Dispersal event with an evolving dispersal rate given by the "disp" trait.
The dispersal models implemented so far are:
-
1: Island Model with migrant pool
-
2: Island Model with propagule pool
-
3: Stepping stone model in 1 dimension (ring population)
| void LCE_Disperse_EvolDisp::evoldisp |
( |
sex_t |
SEX, |
|
|
int |
trait_link, |
|
|
double |
cost |
|
) |
| |
|
private |
1758 Patch *current_patch;
1759 unsigned int AimedPatch;
1760 unsigned int sink_patch =
_npatch;
1762 for(
unsigned int i = 0; i <
_npatch; i++) {
1766 while( current_patch->
size(SEX,
OFFSx) != 0 ) {
void recycle(Individual *ind)
Put an individual in the recycling pool.
Definition: indfactory.h:62
void * getTraitValue(IDX T)
Accessor to the value (phenotype) of a particular trait.
Definition: individual.h:271
unsigned int _npatch
Number of patches in the population.
Definition: LCEdisperse.h:64
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:432
Individual * remove(sex_t SEX, age_idx AGE, unsigned int at)
Removes the individual sitting at the given index in the appropriate container.
Definition: metapop.h:588
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:498
Individual * get(sex_t SEX, age_idx AGE, unsigned int at)
Returns a pointer to the individual sitting at the index passed.
Definition: metapop.h:534
unsigned short nbEmigrant
Definition: metapop.h:454
void move(sex_t SEX, age_idx from, age_idx to, unsigned int at)
Moves an individual from an age class to an other one.
Definition: metapop.h:611
unsigned short nbPhilopat
Definition: metapop.h:454
unsigned short nbImigrant
Definition: metapop.h:454
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:124
@ OFFSx
Definition: types.h:42
@ PDISPx
Definition: types.h:42
References LCE_Disperse_base::_npatch, LifeCycleEvent::_popPtr, Patch::get(), getAimedPatch, Metapop::getPatch(), Individual::getTraitValue(), Patch::move(), Metapop::move(), Patch::nbEmigrant, Patch::nbImigrant, Patch::nbPhilopat, OFFSx, PDISPx, IndFactory::recycle(), Patch::remove(), Patch::size(), and RAND::Uniform().
Referenced by exec_evol2sex(), exec_evolfemale(), and exec_evolmale().
| bool LCE_Disperse_EvolDisp::setParameters |
( |
| ) |
|
|
virtual |
Implements SimComponent.
1601 return error(
"disperse_evoldisp: a dispersal model or a patch connectivity matrix must be specified!\n");
1605 return error(
"dispersal propagule probability is missing!\n");
1644 return error(
"dispersal cost params are not set !\n");
1649 if(
_paramSet->
getArg(
"dispersal_fixed_trait").compare(
"female") == 0) {
1653 }
else if(
_paramSet->
getArg(
"dispersal_fixed_trait").compare(
"male") == 0) {
1658 error(
"wrong argument value for \"dispersal_fixed_trait\"\n");
1686 error(
"\nDispersal model %i not yet implemented with evolving dispersal!\n",
int getTraitIndex(trait_t type)
Gives the index of trait with type.
Definition: indfactory.cc:128
unsigned int Migrate_Island_Propagule(unsigned int home)
Definition: LCEdisperse.cc:1854
unsigned int Migrate_Island(unsigned int home)
Definition: LCEdisperse.cc:1841
void exec_evolmale()
Definition: LCEdisperse.cc:1739
unsigned int Migrate_Lattice(unsigned int home)
Definition: LCEdisperse.cc:1882
unsigned int Migrate_SteppingStone1D(unsigned int home)
Definition: LCEdisperse.cc:1870
void exec_evol2sex()
Definition: LCEdisperse.cc:1747
void exec_evolfemale()
Definition: LCEdisperse.cc:1731
bool setReducedDispMatrix()
The reduced dispersal matrix contains the indices of the patches to which each patch is connected.
Definition: LCEdisperse.cc:1109
double _disp_propagule_prob
Definition: LCEdisperse.h:47
int _disp_model
Definition: LCEdisperse.h:46
bool setLatticeMatrix()
Sets the dispersal matrices for the Lattice dispersal model.
Definition: LCEdisperse.cc:723
string _prefix
Parameter name prefix (dispersal, seed_disp, breed_disp, etc.)
Definition: LCEdisperse.h:57
string getArg(string name)
Accessor to the parameters argument string.
Definition: param.h:300
double getValue(string name)
Accessor the parameters value.
Definition: param.h:302
bool isSet()
Accessor to the status flag.
Definition: param.h:288
void getVariableMatrix(vector< vector< double > > *mat)
Definition: param.cc:460
virtual Param * get_parameter(std::string name)
Param getter.
Definition: simcomponent.h:139
ParamSet * _paramSet
The parameters container.
Definition: simcomponent.h:48
int error(const char *str,...)
Definition: output.cc:77
References LCE_Disperse_base::_disp_model, LCE_Disperse_base::_disp_propagule_prob, _fdisp_trait_link, _fem_cost, _fixed_disp_rate, _mal_cost, _mdisp_trait_link, LCE_Disperse_base::_npatch, SimComponent::_paramSet, LifeCycleEvent::_popPtr, LCE_Disperse_base::_prefix, LCE_Disperse_base::_reducedDispMat, error(), exec, exec_evol2sex(), exec_evolfemale(), exec_evolmale(), FEM, SimComponent::get_parameter(), getAimedPatch, ParamSet::getArg(), LCE_Disperse_base::getDispersalModel(), Metapop::getPatchNbr(), IndFactory::getTraitIndex(), ParamSet::getValue(), Param::getVariableMatrix(), ParamSet::isSet(), Migrate_Island(), Migrate_Island_Propagule(), Migrate_Lattice(), Migrate_SteppingStone1D(), LCE_Disperse_base::setLatticeMatrix(), and LCE_Disperse_base::setReducedDispMatrix().
Referenced by LCE_Disperse_EvolDisp().