Nemo  2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
SIMenv Class Reference

Global class exposing the current SimRunner throughout the code. More...

#include <simenv.h>

+ Collaboration diagram for SIMenv:

Static Public Member Functions

static void loadDefaultComponents (SimBuilder *sim)
 
static SimRunnersetMainSim (Metapop *pop)
 
static SimRunnergetNewSimulation ()
 
static void setMainSim (SimRunner *sim)
 
static unsigned int getCurrentGeneration ()
 
static unsigned int getGenerations ()
 
static unsigned int getCurrentReplicate ()
 
static unsigned int getReplicates ()
 
static int getCurrentRankInLifeCycle ()
 

Static Public Attributes

static SimRunnerMainSim = NULL
 

Private Member Functions

 SIMenv ()
 

Detailed Description

Global class exposing the current SimRunner throughout the code.

Constructor & Destructor Documentation

◆ SIMenv()

SIMenv::SIMenv ( )
inlineprivate
38{}

Member Function Documentation

◆ getCurrentGeneration()

static unsigned int SIMenv::getCurrentGeneration ( )
inlinestatic
static SimRunner * MainSim
Definition: simenv.h:42
unsigned int getCurrentGeneration()
Definition: simulation.h:190

References SimRunner::getCurrentGeneration(), and MainSim.

Referenced by StatServices::notify().

+ Here is the caller graph for this function:

◆ getCurrentRankInLifeCycle()

static int SIMenv::getCurrentRankInLifeCycle ( )
inlinestatic
int getCurrentRankInLifeCycle()
Definition: simulation.h:197

References SimRunner::getCurrentRankInLifeCycle(), and MainSim.

Referenced by BinaryDataSaver::FHwrite().

+ Here is the caller graph for this function:

◆ getCurrentReplicate()

static unsigned int SIMenv::getCurrentReplicate ( )
inlinestatic
unsigned int getCurrentReplicate()
Definition: simulation.h:194

References SimRunner::getCurrentReplicate(), and MainSim.

Referenced by LCE_StatFH::FHwrite(), StatServices::printStatValue(), and StatServices::recordStats().

+ Here is the caller graph for this function:

◆ getGenerations()

static unsigned int SIMenv::getGenerations ( )
inlinestatic
61{return MainSim->getGenerations();}
unsigned int getGenerations()
Definition: simulation.h:192

References SimRunner::getGenerations(), and MainSim.

Referenced by LCE_Breed_Wolbachia::execute(), StatHandlerBase::init(), LCE_Breed_Wolbachia::loadFileServices(), StatServices::setOccurrences(), and LCE_StatServiceNotifier::setParameters().

+ Here is the caller graph for this function:

◆ getNewSimulation()

static SimRunner * SIMenv::getNewSimulation ( )
inlinestatic
52 {
53 SimRunner *sim = new SimRunner( new Metapop() );
55 return sim;
56 }
Top class of the metapopulation structure, contains the patches.
Definition: metapop.h:80
static void loadDefaultComponents(SimBuilder *sim)
Definition: simenv.cc:53
Performs the setup of the Metapop and SimComponents and runs the simulation.
Definition: simulation.h:53

References loadDefaultComponents().

◆ getReplicates()

static unsigned int SIMenv::getReplicates ( )
inlinestatic
63{return MainSim->getReplicates();}
unsigned int getReplicates()
Definition: simulation.h:196

References SimRunner::getReplicates(), and MainSim.

Referenced by LCE_StatFH::FHwrite(), StatHandlerBase::init(), StatServices::init(), LCE_Breed_Wolbachia::loadFileServices(), and StatServices::printStatAverage().

+ Here is the caller graph for this function:

◆ loadDefaultComponents()

void SIMenv::loadDefaultComponents ( SimBuilder sim)
static
54{
55 //add TraitPrototype
56 sim->add_trait(new TProtoDispersal(FEM));
57 sim->add_trait(new TProtoDispersal(MAL));
58 sim->add_trait(new TProtoNeutralGenes());
60 sim->add_trait(new TProtoWolbachia());
61 sim->add_trait(new TProtoQuanti());
62 sim->add_trait(new TProtoBDMI());
63
64 //add LifeCycleEvents
65 sim->add_LCE(new BinaryDataSaver());
68 sim->add_LCE(new LCE_Regulation());
69 sim->add_LCE(new LCE_Aging());
70 sim->add_LCE(new LCE_Patch_Extinction());
71 sim->add_LCE(new LCE_Breed());
72 sim->add_LCE(new LCE_Breed_Selection());
73 sim->add_LCE(new LCE_Breed_Disperse());
75 sim->add_LCE(new LCE_Breed_Wolbachia());
76 sim->add_LCE(new LCE_Breed_Quanti());
78 sim->add_LCE(new LCE_SeedDisp());
80 sim->add_LCE(new LCE_Selection_base());
81 sim->add_LCE(new LCE_Cross());
82 sim->add_LCE(new LCE_Resize());
83 sim->add_LCE(new LCE_QuantiInit());
84 sim->add_LCE(new LCE_QuantiModifier());
85 sim->add_LCE(new LCE_NtrlInit());
86 sim->add_LCE(new LCE_Init_BDMI());
87 sim->build_allParams();
88
89}
A class to handle simulation data saving in binary format.
Definition: binarydatasaver.h:44
void add_LCE(LifeCycleEvent *event)
Add a life cycle event to the template and component lists.
Definition: basicsimulation.h:58
void add_trait(TraitPrototype *trait)
Add a trait prototype to the template and component lists.
Definition: basicsimulation.h:56
Removes all adults from the patches and randomly moves the offspring to the adults age class.
Definition: LCEmisc.h:80
Performs breeding and migration in one, migration rates are backward rates.
Definition: LCEcomposite.h:46
Implementation of the basic breeding and mating procedures, does not link to any trait.
Definition: LCEquanti.h:132
Composite LCE performing breeding, migration and viability selection all in one.
Definition: LCEcomposite.h:268
Composite LCE implementing breeding and viability selection on a given trait type.
Definition: LCEcomposite.h:214
Breeding LCE when individuals carry the Wolbachia endosymbiotic parasite.
Definition: ttwolbachia.h:192
Implementation of the basic breeding and mating procedures, does not link to any trait.
Definition: LCEbreed.h:355
A class to perform crosses within patches, implements the NC1 mating design.
Definition: LCEmisc.h:165
Dispersal event with constant dispersal rates.
Definition: LCEdisperse.h:135
Dispersal event with an evolving dispersal rate given by the "disp" trait.
Definition: LCEdisperse.h:184
Event used to notify all file handlers to update their state through the FileServices::notify() inter...
Definition: servicenotifiers.h:73
Allelic frequency initialiser for the DBMI trait.
Definition: ttbdmi.h:299
Set patch-specifiec initial genotypes values.
Definition: ttneutralgenes.h:528
Randomly removes individuals from the patches according to the extinction rate parameter.
Definition: LCEmisc.h:104
Set patch-specifiec initial genotypes values.
Definition: LCEquanti.h:40
Set patch-specifiec initial genotypes values.
Definition: LCEquanti.h:75
Regulates the patches to their carrying capacity, acts on each age class separately.
Definition: LCEmisc.h:51
A class to change the size of the population/patches during a simulation.
Definition: LCEmisc.h:222
Definition: LCEdisperse.h:162
Base class performing (viability) selection on an arbitrary trait.
Definition: LCEselection.h:51
Initiates the StatServices' parameters (log time) when registering, calls StatServices::notify() when...
Definition: servicenotifiers.h:161
void build_allParams()
Clears and fills the _allParams list with the ParamSet's of the simulation components.
Definition: basicsimulation.cc:116
Definition: ttbdmi.h:50
Prototype class of the bitstring-deleterious mutations trait class.
Definition: ttdeletmutations_bitstring.h:171
Prototype of the evolving dispersal trait, defines the sex-specific trait type.
Definition: ttdispersal.h:119
Prototype class for the TTNeutralGenes trait class.
Definition: ttneutralgenes.h:164
TProtoQuanti.
Definition: ttquanti.h:113
Prototype of the Wolbachia trait.
Definition: ttwolbachia.h:115
@ FEM
Definition: types.h:37
@ MAL
Definition: types.h:37

References ComponentManager::add_LCE(), ComponentManager::add_trait(), ParamManager::build_allParams(), FEM, and MAL.

Referenced by BinaryDataLoader::extractPop(), getNewSimulation(), and setMainSim().

+ Here is the caller graph for this function:

◆ setMainSim() [1/2]

static SimRunner * SIMenv::setMainSim ( Metapop pop)
inlinestatic
46 {
47 MainSim = new SimRunner( pop );
49 return MainSim;
50 }

References loadDefaultComponents(), and MainSim.

Referenced by main().

+ Here is the caller graph for this function:

◆ setMainSim() [2/2]

static void SIMenv::setMainSim ( SimRunner sim)
inlinestatic
58{MainSim = sim;}

References MainSim.

Member Data Documentation

◆ MainSim


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

Generated for Nemo v2.3.56 by  doxygen 1.9.0 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR