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

Generated for Nemo v2.4.2 by  doxygen 1.9.1

Catalogued on GSR