Nemo  2.4.0
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
simenv.h
Go to the documentation of this file.
1 
29 #ifndef SIMENV_H
30 #define SIMENV_H
31 
32 #include "simulation.h"
33 
35 class SIMenv {
36 
37  SIMenv(){}
38 
39 public:
40 
41  static SimRunner* MainSim;
42 
43  static void loadDefaultComponents(SimBuilder* sim);
44 
45  static SimRunner* setMainSim ( Metapop *pop ) {
46  MainSim = new SimRunner( pop );
48  return MainSim;
49  }
50 
52  SimRunner *sim = new SimRunner( new Metapop() );
53  loadDefaultComponents( sim );
54  return sim;
55  }
56 
57  static void setMainSim( SimRunner* sim) {MainSim = sim;}
58 
59  static unsigned int getCurrentGeneration() {return MainSim->getCurrentGeneration();}
60  static unsigned int getGenerations() {return MainSim->getGenerations();}
61  static unsigned int getCurrentReplicate() {return MainSim->getCurrentReplicate();}
62  static unsigned int getReplicates() {return MainSim->getReplicates();}
64 };
65 
66 #endif
Top class of the metapopulation structure, contains the patches.
Definition: metapop.h:79
Global class exposing the current SimRunner throughout the code.
Definition: simenv.h:35
static unsigned int getReplicates()
Definition: simenv.h:62
static unsigned int getCurrentGeneration()
Definition: simenv.h:59
static void loadDefaultComponents(SimBuilder *sim)
Definition: simenv.cc:53
static int getCurrentRankInLifeCycle()
Definition: simenv.h:63
static SimRunner * MainSim
Definition: simenv.h:41
static unsigned int getCurrentReplicate()
Definition: simenv.h:61
SIMenv()
Definition: simenv.h:37
static SimRunner * setMainSim(Metapop *pop)
Definition: simenv.h:45
static SimRunner * getNewSimulation()
Definition: simenv.h:51
static void setMainSim(SimRunner *sim)
Definition: simenv.h:57
static unsigned int getGenerations()
Definition: simenv.h:60
Provides methods to build the user's selected set of life cycle events and traits from the parameters...
Definition: basicsimulation.h:167
Performs the setup of the Metapop and SimComponents and runs the simulation.
Definition: simulation.h:52
unsigned int getReplicates()
Definition: simulation.h:195
unsigned int getGenerations()
Definition: simulation.h:191
unsigned int getCurrentGeneration()
Definition: simulation.h:189
int getCurrentRankInLifeCycle()
Definition: simulation.h:196
unsigned int getCurrentReplicate()
Definition: simulation.h:193

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