Nemo  2.3.46
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 (SimRunner *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 ( )
38 {}

Member Function Documentation

static unsigned int SIMenv::getCurrentGeneration ( )

References SimRunner::getCurrentGeneration().

Referenced by StatServices::notify().

60 {return MainSim->getCurrentGeneration();}
static SimRunner * MainSim
Definition: simenv.h:42
unsigned int getCurrentGeneration()
Definition: simulation.h:188
static int SIMenv::getCurrentRankInLifeCycle ( )

References SimRunner::getCurrentRankInLifeCycle().

Referenced by BinaryDataSaver::FHwrite().

static SimRunner * MainSim
Definition: simenv.h:42
int getCurrentRankInLifeCycle()
Definition: simulation.h:195
static unsigned int SIMenv::getCurrentReplicate ( )

References SimRunner::getCurrentReplicate().

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

62 {return MainSim->getCurrentReplicate();}
unsigned int getCurrentReplicate()
Definition: simulation.h:192
static SimRunner * MainSim
Definition: simenv.h:42
static unsigned int SIMenv::getGenerations ( )

References SimRunner::getGenerations().

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

61 {return MainSim->getGenerations();}
unsigned int getGenerations()
Definition: simulation.h:190
static SimRunner * MainSim
Definition: simenv.h:42
static SimRunner* SIMenv::getNewSimulation ( )

References loadDefaultComponents().

52  {
53  SimRunner *sim = new SimRunner( new Metapop() );
54  loadDefaultComponents( sim );
55  return sim;
56  }
Top class of the metapopulation structure, contains the patches.
Definition: metapop.h:79
Performs the setup of the Metapop and SimComponents and runs the simulation.
Definition: simulation.h:53
static void loadDefaultComponents(SimRunner *sim)
static unsigned int SIMenv::getReplicates ( )

References SimRunner::getReplicates().

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

63 {return MainSim->getReplicates();}
static SimRunner * MainSim
Definition: simenv.h:42
unsigned int getReplicates()
Definition: simulation.h:194
void SIMenv::loadDefaultComponents ( SimRunner sim)

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

Referenced by getNewSimulation(), and setMainSim().

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());
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_Disperse_ConstDisp());
77  sim->add_LCE(new LCE_SeedDisp());
78  sim->add_LCE(new LCE_Disperse_EvolDisp());
79  sim->add_LCE(new LCE_Selection_base());
80  sim->add_LCE(new LCE_Cross());
81  sim->add_LCE(new LCE_Resize());
82  sim->add_LCE(new LCE_QuantiInit());
83  sim->add_LCE(new LCE_NtrlInit());
84  sim->add_LCE(new LCE_Init_BDMI());
85  sim->build_allParams();
87 }
Prototype of the evolving dispersal trait, defines the sex-specific trait type.
Definition: ttdispersal.h:119
Randomly removes individuals from the patches according to the extinction rate parameter.
Definition: LCEmisc.h:101
Performs breeding and migration in one, migration rates are backward rates.
Definition: LCEcomposite.h:45
Definition: ttbdmi.h:50
void add_LCE(LifeCycleEvent *event)
Add a life cycle event to the template and component lists.
Definition: basicsimulation.h:58
A class to change the size of the population/patches during a simulation.
Definition: LCEmisc.h:217
Event used to notify all file handlers to update their state through the FileServices::notify() inter...
Definition: servicenotifiers.h:69
Removes all adults from the patches and randomly moves the offspring to the adults age class...
Definition: LCEmisc.h:78
Definition: ttquanti.h:147
Initiates the StatServices' parameters (log time) when registering, calls StatServices::notify() when...
Definition: servicenotifiers.h:125
Set patch-specifiec initial genotypes values.
Definition: LCEquanti.h:74
Composite LCE implementing breeding and viability selection on a given trait type.
Definition: LCEcomposite.h:209
A class to perform crosses within patches, implements the NC1 mating design.
Definition: LCEmisc.h:161
A class to handle simulation data saving in binary format.
Definition: binarydatasaver.h:44
Implementation of the basic breeding and mating procedures, does not link to any trait.
Definition: LCEbreed.h:346
Allelic frequency initialiser for the DBMI trait.
Definition: ttbdmi.h:292
Breeding LCE when individuals carry the Wolbachia endosymbiotic parasite.
Definition: ttwolbachia.h:190
Definition: LCEdisperse.h:151
Prototype of the Wolbachia trait.
Definition: ttwolbachia.h:115
Base class performing (viability) selection on an arbitrary trait.
Definition: LCEselection.h:50
Set patch-specifiec initial genotypes values.
Definition: LCEquanti.h:39
void build_allParams()
Clears and fills the _allParams list with the ParamSet's of the simulation components.
Composite LCE performing breeding, migration and viability selection all in one.
Definition: LCEcomposite.h:259
Definition: types.h:37
Prototype class for the TTNeutralGenes trait class.
Definition: ttneutralgenes.h:163
Prototype class of the bitstring-deleterious mutations trait class.
Definition: ttdeletmutations_bitstring.h:182
Regulates the patches to their carrying capacity, acts on each age class separately.
Definition: LCEmisc.h:50
void add_trait(TraitPrototype *trait)
Add a trait prototype to the template and component lists.
Definition: basicsimulation.h:56
Definition: types.h:37
Dispersal event with constant dispersal rates.
Definition: LCEdisperse.h:124
Dispersal event with an evolving dispersal rate given by the "disp" trait.
Definition: LCEdisperse.h:172
static SimRunner* SIMenv::setMainSim ( Metapop pop)

References loadDefaultComponents(), and MainSim.

Referenced by main().

46  {
47  MainSim = new SimRunner( pop );
49  return MainSim;
50  }
static SimRunner * MainSim
Definition: simenv.h:42
Performs the setup of the Metapop and SimComponents and runs the simulation.
Definition: simulation.h:53
static void loadDefaultComponents(SimRunner *sim)
static void SIMenv::setMainSim ( SimRunner sim)
58 {MainSim = sim;}
static SimRunner * MainSim
Definition: simenv.h:42

Member Data Documentation

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

Generated for Nemo v2.3.0 by  doxygen 1.8.8 --
Catalogued on GSR