Nemo  2.3.46
LCE_Breed_Disperse Class Reference

Performs breeding and migration in one, migration rates are backward rates. More...

#include <LCEcomposite.h>

+ Inheritance diagram for LCE_Breed_Disperse:
+ Collaboration diagram for LCE_Breed_Disperse:

Public Member Functions

 LCE_Breed_Disperse ()
 
virtual ~LCE_Breed_Disperse ()
 
void do_breed_disperse ()
 
void do_breed_disperse_propagule ()
 
unsigned int numFemOffspring (Patch *patch)
 
unsigned int numFemOffspring_colonizers (Patch *patch)
 The number of females produced in case a max number of colonizers was specified. More...
 
unsigned int numMalOffspring_notrandom (Patch *patch)
 The number of males produced is always zero when the mating system is not random mating. More...
 
unsigned int numMalOffspring_random (Patch *patch)
 
unsigned int numMalOffspring_random_colonizers (Patch *patch)
 
Growth Functions
unsigned int instantGrowth (Patch *patch, sex_t SEX)
 The number of offspring produced corresponds to the carrying capacity of the patch. More...
 
unsigned int logisticGrowth (Patch *patch, sex_t SEX)
 The number of offspring produced is given by the logistic growth function. More...
 
unsigned int stochasticLogisticGrowth (Patch *patch, sex_t SEX)
 The number of offspring produced is drawn from a Poisson with mean equal to the logistic growth predicate. More...
 
unsigned int conditionalLogisticGrowth (Patch *patch, sex_t SEX)
 The number of offspring produced depends on the adult density. More...
 
unsigned int conditionalStochasticLogisticGrowth (Patch *patch, sex_t SEX)
 The number of offspring produced depends on the adult density, similar to 'conditionalLogisticGrowth' except that this time, the fecundities are drawn from Poisson distributions. More...
 
unsigned int fixedFecundityGrowth (Patch *patch, sex_t SEX)
 The number of offspring produced is equal to the carrying capacity multiplied by the mean fecundity of the focal patch. More...
 
unsigned int stochasticFecundityGrowth (Patch *patch, sex_t SEX)
 The number of offspring produced is a random number drawn from a Poisson distribution with mean equal to the carrying capacity multiplied by the mean fecundity of the focal patch. More...
 
Mating Functions
Individualmate_random (sex_t SEX, Patch *patch, unsigned int LocalPatch)
 
Individualmate_random_hermaphrodite (sex_t SEX, Patch *patch, unsigned int LocalPatch)
 
Individualmate_selfing (sex_t SEX, Patch *patch, unsigned int LocalPatch)
 
Individualmate_full_selfing (sex_t SEX, Patch *patch, unsigned int LocalPatch)
 
Individualmate_cloning (sex_t SEX, Patch *patch, unsigned int LocalPatch)
 
IndividualmakeOffspring (Individual *ind)
 
void breed_disperse (sex_t SEX, Patch *patch, unsigned int LocalPatch, unsigned int size)
 
Individualget_parent (sex_t SEX, sex_t DispSex, Patch *LocalPatch, unsigned int patchNbr)
 
Implementations
virtual bool setParameters ()
 
virtual void execute ()
 
virtual LifeCycleEventclone ()
 
virtual void loadFileServices (FileServices *loader)
 
virtual void loadStatServices (StatServices *loader)
 
virtual age_t removeAgeClass ()
 
virtual age_t addAgeClass ()
 
virtual age_t requiredAgeClass ()
 
- Public Member Functions inherited from LCE_Breed_base
 LCE_Breed_base ()
 
virtual ~LCE_Breed_base ()
 
virtual IndividualgetFatherPtr (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Calls the mating function according to the model chosen using the function pointer, used to get the father from the mother in a patch. More...
 
Individualbreed (Individual *mother, Individual *father, unsigned int LocalPatch)
 Makes a new individual with the right parents. More...
 
Individualbreed_cloning (Individual *mother, Individual *father, unsigned int LocalPatch)
 Makes a new individual by doing a deep copy of the mother (copies the mother's genes into the offspring). More...
 
IndividualmakeOffspring (Individual *ind)
 Last step of the breeding process, does inheritance and mutation of the parents' genes. More...
 
Individualdo_breed (Individual *mother, Individual *father, unsigned int LocalPatch)
 Calls the breeding function unsing its pointer. More...
 
bool checkMatingCondition (Patch *thePatch)
 Checks if any mating will take place in the patch passed as argument. More...
 
bool checkNoSelfing (Patch *thePatch)
 Checks whether mating will take place in the current patch when mating is not selfing or cloning. More...
 
bool checkPolygyny (Patch *thePatch)
 Checks whether mating will take place in the current patch when mating is polygynous. More...
 
bool checkSelfing (Patch *thePatch)
 Checks whether mating will take place in the current patch when mating is selfing. More...
 
bool checkCloning (Patch *thePatch)
 Checks whether mating will take place in the current patch when mating is cloning. More...
 
bool setMatingSystem ()
 
bool setFecundity ()
 
bool setSexRatio ()
 
double getMatingProportion ()
 
double getMeanFecundity (unsigned int patch)
 
int getMatingSystem ()
 
bool doInheritance ()
 
double getPoissonFecundity (double mean)
 
double getFixedFecundity (double mean)
 
double getGaussianFecundity (double mean)
 
double getFecundity (unsigned int patch)
 
double getFecundity (double mean)
 
sex_t getOffsprgSex ()
 
sex_t getOffsprgSexRandom ()
 
sex_t getOffsprgSexFixed ()
 
sex_t getOffsprgSexSelfing ()
 
sex_t getOffsprgSexCloning ()
 
IndividualRandomMating (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns a pointer to a male drawn randomly from a patch. More...
 
IndividualfullPolyginy (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns a pointer to the alpha male of the patch. More...
 
IndividualfullPolyginy_manyMales (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns a pointer to one of the first _mating_males males of the patch. More...
 
IndividualpartialPolyginy (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns a pointer to a male from a patch chosen at random if _mating_proportion != 1, or the first male otherwise. More...
 
IndividualpartialPolyginy_manyMales (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns a pointer to a male from a patch chosen at random if _mating_proportion != 1, or one of the _mating_males first males otherwise. More...
 
IndividualfullMonoginy (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns a pointer to a male with same index as mother (if available) from the focal patch. More...
 
IndividualpartialMonoginy (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns a pointer to a male with same index as mother (if available) from the focal patch. More...
 
IndividualfullSelfing (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns the mother pointer. More...
 
IndividualpartialSelfing (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns the mother pointer or a random female if _mating_proportion != 1. More...
 
Individualrandom_hermaphrodite (Patch *thePatch, Individual *mother, unsigned int motherIndex)
 Returns a random female from the patch, will be the same mother with probability 1/N (Wright-Fisher model). More...
 
- Public Member Functions inherited from LifeCycleEvent
 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 Metapopget_pop_ptr ()
 
- Public Member Functions inherited from SimComponent
 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 ParamSetget_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 Paramget_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...
 
- Public Member Functions inherited from LCE_Disperse_base
 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)
 
unsigned int getMigrationPatchForward (sex_t SEX, unsigned int LocalPatch)
 
unsigned int getMigrationPatchBackward (sex_t SEX, unsigned int LocalPatch)
 
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 setDispMatrix ()
 
bool setReducedDispMatrix ()
 The reduced dispersal matrix contains the indices of the patches to which each patch is connected. More...
 
bool updateDispMatrix ()
 
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 side, double phi_mal, double phi_fem, double disp_mal, double disp_fem)
 
bool setLatticeTorrusMatrix (int side, double disp_mal, double disp_fem, TMatrix *grid)
 
bool setLatticeAbsorbingMatrix ()
 
bool setLatticeReflectingMatrix (int side, TMatrix *grid)
 
unsigned int getDispersalModel ()
 
double getPropaguleProb ()
 
unsigned int getPropaguleTarget (unsigned int home)
 

Protected Attributes

Individual *(LCE_Breed_Disperse::* _make_offspring )(sex_t SEX, Patch *patch, unsigned int LocalPatch)
 
unsigned int(LCE_Breed_Disperse::* _get_numFemOffspring )(Patch *patch)
 
unsigned int(LCE_Breed_Disperse::* _get_numMalOffspring )(Patch *patch)
 
unsigned int(LCE_Breed_Disperse::* _get_patchFecundity )(Patch *patch, sex_t SEX)
 
- Protected Attributes inherited from LCE_Breed_base
TMatrix_mean_fecundity
 
- Protected Attributes inherited from LifeCycleEvent
std::string _event_name
 The param name to be read in the init file. More...
 
Metapop_popPtr
 The ptr to the current Metapop. More...
 
std::string _LCELinkedTraitType
 The name of the linked trait. More...
 
int _LCELinkedTraitIndex
 The index in the individual's trait table of the linked trait. More...
 
- Protected Attributes inherited from SimComponent
ParamSet_paramSet
 The parameters container. More...
 
- Protected Attributes inherited from LCE_Disperse_base
unsigned int _npatch
 

Private Attributes

void(LCE_Breed_Disperse::* _breed_disperse )()
 
int _num_colonizers
 Maximum size of a patch after colonisation. More...
 
sex_t _dispersing_sex
 Which part of the population is dispersing its gametes. More...
 
double * _growthRates
 Patch-specific growth rates. More...
 

Detailed Description

Performs breeding and migration in one, migration rates are backward rates.

Inherits parameters from LCE_Breed_base and LCE_Disperse_base. Population size is constant, There is no demographic stochasticity with this LCE. The number of colonizers of extinct patches can be set differently from the patch carrying capacities.

Constructor & Destructor Documentation

LCE_Breed_Disperse::LCE_Breed_Disperse ( )

References SimComponent::add_parameter(), LCE_Disperse_base::addParameters(), DBL, INT, setParameters(), and STR.

Referenced by clone().

39  : LifeCycleEvent("breed_disperse",""),_breed_disperse(0),
42 {
44 
45  LCE_Disperse_base::addParameters("breed_disperse", updater);
46 
47  add_parameter("breed_disperse_dispersing_sex", STR, false, false, 0, 0, updater);
48  add_parameter("breed_disperse_colonizers", INT,false,false,0,0, updater);
49  add_parameter("breed_disperse_growth_model", INT, false, true, 1, 7, updater);
50  add_parameter("breed_disperse_growth_rate", DBL, false, false, 0, 0, updater);
51 }
Implementation of the ParamUpdaterBase interface.
Definition: param.h:348
LifeCycleEvent(const char *name, const char *trait_link)
Cstor.
Definition: lifecycleevent.h:98
void addParameters(string prefix, ParamUpdaterBase *updater)
Definition: LCEdisperse.cc:62
unsigned int(LCE_Breed_Disperse::* _get_patchFecundity)(Patch *patch, sex_t SEX)
Definition: LCEcomposite.h:62
void(LCE_Breed_Disperse::* _breed_disperse)()
Definition: LCEcomposite.h:47
unsigned int(LCE_Breed_Disperse::* _get_numMalOffspring)(Patch *patch)
Definition: LCEcomposite.h:61
virtual void add_parameter(Param *param)
Interface to add a parameter to the set.
Definition: simcomponent.h:112
Definition: types.h:78
unsigned int(LCE_Breed_Disperse::* _get_numFemOffspring)(Patch *patch)
Definition: LCEcomposite.h:60
Individual *(LCE_Breed_Disperse::* _make_offspring)(sex_t SEX, Patch *patch, unsigned int LocalPatch)
Definition: LCEcomposite.h:59
virtual bool setParameters()
Definition: LCEcomposite.cc:55
double * _growthRates
Patch-specific growth rates.
Definition: LCEcomposite.h:56
Definition: types.h:78
int _num_colonizers
Maximum size of a patch after colonisation.
Definition: LCEcomposite.h:50
Definition: types.h:78
virtual LCE_Breed_Disperse::~LCE_Breed_Disperse ( )
inlinevirtual

References _growthRates.

68 {if(_growthRates) delete [] _growthRates;}
double * _growthRates
Patch-specific growth rates.
Definition: LCEcomposite.h:56

Member Function Documentation

virtual age_t LCE_Breed_Disperse::addAgeClass ( )
inlinevirtual

Reimplemented from LCE_Disperse_base.

Reimplemented in LCE_Breed_Selection_Disperse.

References OFFSPRG.

199 {return OFFSPRG;}
#define OFFSPRG
Offspring age class flag.
Definition: types.h:50
void LCE_Breed_Disperse::breed_disperse ( sex_t  SEX,
Patch patch,
unsigned int  LocalPatch,
unsigned int  size 
)
virtual LifeCycleEvent* LCE_Breed_Disperse::clone ( )
inlinevirtual

Implements LifeCycleEvent.

Reimplemented in LCE_Breed_Selection_Disperse.

References LCE_Breed_Disperse().

195 {return new LCE_Breed_Disperse();}
LCE_Breed_Disperse()
Definition: LCEcomposite.cc:39
unsigned int LCE_Breed_Disperse::conditionalLogisticGrowth ( Patch patch,
sex_t  SEX 
)
inline

The number of offspring produced depends on the adult density.

A minimum number of offspring is produced when less than half of the carrying capacity of adults is present. It is logistic otherwise.

References ADLTx, fixedFecundityGrowth(), Patch::get_K(), logisticGrowth(), and Patch::size().

Referenced by setParameters().

146  {
147  if (patch->size(SEX, ADLTx) < patch->get_K(SEX)/2) {
148  return fixedFecundityGrowth(patch, SEX);
149  } else {
150  return logisticGrowth(patch, SEX);
151  }
152  }
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
Definition: types.h:42
unsigned int get_K()
Definition: metapop.h:470
unsigned int logisticGrowth(Patch *patch, sex_t SEX)
The number of offspring produced is given by the logistic growth function.
Definition: LCEcomposite.h:131
unsigned int fixedFecundityGrowth(Patch *patch, sex_t SEX)
The number of offspring produced is equal to the carrying capacity multiplied by the mean fecundity o...
Definition: LCEcomposite.h:165
unsigned int LCE_Breed_Disperse::conditionalStochasticLogisticGrowth ( Patch patch,
sex_t  SEX 
)
inline

The number of offspring produced depends on the adult density, similar to 'conditionalLogisticGrowth' except that this time, the fecundities are drawn from Poisson distributions.

References ADLTx, Patch::get_K(), Patch::size(), stochasticFecundityGrowth(), and stochasticLogisticGrowth().

Referenced by setParameters().

156  {
157  if (patch->size(SEX, ADLTx) < patch->get_K(SEX)/2) {
158  return stochasticFecundityGrowth(patch, SEX);
159  } else {
160  return stochasticLogisticGrowth(patch, SEX);
161  }
162  }
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
Definition: types.h:42
unsigned int get_K()
Definition: metapop.h:470
unsigned int stochasticLogisticGrowth(Patch *patch, sex_t SEX)
The number of offspring produced is drawn from a Poisson with mean equal to the logistic growth predi...
Definition: LCEcomposite.h:139
unsigned int stochasticFecundityGrowth(Patch *patch, sex_t SEX)
The number of offspring produced is a random number drawn from a Poisson distribution with mean equal...
Definition: LCEcomposite.h:171
void LCE_Breed_Disperse::do_breed_disperse ( )

References _get_numFemOffspring, _get_numMalOffspring, _make_offspring, LifeCycleEvent::_popPtr, Patch::add(), FEM, Patch::flush(), Metapop::getPatch(), Metapop::getPatchNbr(), LCE_Breed_base::makeOffspring(), MAL, OFFSx, and Patch::size().

Referenced by do_breed_disperse_propagule(), and setParameters().

234 {
235  Patch* patch;
236  unsigned int nfem, nmal;
237 
238  for(unsigned int i = 0; i < _popPtr->getPatchNbr(); i++) {
239 
240  patch = _popPtr->getPatch(i);
241 
242  if(patch->size(OFFSx) != 0) patch->flush(OFFSx, _popPtr);
243 
244  nfem = (this->* _get_numFemOffspring)(patch);
245  nmal = (this->* _get_numMalOffspring)(patch);
246 
247  for(unsigned int j = 0; j < nfem; j++)
248  patch->add(FEM, OFFSx,
249  LCE_Breed_base::makeOffspring( (this->*_make_offspring)(FEM, patch, i) )
250  );
251 
252  for(unsigned int j = 0; j < nmal; j++)
253  patch->add(MAL, OFFSx,
254  LCE_Breed_base::makeOffspring( (this->*_make_offspring)(MAL, patch, i) )
255  );
256  }
257 }
void flush(sex_t SEX, age_idx AGE, Metapop *pop)
Removes all individual pointers of the appropriate sex and age class and flush them into the recyclin...
Definition: metapop.h:634
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
unsigned int(LCE_Breed_Disperse::* _get_numMalOffspring)(Patch *patch)
Definition: LCEcomposite.h:61
Second class in the metapopulation design structure, between the Metapop and Individual classes...
Definition: metapop.h:421
Patch * getPatch(unsigned int i)
Patch accessor, return the ith+1 patch in the metapop.
Definition: metapop.h:251
unsigned int getPatchNbr()
Definition: metapop.h:270
unsigned int(LCE_Breed_Disperse::* _get_numFemOffspring)(Patch *patch)
Definition: LCEcomposite.h:60
Individual *(LCE_Breed_Disperse::* _make_offspring)(sex_t SEX, Patch *patch, unsigned int LocalPatch)
Definition: LCEcomposite.h:59
Definition: types.h:37
Definition: types.h:42
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
void add(sex_t SEX, age_idx AGE, Individual *ind)
Adds an individual to the appropriate container, increments its size, eventually resizing it...
Definition: metapop.h:540
Definition: types.h:37
Individual * makeOffspring(Individual *ind)
Last step of the breeding process, does inheritance and mutation of the parents' genes.
Definition: LCEbreed.cc:362
void LCE_Breed_Disperse::do_breed_disperse_propagule ( )

References do_breed_disperse(), and LCE_Disperse_base::setIsland_PropagulePool_Matrix().

Referenced by setParameters().

262 {
265 }
void do_breed_disperse()
Definition: LCEcomposite.cc:233
bool setIsland_PropagulePool_Matrix()
Definition: LCEdisperse.cc:469
void LCE_Breed_Disperse::execute ( )
virtual

Implements LifeCycleEvent.

Reimplemented in LCE_Breed_Selection_Disperse.

References _breed_disperse, LCE_Disperse_base::_npatch, LifeCycleEvent::_popPtr, ADULTS, fatal(), Metapop::getPatch(), Metapop::getPatchNbr(), message(), Patch::nbEmigrant, Patch::nbImigrant, Patch::nbPhilopat, OFFSPRG, LCE_Disperse_base::reset_counters(), Metapop::size(), and LCE_Disperse_base::updateDispMatrix().

205 {
206 #ifdef _DEBUG_
207  message("LCE_Breed_Disperse::execute (Patch nb: %i offsprg nb: %i adlt nb: %i "
209 #endif
210 
211  if(_npatch != _popPtr->getPatchNbr()) {
213  if(!updateDispMatrix()) fatal("bailing out\n");
214  }
215 
217 
218  (this->*_breed_disperse)();
219 
220 #ifdef _DEBUG_
221  unsigned int a = 0, b = 0, c = 0;
222  for(unsigned int i = 0; i < _popPtr->getPatchNbr(); i++){
223  a += _popPtr->getPatch(i)->nbEmigrant;
224  b += _popPtr->getPatch(i)->nbImigrant;
225  c += _popPtr->getPatch(i)->nbPhilopat;
226  }
227  message("immigrate: %f, emigrants: %i, imigrants: %i)\n",(double)b/(b+c), a, b);
228 #endif
229 }
void message(const char *message,...)
Definition: output.cc:40
#define ADULTS
Adults age class flag (breeders).
Definition: types.h:54
void(LCE_Breed_Disperse::* _breed_disperse)()
Definition: LCEcomposite.h:47
void reset_counters()
Definition: LCEdisperse.cc:290
void fatal(const char *str,...)
Definition: output.cc:90
bool updateDispMatrix()
Definition: LCEdisperse.cc:265
Patch * getPatch(unsigned int i)
Patch accessor, return the ith+1 patch in the metapop.
Definition: metapop.h:251
unsigned short nbImigrant
Definition: metapop.h:444
unsigned int _npatch
Definition: LCEdisperse.h:60
unsigned int getPatchNbr()
Definition: metapop.h:270
#define OFFSPRG
Offspring age class flag.
Definition: types.h:50
unsigned int size()
Get the total number of individuals present in the population, all sex and age classes together...
Definition: metapop.h:302
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
unsigned short nbPhilopat
Definition: metapop.h:444
unsigned short nbEmigrant
Definition: metapop.h:444
unsigned int LCE_Breed_Disperse::fixedFecundityGrowth ( Patch patch,
sex_t  SEX 
)
inline

The number of offspring produced is equal to the carrying capacity multiplied by the mean fecundity of the focal patch.

References Patch::get_K(), Patch::getID(), and LCE_Breed_base::getMeanFecundity().

Referenced by conditionalLogisticGrowth(), and setParameters().

166  {
167  return patch->get_K(SEX)*LCE_Breed_base::getMeanFecundity(patch->getID());
168  }
unsigned int getID()
Definition: metapop.h:469
double getMeanFecundity(unsigned int patch)
Definition: LCEbreed.h:94
unsigned int get_K()
Definition: metapop.h:470
Individual * LCE_Breed_Disperse::get_parent ( sex_t  SEX,
sex_t  DispSex,
Patch LocalPatch,
unsigned int  patchNbr 
)

References LifeCycleEvent::_popPtr, ADLTx, Patch::get(), LCE_Disperse_base::getMigrationPatchBackward(), Metapop::getPatchPtr(), Patch::nbEmigrant, Patch::nbImigrant, Patch::nbKolonisers, Patch::nbPhilopat, Patch::size(), and RAND::Uniform().

Referenced by mate_cloning(), mate_full_selfing(), mate_random(), mate_random_hermaphrodite(), and mate_selfing().

330 {
331  unsigned int SourcePatch = 0;
332  Patch* src_patch;
333 
334  //this algorithm does not check for the availability of migrants in connected patches
335  //it may thus hang if all connected patches are empty
336  //one work around is to impose a maximum number of trials before it abandons the search
337 
338  do {
339 
340  SourcePatch = LCE_Disperse_base::getMigrationPatchBackward(DispSex, LocalPatch);
341  src_patch = _popPtr->getPatchPtr(SourcePatch);
342 
343 
344  } while (src_patch->size( SEX, ADLTx ) == 0); //redraw if source patch is empty
345 
346  //set migrant counters for the stats
347  if(LocalPatch != SourcePatch) {
348  src_patch->nbEmigrant++;
349 
350  if( local_patch->size(ADLTx) == 0 )
351  local_patch->nbKolonisers++;
352  else
353  local_patch->nbImigrant++;
354 
355  } else
356  src_patch->nbPhilopat++;
357 
358  //return a pointer to an individual randomly choosen from the source patch:
359  return src_patch->get(SEX, ADLTx, RAND::Uniform( src_patch->size( SEX, ADLTx ) ) );
360 }
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
Second class in the metapopulation design structure, between the Metapop and Individual classes...
Definition: metapop.h:421
Definition: types.h:42
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:101
Patch * getPatchPtr(unsigned int patch)
A secure version of the getPatch() method.
Definition: metapop.h:254
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:523
unsigned int getMigrationPatchBackward(sex_t SEX, unsigned int LocalPatch)
Definition: LCEdisperse.cc:1121
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
unsigned short nbPhilopat
Definition: metapop.h:444
unsigned short nbEmigrant
Definition: metapop.h:444
unsigned int LCE_Breed_Disperse::instantGrowth ( Patch patch,
sex_t  SEX 
)
inline

The number of offspring produced corresponds to the carrying capacity of the patch.

References Patch::get_K().

Referenced by setParameters().

127  {
128  return patch->get_K(SEX);
129  }
unsigned int get_K()
Definition: metapop.h:470
virtual void LCE_Breed_Disperse::loadFileServices ( FileServices loader)
inlinevirtual

Reimplemented from LCE_Disperse_base.

Reimplemented in LCE_Breed_Selection_Disperse.

196 {}
virtual void LCE_Breed_Disperse::loadStatServices ( StatServices loader)
inlinevirtual

Reimplemented from LCE_Disperse_base.

Reimplemented in LCE_Breed_Selection_Disperse.

197 {}
unsigned int LCE_Breed_Disperse::logisticGrowth ( Patch patch,
sex_t  SEX 
)
inline

The number of offspring produced is given by the logistic growth function.

References ADLTx, Patch::get_K(), Patch::getID(), and Patch::size().

Referenced by conditionalLogisticGrowth(), setParameters(), and stochasticLogisticGrowth().

132  {
133  double K = (double)patch->get_K(SEX);
134  double r = _growthRates[ patch->getID() ];
135  double N = (double)patch->size(ADLTx);
136  return (unsigned int)ceil(N + r*N*((K-N)/K));
137  }
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
unsigned int getID()
Definition: metapop.h:469
Definition: types.h:42
unsigned int get_K()
Definition: metapop.h:470
double * _growthRates
Patch-specific growth rates.
Definition: LCEcomposite.h:56
Individual* LCE_Breed_Disperse::makeOffspring ( Individual ind)
Individual * LCE_Breed_Disperse::mate_cloning ( sex_t  SEX,
Patch patch,
unsigned int  LocalPatch 
)

References LCE_Breed_base::breed_cloning(), FEM, and get_parent().

Referenced by setParameters().

322 {
323  return LCE_Breed_base::breed_cloning(get_parent(FEM, FEM, patch, LocalPatch), NULL, LocalPatch);
324 }
Individual * breed_cloning(Individual *mother, Individual *father, unsigned int LocalPatch)
Makes a new individual by doing a deep copy of the mother (copies the mother's genes into the offspri...
Definition: LCEbreed.cc:381
Individual * get_parent(sex_t SEX, sex_t DispSex, Patch *LocalPatch, unsigned int patchNbr)
Definition: LCEcomposite.cc:328
Definition: types.h:37
Individual * LCE_Breed_Disperse::mate_full_selfing ( sex_t  SEX,
Patch patch,
unsigned int  LocalPatch 
)

References LifeCycleEvent::_popPtr, FEM, get_parent(), and IndFactory::makeNewIndividual().

Referenced by setParameters().

313 {
314  Individual *mom = get_parent(FEM, FEM, patch, LocalPatch);
315 
316  return _popPtr->makeNewIndividual(mom, mom, FEM, LocalPatch);
317 }
Individual * makeNewIndividual(Individual *mother, Individual *father, sex_t sex, unsigned short homepatch)
Creates an individual with pointers to parents, sex and home ID set but no genetic data...
Definition: indfactory.cc:152
Individual * get_parent(sex_t SEX, sex_t DispSex, Patch *LocalPatch, unsigned int patchNbr)
Definition: LCEcomposite.cc:328
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
This class contains traits along with other individual information (sex, pedigree, etc. ).
Definition: individual.h:49
Definition: types.h:37
Individual * LCE_Breed_Disperse::mate_random ( sex_t  SEX,
Patch patch,
unsigned int  LocalPatch 
)

References LifeCycleEvent::_popPtr, FEM, get_parent(), IndFactory::makeNewIndividual(), and MAL.

Referenced by setParameters().

270 {
271  return _popPtr->makeNewIndividual(get_parent(FEM, FEM, patch, LocalPatch),
272  get_parent(MAL, MAL, patch, LocalPatch),
273  SEX, LocalPatch);
274 }
Individual * makeNewIndividual(Individual *mother, Individual *father, sex_t sex, unsigned short homepatch)
Creates an individual with pointers to parents, sex and home ID set but no genetic data...
Definition: indfactory.cc:152
Definition: types.h:37
Individual * get_parent(sex_t SEX, sex_t DispSex, Patch *LocalPatch, unsigned int patchNbr)
Definition: LCEcomposite.cc:328
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
Definition: types.h:37
Individual * LCE_Breed_Disperse::mate_random_hermaphrodite ( sex_t  SEX,
Patch patch,
unsigned int  LocalPatch 
)

References _dispersing_sex, LifeCycleEvent::_popPtr, FEM, get_parent(), and IndFactory::makeNewIndividual().

Referenced by setParameters().

280 {
281  return _popPtr->makeNewIndividual(get_parent(FEM, FEM, patch, LocalPatch),
282  get_parent(FEM, _dispersing_sex, patch, LocalPatch),
283  FEM, LocalPatch);
284 }
Individual * makeNewIndividual(Individual *mother, Individual *father, sex_t sex, unsigned short homepatch)
Creates an individual with pointers to parents, sex and home ID set but no genetic data...
Definition: indfactory.cc:152
Individual * get_parent(sex_t SEX, sex_t DispSex, Patch *LocalPatch, unsigned int patchNbr)
Definition: LCEcomposite.cc:328
sex_t _dispersing_sex
Which part of the population is dispersing its gametes.
Definition: LCEcomposite.h:53
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
Definition: types.h:37
Individual * LCE_Breed_Disperse::mate_selfing ( sex_t  SEX,
Patch patch,
unsigned int  LocalPatch 
)

References _dispersing_sex, LifeCycleEvent::_popPtr, ADLTx, FEM, get_parent(), LCE_Breed_base::getMatingProportion(), Metapop::getPatchNbr(), IndFactory::makeNewIndividual(), Patch::size(), and RAND::Uniform().

Referenced by setParameters().

289 {
290  Individual *mom, *dad;
291  // cout << "--- choosing mum in patch "<<LocalPatch<<" ("<<patch->size(FEM, ADLTx)<<")\n";
292  mom = get_parent(FEM, FEM, patch, LocalPatch);
293 
294  // cout << "--- choosing dad \n";
295 
296  if( RAND::Uniform() > this->getMatingProportion() ) {
297  //random mating
298  do{
299  dad = get_parent(FEM, _dispersing_sex, patch, LocalPatch);
300  }while(dad == mom && _popPtr->getPatchNbr() != 1 && patch->size(FEM,ADLTx) != 1);
301  } else
302  dad = mom;
303 
304  // cout << "--- make offspring by crossing "<<mom->getID()<<" with "<<dad->getID()<<endl;
305 
306 
307  return _popPtr->makeNewIndividual(mom, dad, FEM, LocalPatch);
308 }
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
Individual * makeNewIndividual(Individual *mother, Individual *father, sex_t sex, unsigned short homepatch)
Creates an individual with pointers to parents, sex and home ID set but no genetic data...
Definition: indfactory.cc:152
unsigned int getPatchNbr()
Definition: metapop.h:270
Definition: types.h:42
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:101
double getMatingProportion()
Definition: LCEbreed.h:93
Individual * get_parent(sex_t SEX, sex_t DispSex, Patch *LocalPatch, unsigned int patchNbr)
Definition: LCEcomposite.cc:328
sex_t _dispersing_sex
Which part of the population is dispersing its gametes.
Definition: LCEcomposite.h:53
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
This class contains traits along with other individual information (sex, pedigree, etc. ).
Definition: individual.h:49
Definition: types.h:37
unsigned int LCE_Breed_Disperse::numFemOffspring ( Patch patch)
inline

References _get_patchFecundity, ADLTx, FEM, and Patch::size().

Referenced by setParameters().

75  {
76  if (patch->size(FEM, ADLTx) == 0 && _dispersing_sex != FEM)//to avoid choosing a local female when there is none
77  return 0;
78  else
79  return (this->*_get_patchFecundity)(patch, FEM);
80  }
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
unsigned int(LCE_Breed_Disperse::* _get_patchFecundity)(Patch *patch, sex_t SEX)
Definition: LCEcomposite.h:62
Definition: types.h:42
sex_t _dispersing_sex
Which part of the population is dispersing its gametes.
Definition: LCEcomposite.h:53
Definition: types.h:37
unsigned int LCE_Breed_Disperse::numFemOffspring_colonizers ( Patch patch)
inline

The number of females produced in case a max number of colonizers was specified.

References _get_patchFecundity, _num_colonizers, FEM, and Patch::get_isExtinct().

Referenced by setParameters().

84  {
85  if(patch->get_isExtinct()) {
86  //check if only one sex sends gametes around, capturing the case of pollen dispersal
87  if(_dispersing_sex != FEM)
88  return 0;
89  else
90  return _num_colonizers;
91  } else
92  return (this->*_get_patchFecundity)(patch, FEM);
93  }
unsigned int(LCE_Breed_Disperse::* _get_patchFecundity)(Patch *patch, sex_t SEX)
Definition: LCEcomposite.h:62
bool get_isExtinct()
Definition: metapop.h:475
sex_t _dispersing_sex
Which part of the population is dispersing its gametes.
Definition: LCEcomposite.h:53
int _num_colonizers
Maximum size of a patch after colonisation.
Definition: LCEcomposite.h:50
Definition: types.h:37
unsigned int LCE_Breed_Disperse::numMalOffspring_notrandom ( Patch patch)
inline

The number of males produced is always zero when the mating system is not random mating.

Referenced by setParameters().

97  {
98  return 0;
99  }
unsigned int LCE_Breed_Disperse::numMalOffspring_random ( Patch patch)
inline

References _get_patchFecundity, ADLTx, FEM, MAL, and Patch::size().

Referenced by setParameters().

102  { //return 0 if only males gametes migrate and there is no females in the patch
103  //to avoid choosing a local female when there is none
104  //(we assume it doesn't make sense to have only female gametes migrating)
105  if (patch->size(FEM, ADLTx) == 0 && _dispersing_sex != FEM)
106  return 0;
107  else
108  return (this->*_get_patchFecundity)(patch, MAL);
109  }
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:487
unsigned int(LCE_Breed_Disperse::* _get_patchFecundity)(Patch *patch, sex_t SEX)
Definition: LCEcomposite.h:62
Definition: types.h:42
Definition: types.h:37
sex_t _dispersing_sex
Which part of the population is dispersing its gametes.
Definition: LCEcomposite.h:53
Definition: types.h:37
unsigned int LCE_Breed_Disperse::numMalOffspring_random_colonizers ( Patch patch)
inline

References _get_patchFecundity, _num_colonizers, FEM, Patch::get_isExtinct(), and MAL.

Referenced by setParameters().

112  {
113  if(patch->get_isExtinct()) {
114  //check if only one sex sends gametes around, capturing the case of pollen dispersal
115  if(_dispersing_sex != FEM)
116  return 0;
117  else
118  return _num_colonizers;
119  } else
120  return (this->*_get_patchFecundity)(patch, MAL);
121  }
unsigned int(LCE_Breed_Disperse::* _get_patchFecundity)(Patch *patch, sex_t SEX)
Definition: LCEcomposite.h:62
bool get_isExtinct()
Definition: metapop.h:475
Definition: types.h:37
sex_t _dispersing_sex
Which part of the population is dispersing its gametes.
Definition: LCEcomposite.h:53
int _num_colonizers
Maximum size of a patch after colonisation.
Definition: LCEcomposite.h:50
Definition: types.h:37
virtual age_t LCE_Breed_Disperse::removeAgeClass ( )
inlinevirtual

Reimplemented from LCE_Disperse_base.

Reimplemented in LCE_Breed_Selection_Disperse.

References NONE.

198 {return NONE;}
#define NONE
No age flag.
Definition: types.h:48
virtual age_t LCE_Breed_Disperse::requiredAgeClass ( )
inlinevirtual

Reimplemented from LCE_Disperse_base.

Reimplemented in LCE_Breed_Selection_Disperse.

References ADULTS.

200 {return ADULTS;}
#define ADULTS
Adults age class flag (breeders).
Definition: types.h:54
bool LCE_Breed_Disperse::setParameters ( )
virtual

Reimplemented from LCE_Breed_base.

Reimplemented in LCE_Breed_Selection_Disperse.

References _breed_disperse, _dispersing_sex, _get_numFemOffspring, _get_numMalOffspring, _get_patchFecundity, _growthRates, _make_offspring, _num_colonizers, SimComponent::_paramSet, LifeCycleEvent::_popPtr, conditionalLogisticGrowth(), conditionalStochasticLogisticGrowth(), do_breed_disperse(), do_breed_disperse_propagule(), error(), FEM, fixedFecundityGrowth(), TMatrix::get(), SimComponent::get_parameter(), SimComponent::get_parameter_value(), Param::getArg(), LCE_Disperse_base::getDispersalModel(), LCE_Breed_base::getMatingProportion(), LCE_Breed_base::getMatingSystem(), ParamSet::getMatrix(), TMatrix::getNbCols(), Metapop::getPatchNbr(), instantGrowth(), ParamSet::isMatrix(), Param::isSet(), ParamSet::isSet(), logisticGrowth(), MAL, mate_cloning(), mate_full_selfing(), mate_random(), mate_random_hermaphrodite(), mate_selfing(), numFemOffspring(), numFemOffspring_colonizers(), numMalOffspring_notrandom(), numMalOffspring_random(), numMalOffspring_random_colonizers(), LCE_Disperse_base::set_isForward(), LCE_Disperse_base::setBaseParameters(), LCE_Breed_base::setParameters(), stochasticFecundityGrowth(), and stochasticLogisticGrowth().

Referenced by LCE_Breed_Disperse(), and LCE_Breed_Selection_Disperse::setParameters().

56 {
57  if(!LCE_Breed_base::setParameters()) return false;
58 
60 
61  if(!LCE_Disperse_base::setBaseParameters("breed_disperse")) return false;
62 
63  _num_colonizers = (int)get_parameter_value("breed_disperse_colonizers");
64 
65  //some default settings, reset below depending on mating system
70 
71  if(get_parameter("breed_disperse_dispersing_sex")->isSet()) {
72 
73  if (get_parameter("breed_disperse_dispersing_sex")->getArg() == "female") {
75  } else if (get_parameter("breed_disperse_dispersing_sex")->getArg() == "male") {
77  } else {
78  error("the \"breed_disperse_dispersing_sex\" parameter only takes \"female\" or \"male\" as argument\n");
79  }
80 
81  } else {
83  }
84 
85  //check mating system:
86  unsigned int model = this->getMatingSystem();
87 
88  if(model == 2 || model == 3) {
89 
90  return error("Polygyny and Monogamy are not implemented within the breed_disperse LCE.\n");
91 
92  } else if(model == 1) { //promiscuity/random mating
93 
95 
99 
100  } else if(model == 4) { //selfing
101 
102  if(this->getMatingProportion() != 1)
104  else
106 
107  } else if(model == 5) { //cloning
108 
110 
111  } else if(model == 6) { //random mating among hermaphrodites (selfing = 1/N)
112 
114 
115  }
116 
117  //check dispersal model:
118  model = this->getDispersalModel();
119 
120  if(model == 2) //propagule-pool island model
122  else
124 
125  //growth model
126  if(_paramSet->isSet("breed_disperse_growth_model"))
127  model = get_parameter_value("breed_disperse_growth_model");
128  else
129  model = 1;
130 
131  switch (model) {
132  case 1:
134  break;
135  case 2:
137  break;
138  case 3:
140  break;
141  case 4:
143  break;
144  case 5:
146  break;
147  case 6:
149  break;
150  case 7:
152  break;
153  default:
155  break;
156  }
157 
158  //growth rate
159  if (model > 1 && model < 6) {
160 
161  if(!_paramSet->isSet("breed_disperse_growth_rate")) {
162 
163  return error("parameter \"breed_disperse_growth_rate\" needs to be set\n");
164 
165  }
166 
167  if(_growthRates) delete [] _growthRates;
168  _growthRates = new double [ _popPtr->getPatchNbr() ];
169 
170  if(_paramSet->isMatrix("breed_disperse_growth_rate")) {
171 
172  TMatrix tmp;
173 
174  _paramSet->getMatrix("breed_disperse_growth_rate", &tmp);
175 
176  if(tmp.getNbCols() != _popPtr->getPatchNbr()){
177  error("matrix argument to \"breed_disperse_growth_rate\" has wrong number of elements,\
178  must equal the number of patches.\n");
179  return false;
180  }
181 
182  for (unsigned int i = 0; i < _popPtr->getPatchNbr(); i++) {
183  _growthRates[i] = tmp.get(0, i);
184  }
185 
186 
187  } else { //not a matrix
188 
189  _growthRates[0] = get_parameter_value("breed_disperse_growth_rate");
190 
191  for (unsigned int i = 1; i < _popPtr->getPatchNbr(); i++) {
192  _growthRates[i] = _growthRates[0];
193  }
194  }
195 
196 
197  }
198 
199  return true;
200 }
unsigned int getDispersalModel()
Definition: LCEdisperse.h:98
Individual * mate_full_selfing(sex_t SEX, Patch *patch, unsigned int LocalPatch)
Definition: LCEcomposite.cc:312
unsigned int numMalOffspring_random(Patch *patch)
Definition: LCEcomposite.h:101
void do_breed_disperse()
Definition: LCEcomposite.cc:233
virtual double get_parameter_value(std::string name)
Param value getter.
Definition: simcomponent.h:143
unsigned int getNbCols()
Gives the number of columns.
Definition: tmatrix.h:142
unsigned int conditionalLogisticGrowth(Patch *patch, sex_t SEX)
The number of offspring produced depends on the adult density.
Definition: LCEcomposite.h:145
unsigned int(LCE_Breed_Disperse::* _get_patchFecundity)(Patch *patch, sex_t SEX)
Definition: LCEcomposite.h:62
void(LCE_Breed_Disperse::* _breed_disperse)()
Definition: LCEcomposite.h:47
bool setBaseParameters(string prefix)
Definition: LCEdisperse.cc:81
unsigned int numFemOffspring_colonizers(Patch *patch)
The number of females produced in case a max number of colonizers was specified.
Definition: LCEcomposite.h:83
unsigned int instantGrowth(Patch *patch, sex_t SEX)
The number of offspring produced corresponds to the carrying capacity of the patch.
Definition: LCEcomposite.h:126
unsigned int(LCE_Breed_Disperse::* _get_numMalOffspring)(Patch *patch)
Definition: LCEcomposite.h:61
double get(unsigned int i, unsigned int j)
Accessor to element at row i and column j.
Definition: tmatrix.h:120
void getMatrix(string name, TMatrix *mat)
Accessor to the parameters matrix.
Definition: param.h:289
void set_isForward(bool val)
Definition: LCEdisperse.h:75
virtual bool setParameters()
Definition: LCEbreed.cc:71
unsigned int getPatchNbr()
Definition: metapop.h:270
int error(const char *str,...)
Definition: output.cc:73
Individual * mate_cloning(sex_t SEX, Patch *patch, unsigned int LocalPatch)
Definition: LCEcomposite.cc:321
unsigned int(LCE_Breed_Disperse::* _get_numFemOffspring)(Patch *patch)
Definition: LCEcomposite.h:60
Individual * mate_random(sex_t SEX, Patch *patch, unsigned int LocalPatch)
Definition: LCEcomposite.cc:269
void do_breed_disperse_propagule()
Definition: LCEcomposite.cc:261
Individual *(LCE_Breed_Disperse::* _make_offspring)(sex_t SEX, Patch *patch, unsigned int LocalPatch)
Definition: LCEcomposite.h:59
bool isMatrix(string name)
Check if the parameter "name" is of matrix type.
Definition: param.h:281
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:49
unsigned int conditionalStochasticLogisticGrowth(Patch *patch, sex_t SEX)
The number of offspring produced depends on the adult density, similar to 'conditionalLogisticGrowth'...
Definition: LCEcomposite.h:155
double getMatingProportion()
Definition: LCEbreed.h:93
double * _growthRates
Patch-specific growth rates.
Definition: LCEcomposite.h:56
unsigned int numFemOffspring(Patch *patch)
Definition: LCEcomposite.h:74
unsigned int stochasticLogisticGrowth(Patch *patch, sex_t SEX)
The number of offspring produced is drawn from a Poisson with mean equal to the logistic growth predi...
Definition: LCEcomposite.h:139
ParamSet * _paramSet
The parameters container.
Definition: simcomponent.h:48
Individual * mate_random_hermaphrodite(sex_t SEX, Patch *patch, unsigned int LocalPatch)
Definition: LCEcomposite.cc:278
Definition: types.h:37
string getArg()
Definition: param.h:136
virtual Param * get_parameter(std::string name)
Param getter.
Definition: simcomponent.h:139
sex_t _dispersing_sex
Which part of the population is dispersing its gametes.
Definition: LCEcomposite.h:53
unsigned int logisticGrowth(Patch *patch, sex_t SEX)
The number of offspring produced is given by the logistic growth function.
Definition: LCEcomposite.h:131
int _num_colonizers
Maximum size of a patch after colonisation.
Definition: LCEcomposite.h:50
unsigned int numMalOffspring_notrandom(Patch *patch)
The number of males produced is always zero when the mating system is not random mating.
Definition: LCEcomposite.h:96
bool isSet()
Accessor to the status flag.
Definition: param.h:273
unsigned int numMalOffspring_random_colonizers(Patch *patch)
Definition: LCEcomposite.h:111
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
int getMatingSystem()
Definition: LCEbreed.h:95
Definition: types.h:37
unsigned int fixedFecundityGrowth(Patch *patch, sex_t SEX)
The number of offspring produced is equal to the carrying capacity multiplied by the mean fecundity o...
Definition: LCEcomposite.h:165
Individual * mate_selfing(sex_t SEX, Patch *patch, unsigned int LocalPatch)
Definition: LCEcomposite.cc:288
unsigned int stochasticFecundityGrowth(Patch *patch, sex_t SEX)
The number of offspring produced is a random number drawn from a Poisson distribution with mean equal...
Definition: LCEcomposite.h:171
bool isSet()
Definition: param.h:138
unsigned int LCE_Breed_Disperse::stochasticFecundityGrowth ( Patch patch,
sex_t  SEX 
)
inline

The number of offspring produced is a random number drawn from a Poisson distribution with mean equal to the carrying capacity multiplied by the mean fecundity of the focal patch.

References Patch::get_K(), Patch::getID(), LCE_Breed_base::getMeanFecundity(), and RAND::Uniform().

Referenced by conditionalStochasticLogisticGrowth(), and setParameters().

172  {
173  return RAND::Uniform(patch->get_K(SEX)*LCE_Breed_base::getMeanFecundity(patch->getID()));
174  }
unsigned int getID()
Definition: metapop.h:469
double getMeanFecundity(unsigned int patch)
Definition: LCEbreed.h:94
unsigned int get_K()
Definition: metapop.h:470
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:101
unsigned int LCE_Breed_Disperse::stochasticLogisticGrowth ( Patch patch,
sex_t  SEX 
)
inline

The number of offspring produced is drawn from a Poisson with mean equal to the logistic growth predicate.

References logisticGrowth(), and RAND::Poisson().

Referenced by conditionalStochasticLogisticGrowth(), and setParameters().

140  {
141  return (unsigned int)RAND::Poisson((double)logisticGrowth(patch, SEX));
142  }
static double Poisson(double mean)
From the Numerical Recieps.
Definition: Uniform.h:196
unsigned int logisticGrowth(Patch *patch, sex_t SEX)
The number of offspring produced is given by the logistic growth function.
Definition: LCEcomposite.h:131

Member Data Documentation

void(LCE_Breed_Disperse::* LCE_Breed_Disperse::_breed_disperse)()
private

Referenced by execute(), and setParameters().

sex_t LCE_Breed_Disperse::_dispersing_sex
private

Which part of the population is dispersing its gametes.

Referenced by mate_random_hermaphrodite(), mate_selfing(), and setParameters().

unsigned int(LCE_Breed_Disperse::* LCE_Breed_Disperse::_get_numFemOffspring)(Patch *patch)
protected
unsigned int(LCE_Breed_Disperse::* LCE_Breed_Disperse::_get_numMalOffspring)(Patch *patch)
protected
unsigned int(LCE_Breed_Disperse::* LCE_Breed_Disperse::_get_patchFecundity)(Patch *patch, sex_t SEX)
protected
double* LCE_Breed_Disperse::_growthRates
private

Patch-specific growth rates.

Referenced by setParameters(), and ~LCE_Breed_Disperse().

Individual*(LCE_Breed_Disperse::* LCE_Breed_Disperse::_make_offspring)(sex_t SEX, Patch *patch, unsigned int LocalPatch)
protected
int LCE_Breed_Disperse::_num_colonizers
private

Maximum size of a patch after colonisation.

Referenced by numFemOffspring_colonizers(), numMalOffspring_random_colonizers(), and setParameters().


The documentation for this class was generated from the following files:

Generated for Nemo v2.3.0 by  doxygen 1.8.8 --
Catalogued on GSR