Nemo  2.4.0
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
37 {}

Member Function Documentation

◆ getCurrentGeneration()

static unsigned int SIMenv::getCurrentGeneration ( )
inlinestatic
59 {return MainSim->getCurrentGeneration();}
static SimRunner * MainSim
Definition: simenv.h:41
unsigned int getCurrentGeneration()
Definition: simulation.h:189

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:196

References SimRunner::getCurrentRankInLifeCycle(), and MainSim.

Referenced by BinaryDataSaver::FHwrite().

+ Here is the caller graph for this function:

◆ getCurrentReplicate()

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

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
60 {return MainSim->getGenerations();}
unsigned int getGenerations()
Definition: simulation.h:191

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
51  {
52  SimRunner *sim = new SimRunner( new Metapop() );
53  loadDefaultComponents( sim );
54  return sim;
55  }
Top class of the metapopulation structure, contains the patches.
Definition: metapop.h:79
static void loadDefaultComponents(SimBuilder *sim)
Definition: simenv.cc:53
Performs the setup of the Metapop and SimComponents and runs the simulation.
Definition: simulation.h:52

References loadDefaultComponents().

◆ getReplicates()

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

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());
66  sim->add_LCE(new LCE_StatServiceNotifier());
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());
77  sim->add_LCE(new LCE_Disperse_ConstDisp());
78  sim->add_LCE(new LCE_SeedDisp());
79  sim->add_LCE(new LCE_Disperse_EvolDisp());
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_PhenotypeExpression());
86  sim->add_LCE(new LCE_NtrlInit());
87  sim->add_LCE(new LCE_Init_BDMI());
88  sim->build_allParams();
89 
90 }
A class to handle simulation data saving in binary format.
Definition: binarydatasaver.h:43
void add_LCE(LifeCycleEvent *event)
Add a life cycle event to the template and component lists.
Definition: basicsimulation.h:57
void add_trait(TraitPrototype *trait)
Add a trait prototype to the template and component lists.
Definition: basicsimulation.h:55
Removes all adults from the patches and randomly moves the offspring to the adults age class.
Definition: LCEmisc.h:79
Performs breeding and migration in one, migration rates are backward rates.
Definition: LCEcomposite.h:49
Implementation of the basic breeding and mating procedures, does not link to any trait.
Definition: LCEquanti.h:131
Composite LCE performing breeding, migration and viability selection all in one.
Definition: LCEcomposite.h:298
Composite LCE implementing breeding and viability selection on a given trait type.
Definition: LCEcomposite.h:242
Breeding LCE when individuals carry the Wolbachia endosymbiotic parasite.
Definition: ttwolbachia.h:205
Implementation of the basic breeding and mating procedures, does not link to any trait.
Definition: LCEbreed.h:375
A class to perform crosses within patches, implements the NC1 mating design.
Definition: LCEmisc.h:164
Dispersal event with constant dispersal rates.
Definition: LCEdisperse.h:148
Dispersal event with an evolving dispersal rate given by the "disp" trait.
Definition: LCEdisperse.h:197
Event used to notify all file handlers to update their state through the FileServices::notify() inter...
Definition: servicenotifiers.h:72
Allelic frequency initialiser for the DBMI trait.
Definition: ttbdmi.h:294
Set patch-specifiec initial genotypes values.
Definition: ttneutralgenes.h:578
Randomly removes individuals from the patches according to the extinction rate parameter.
Definition: LCEmisc.h:103
Definition: LCEphenoexpression.h:36
Set patch-specifiec initial genotypes values.
Definition: LCEquanti.h:39
Set patch-specifiec initial genotypes values.
Definition: LCEquanti.h:74
Regulates the patches to their carrying capacity, acts on each age class separately.
Definition: LCEmisc.h:50
A class to change the size of the population/patches during a simulation.
Definition: LCEmisc.h:221
Definition: LCEdisperse.h:175
Base class performing (viability) selection on an arbitrary trait.
Definition: LCEselection.h:50
Initiates the StatServices' parameters (log time) when registering, calls StatServices::notify() when...
Definition: servicenotifiers.h:183
void build_allParams()
Clears and fills the _allParams list with the ParamSet's of the simulation components.
Definition: basicsimulation.cc:117
Definition: ttbdmi.h:49
Prototype class of the bitstring-deleterious mutations trait class.
Definition: ttdeletmutations_bitstring.h:177
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:171
TProtoQuanti.
Definition: ttquanti.h:414
Prototype of the Wolbachia trait.
Definition: ttwolbachia.h:115
@ FEM
Definition: types.h:36
@ MAL
Definition: types.h:36

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

Referenced by getNewSimulation(), and setMainSim().

+ Here is the caller graph for this function:

◆ setMainSim() [1/2]

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

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
57 {MainSim = sim;}

References MainSim.

Member Data Documentation

◆ MainSim


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

Generated for Nemo v2.4.0 by  doxygen 1.9.1 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR