Nemo  2.2.0
Public Member Functions
LCE_Aging Class Reference

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:

List of all members.

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_Agingclone ()
 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.

Detailed Description

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.

Definition at line 78 of file LCEmisc.h.


Constructor & Destructor Documentation

LCE_Aging::LCE_Aging ( ) [inline]

Definition at line 82 of file LCEmisc.h.

Referenced by clone().

: LifeCycleEvent("aging","") {}
virtual LCE_Aging::~LCE_Aging ( ) [inline, virtual]

Definition at line 84 of file LCEmisc.h.

{ }

Member Function Documentation

virtual age_t LCE_Aging::addAgeClass ( ) [inline, virtual]

Adds the returned age-class flag(s) to the current Metapop age-class flags.

Implements LifeCycleEvent.

Definition at line 93 of file LCEmisc.h.

References ADULTS.

{return ADULTS;}
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.

Parameters:
loaderthe 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.

Parameters:
loaderthe stat service

Implements SimComponent.

Definition at line 91 of file LCEmisc.h.

{}
virtual age_t LCE_Aging::removeAgeClass ( ) [inline, virtual]

Removes the returned age-class flag(s) from the current Metapop age-class flags.

Implements LifeCycleEvent.

Definition at line 92 of file LCEmisc.h.

References OFFSPRG.

{return OFFSPRG;}
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;}

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

Generated for Nemo v2.2.0 by  doxygen 1.7.5.1 -- Nemo is hosted by  SourceForge.net Logo