1 #ifndef SIMPACTPOPULATION_H
3 #define SIMPACTPOPULATION_H
16 SimpactPopulationConfig();
17 ~SimpactPopulationConfig();
19 void setInitialMen(
int number) { m_initialMen = number; }
20 void setInitialWomen(
int number) { m_initialWomen = number; }
21 void setEyeCapsFraction(
double f) { m_eyeCapsFraction = f; }
23 int getInitialMen()
const {
return m_initialMen; }
24 int getInitialWomen()
const {
return m_initialWomen; }
25 double getEyeCapsFraction()
const {
return m_eyeCapsFraction; }
27 int m_initialMen, m_initialWomen;
28 double m_eyeCapsFraction;
44 int getInitialPopulationSize()
const {
return m_initialPopulationSize; }
45 double getEyeCapsFraction()
const {
return m_eyeCapsFraction; }
47 bool createInitialPopulation(
const SimpactPopulationConfig &config,
const PopulationDistribution &popDist);
48 bool scheduleInitialEvents();
52 int m_initialPopulationSize;
53 double m_eyeCapsFraction;
58 inline SimpactPopulation &SIMPACTPOPULATION(
State *pState)
61 return static_cast<SimpactPopulation &
>(*pState);
64 inline const SimpactPopulation &SIMPACTPOPULATION(
const State *pState)
67 return static_cast<const SimpactPopulation &
>(*pState);
70 #endif // SIMPACTPOPULATION_H
This class both describes the simulation state and contains the core algorithm (as shown on the main ...
Definition: state.h:40
Base class which allows an error message to be set.
Definition: errorbase.h:49
virtual void onAboutToFire(EventBase *pEvt)
Called right before pEvt is fired.
Definition: state.h:132
PersonBase ** getDeceasedPeople()
Returns the people who were part of the simulation but who are now deceased (intended for result anal...
Definition: population.h:122
Base class for picking random numbers according to some kind of age distribution. ...
Definition: populationdistribution.h:15
This class provides functions for a population-based simulation using the modified Next Reaction Meth...
Definition: population.h:83
This class allows you to generate random numbers, and uses the GNU Scientific Library for this...
Definition: gslrandomnumbergenerator.h:16
PersonBase ** getMen()
Same as Population::getAllPeople, but only the men are returned.
Definition: population.cpp:505
PersonBase ** getWomen()
Same as Population::getAllPeople, but only the women are returned.
Definition: population.cpp:518
This is the base class for events in the mNRM algorithm.
Definition: eventbase.h:62
PersonBase ** getAllPeople()
Returns a list to the current living members in the population, introduced into the simulation using ...
Definition: population.h:112