|
Nemo
2.2.0
|
Removes all adults from the patches and randomly moves the offspring to the adults age class. More...
#include <LCEmisc.h>
Inheritance diagram for LCE_Aging:
Collaboration diagram for LCE_Aging:Public Member Functions | |
| LCE_Aging () | |
| virtual | ~LCE_Aging () |
| virtual bool | setParameters () |
| Default interface needed to initialize the component's variables from its input parameters value. | |
| virtual void | execute () |
| Execute the event on the pop. | |
| virtual LCE_Aging * | clone () |
| Cloning interface. | |
| virtual void | loadFileServices (FileServices *loader) |
| Loads the component's FileHandler onto the FileServices. | |
| virtual void | loadStatServices (StatServices *loader) |
| Loads the component's StatHandler onto the StatServices. | |
| virtual age_t | removeAgeClass () |
| Removes the returned age-class flag(s) from the current Metapop age-class flags. | |
| virtual age_t | addAgeClass () |
| Adds the returned age-class flag(s) to the current Metapop age-class flags. | |
| virtual age_t | requiredAgeClass () |
| Specifies what age-classes are required by the LCE to execute. | |
Removes all adults from the patches and randomly moves the offspring to the adults age class.
Patch regulation is performed at the same time, leaving the patch at carrying capacity (if enough offspring individuals were present). This is the only LCE that actually removes the adults from the patches. Also checks whether the patch is filled and sets the extinction flag accordingly.
| LCE_Aging::LCE_Aging | ( | ) | [inline] |
| virtual age_t LCE_Aging::addAgeClass | ( | ) | [inline, virtual] |
| virtual LCE_Aging* LCE_Aging::clone | ( | ) | [inline, virtual] |
Cloning interface.
Implements LifeCycleEvent.
Definition at line 89 of file LCEmisc.h.
References LCE_Aging().
{return new LCE_Aging();}
| void LCE_Aging::execute | ( | ) | [virtual] |
Execute the event on the pop.
Implements LifeCycleEvent.
Definition at line 45 of file LCEmisc.cc.
{
#ifdef _DEBUG_
message("LCE_Aging::execute (Patch nb: %i offsprg nb: %d adlt nb: %d; ",_popPtr->getPatchNbr()
,_popPtr->size( OFFSPRG ), _popPtr->size( ADULTS ));
#endif
unsigned int nbInd = 0;
Patch *patch;
for(unsigned int i = 0; i < _popPtr->getPatchNbr(); i++) {
patch = _popPtr->getPatch(i);
patch->flush(ADLTx, _popPtr);
nbInd = 0;
while(nbInd++ < patch->get_KFem() && patch->size(FEM, OFFSx) != 0)
patch->move(FEM, OFFSx, ADLTx, RAND::Uniform( patch->size(FEM, OFFSx) ) );
nbInd = 0;
while(nbInd++ < patch->get_KMal() && patch->size(MAL, OFFSx) != 0)
patch->move(MAL, OFFSx, ADLTx, RAND::Uniform( patch->size(MAL, OFFSx) ) );
patch->flush(OFFSx, _popPtr);
//set the Patch extinction and age tags:
if(patch->size(ADULTS) == 0) {
patch->set_isExtinct(true);
patch->set_age(0);
} else {
patch->set_isExtinct(false);
patch->set_age( patch->get_age() + 1 );
}
}
#ifdef _DEBUG_
message("after: %i)\n",_popPtr->size( ));
#endif
}
| virtual void LCE_Aging::loadFileServices | ( | FileServices * | loader | ) | [inline, virtual] |
Loads the component's FileHandler onto the FileServices.
| loader | the file service |
Implements SimComponent.
Definition at line 90 of file LCEmisc.h.
{}
| virtual void LCE_Aging::loadStatServices | ( | StatServices * | loader | ) | [inline, virtual] |
Loads the component's StatHandler onto the StatServices.
| loader | the stat service |
Implements SimComponent.
Definition at line 91 of file LCEmisc.h.
{}
| virtual age_t LCE_Aging::removeAgeClass | ( | ) | [inline, virtual] |
| virtual age_t LCE_Aging::requiredAgeClass | ( | ) | [inline, virtual] |
Specifies what age-classes are required by the LCE to execute.
Implements LifeCycleEvent.
Definition at line 94 of file LCEmisc.h.
References OFFSPRG.
{return OFFSPRG;}
| virtual bool LCE_Aging::setParameters | ( | ) | [inline, virtual] |
Default interface needed to initialize the component's variables from its input parameters value.
Formerly called 'init'.
Implements SimComponent.
Definition at line 87 of file LCEmisc.h.
{return true;}
1.7.5.1 -- Nemo is hosted by