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

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

Locations of visitors to this page
Catalogued on GSR