Simpact Cyan
Population based event driven simulation using mNRM
populationstatesimple.h
Go to the documentation of this file.
1 #ifndef POPULATIONSTATESIMPLE_H
2 
3 #define POPULATIONSTATESIMPLE_H
4 
9 #include "personbase.h"
10 #include "populationstatesimpleadvancedcommon.h"
11 #include <assert.h>
12 #include <vector>
13 
14 class PersonAlgorithmInfoSimple : public PersonAlgorithmInfo
15 {
16 public:
17  PersonAlgorithmInfoSimple() { m_listIndex = -1; }
18  ~PersonAlgorithmInfoSimple() { }
19  void setListIndex(int idx) { m_listIndex = idx; }
20  int getListIndex() const { return m_listIndex; }
21 private:
22  int m_listIndex;
23 };
24 
28 class PopulationStateSimple : public PopulationStateSimpleAdvancedCommon
29 {
30 public:
33 
34  bool_t init();
35 private:
36  int64_t getNextPersonID();
37  void addAlgorithmInfo(PersonBase *pPerson);
38  void setListIndex(PersonBase *pPerson, int idx);
39  int getListIndex(PersonBase *pPerson);
40 
41  bool m_init;
42  int64_t m_nextPersonID;
43 };
44 
45 #endif // POPULATIONSTATESIMPLE_H
46 
Base class to be able to store algorithm-specific information in the PersonBase object for a person i...
Definition: populationinterfaces.h:145
This is the base class for a person in a population-based simulation.
Definition: personbase.h:24
Population state to be used when simulating with the straightforward algorithm in PopulationAlgorithm...
Definition: populationstatesimple.h:29
Type to return true/false with error description.
Definition: booltype.h:26