|
Nemo
2.4.0b
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
A class to change the size of the population/patches during a simulation. More...
#include <LCEmisc.h>
Inheritance diagram for LCE_Resize:
Collaboration diagram for LCE_Resize:Public Member Functions | |
| LCE_Resize () | |
| virtual | ~LCE_Resize () |
| void | buildNewPatchArrayNoBackup () |
| void | buildNewPatchArrayWithBackup () |
| void | removeDesignatedPatch (bool do_backup) |
| void | updatePatchCapacities () |
| void | fillPop (void(LCE_Resize::*fillFuncPtr)(unsigned int p, age_idx age)) |
| void | fillPatchNoBackup (unsigned int p, age_idx age) |
| void | fillPatchWithBackup (unsigned int p, age_idx age) |
| void | regulate (void(LCE_Resize::*regFuncPtr)(Patch *patch, age_idx age)) |
| void | regulateAgeClassWithBackup (Patch *patch, age_idx age) |
| void | regulateAgeClassNoBackup (Patch *patch, age_idx age) |
| virtual bool | setParameters () |
| bool | updateParameters () |
| virtual void | execute () |
| virtual LifeCycleEvent * | clone () |
| 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 () |
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 Metapop * | get_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 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... | |
Private Attributes | |
| list< int >::const_iterator | _genITER |
| int | _atGeneration |
| list< int > | _generations |
| bool | _do_flush |
| bool | _do_fill |
| bool | _do_regulate |
| TMatrix | _patch2keep |
| age_t | _setAge |
| Patch * | _patchBackup |
Additional Inherited Members | |
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... | |
A class to change the size of the population/patches during a simulation.
| LCE_Resize::LCE_Resize | ( | ) |
References SimComponent::add_parameter(), BOOL, INT, MAT, setParameters(), STR, and updateParameters().
Referenced by clone().
|
inlinevirtual |
References _patchBackup.
|
inlinevirtual |
Implements LifeCycleEvent.
| void LCE_Resize::buildNewPatchArrayNoBackup | ( | ) |
References _patch2keep, LifeCycleEvent::_popPtr, TMatrix::getNbCols(), removeDesignatedPatch(), and Metapop::updatePatchArray().
Referenced by execute().
| void LCE_Resize::buildNewPatchArrayWithBackup | ( | ) |
References _do_fill, _patch2keep, _patchBackup, LifeCycleEvent::_popPtr, Metapop::addPatch(), Patch::clear(), Patch::copy2patch(), TMatrix::getNbCols(), Metapop::getPatchArraySize(), Metapop::getPatchNbr(), Metapop::getPatchPtr(), regulate(), regulateAgeClassWithBackup(), removeDesignatedPatch(), Metapop::removePatch(), and Metapop::updatePatchState().
Referenced by execute().
|
inlinevirtual |
|
virtual |
Implements LifeCycleEvent.
References _atGeneration, _do_fill, _do_flush, _do_regulate, _generations, _genITER, SimComponent::_paramSet, _patch2keep, _patchBackup, LifeCycleEvent::_popPtr, _setAge, ADULTS, buildNewPatchArrayNoBackup(), buildNewPatchArrayWithBackup(), Patch::clear(), fatal(), fillPatchNoBackup(), fillPatchWithBackup(), fillPop(), SimComponent::get_parameter(), SimComponent::get_paramset(), ParamSet::getArg(), Metapop::getCurrentAge(), Metapop::getCurrentGeneration(), TMatrix::getNbCols(), Metapop::getPatchArraySize(), Metapop::getPatchKFem(), Metapop::getPatchKMal(), Metapop::getPatchNbr(), Patch::init(), tstring::int2str(), message(), NONE, OFFSPRG, regulate(), regulateAgeClassNoBackup(), regulateAgeClassWithBackup(), ParamSet::set_param(), SimComponent::set_paramset(), Metapop::setPopulationParameters(), Metapop::size(), and warning().
| void LCE_Resize::fillPatchNoBackup | ( | unsigned int | p, |
| age_idx | age | ||
| ) |
References LifeCycleEvent::_popPtr, Patch::add(), FEM, Patch::get_KFem(), Patch::get_KMal(), Patch::getID(), Metapop::getPatchPtr(), IndFactory::makeNewIndividual(), MAL, and Patch::size().
Referenced by execute().
| void LCE_Resize::fillPatchWithBackup | ( | unsigned int | p, |
| age_idx | age | ||
| ) |
References _patchBackup, LifeCycleEvent::_popPtr, Patch::add(), FEM, Patch::get(), Patch::get_KFem(), Patch::get_KMal(), Metapop::getPatchPtr(), MAL, Patch::remove(), and Patch::size().
Referenced by execute().
| void LCE_Resize::fillPop | ( | void(LCE_Resize::*)(unsigned int p, age_idx age) | fillFuncPtr | ) |
References LifeCycleEvent::_popPtr, _setAge, ADLTx, ADULTS, Metapop::getCurrentAge(), Metapop::getPatchNbr(), OFFSPRG, and OFFSx.
Referenced by execute().
|
inlinevirtual |
Implements SimComponent.
|
inlinevirtual |
Implements SimComponent.
References LifeCycleEvent::_popPtr, ADLTx, Metapop::getPatchNbr(), Metapop::getPatchPtr(), and OFFSx.
Referenced by buildNewPatchArrayWithBackup(), and execute().
References LifeCycleEvent::_popPtr, FEM, Patch::get(), Patch::get_KFem(), Patch::get_KMal(), MAL, IndFactory::recycle(), Patch::remove(), Patch::size(), and RAND::Uniform().
Referenced by execute().
References _patchBackup, Patch::add(), FEM, Patch::get(), Patch::get_KFem(), Patch::get_KMal(), MAL, Patch::remove(), Patch::size(), and RAND::Uniform().
Referenced by buildNewPatchArrayWithBackup(), and execute().
|
inlinevirtual |
Implements LifeCycleEvent.
| void LCE_Resize::removeDesignatedPatch | ( | bool | do_backup | ) |
References _patch2keep, _patchBackup, LifeCycleEvent::_popPtr, Metapop::addPatch(), Patch::clear(), Patch::copy2patch(), Metapop::deletePatch(), fatal(), TMatrix::get(), Patch::getID(), TMatrix::getNbCols(), Metapop::getPatchArraySize(), Metapop::getPatchPtr(), and Metapop::removePatch().
Referenced by buildNewPatchArrayNoBackup(), and buildNewPatchArrayWithBackup().
|
inlinevirtual |
Implements LifeCycleEvent.
|
inlinevirtual |
Implements SimComponent.
|
virtual |
Implements SimComponent.
References _atGeneration, _generations, _genITER, SimComponent::_paramSet, TMatrix::get(), SimComponent::get_parameter_value(), ParamSet::getMatrix(), TMatrix::getNbCols(), ParamSet::isMatrix(), and updateParameters().
Referenced by LCE_Resize().
| bool LCE_Resize::updateParameters | ( | ) |
References _atGeneration, _do_fill, _do_flush, _do_regulate, SimComponent::_paramSet, _patch2keep, LifeCycleEvent::_popPtr, _setAge, ADULTS, ALL, error(), SimComponent::get_parameter(), ParamSet::getArg(), Metapop::getCurrentGeneration(), ParamSet::getMatrix(), TMatrix::getNbCols(), Metapop::getPatchNbr(), Param::isSet(), OFFSPRG, TMatrix::reset(), and warning().
Referenced by LCE_Resize(), and setParameters().
| void LCE_Resize::updatePatchCapacities | ( | ) |
|
private |
Referenced by execute(), setParameters(), and updateParameters().
|
private |
Referenced by buildNewPatchArrayWithBackup(), execute(), and updateParameters().
|
private |
Referenced by execute(), and updateParameters().
|
private |
Referenced by execute(), and updateParameters().
|
private |
Referenced by execute(), and setParameters().
|
private |
Referenced by execute(), and setParameters().
|
private |
Referenced by buildNewPatchArrayNoBackup(), buildNewPatchArrayWithBackup(), execute(), removeDesignatedPatch(), and updateParameters().
|
private |
|
private |
Referenced by execute(), fillPop(), and updateParameters().
1.9.1 -- Nemo is hosted on