Simpact Cyan
Population based event driven simulation using mNRM
personaleventlist.h
1 #ifndef PERSONALEVENTLIST_H
2 
3 #define PERSONALEVENTLIST_H
4 
5 #include "errut/errorbase.h"
6 #include "populationevent.h"
7 #include "state.h"
8 #include <vector>
9 #include <list>
10 #include <set>
11 
12 //#define PERSONALEVENTLIST_EXTRA_DEBUGGING
13 
14 class PersonBase;
15 
16 class PersonalEventList : public errut::ErrorBase
17 {
18 public:
19  PersonalEventList(PersonBase *pPerson);
20  ~PersonalEventList();
21 
22  void registerPersonalEvent(PopulationEvent *pEvt);
23  void processUnsortedEvents(Population &pop, double t0);
24  void advanceEventTimes(const Population &pop, double t1);
25  void adjustingEvent(PopulationEvent *pEvt);
26  void removeTimedEvent(PopulationEvent *pEvt);
27 
28  PopulationEvent *getEarliestEvent();
29 private:
30 #ifndef PERSONALEVENTLIST_EXTRA_DEBUGGING
31  void checkEarliestEvent() { }
32  void checkEvents() { }
33 #else
34  void checkEarliestEvent();
35  void checkEvents();
36 #endif // PERSONALEVENTLIST_EXTRA_DEBUGGING
37 
38  std::vector<PopulationEvent *> m_timedEvents;
39  std::vector<PopulationEvent *> m_untimedEvents;
40 
41  PopulationEvent *m_pEarliestEvent;
42  PersonBase *m_pPerson;
43 
44 #ifdef STATE_SHOW_EVENTS
45  friend class Population;
46 #endif // STATE_SHOW_EVENTS
47 };
48 
49 #endif // PERSONALEVENTLIST_H
50 
Base class which allows an error message to be set.
Definition: errorbase.h:49
This class provides functions for a population-based simulation using the modified Next Reaction Meth...
Definition: population.h:83
This is the base class for events in population-based simulations which use the Population class...
Definition: populationevent.h:61
This is the base class for a person in a population-based simulation that used the Population class...
Definition: personbase.h:23