Simpact Cyan
Population based event driven simulation using mNRM
eventmortality.h
1 #ifndef EVENTMORTALITY_H
2 
3 #define EVENTMORTALITY_H
4 
5 #include "simpactevent.h"
6 
7 // Non-AIDS (normal) mortality
8 class EventMortality : public SimpactEvent
9 {
10 public:
11  EventMortality(Person *pPerson);
12  ~EventMortality();
13 
14  bool isAidsMortality() const { return m_isAidsMortality; }
15 
16  std::string getDescription(double tNow) const;
17 
18  int getNumberOfOtherAffectedPersons() const;
19  void startOtherAffectedPersonIteration();
20  PersonBase *getNextOtherAffectedPerson();
21 
22  void fire(State *pState, double t);
23 private:
24  double calculateInternalTimeInterval(const State *pState, double t0, double dt);
25  double solveForRealTimeInterval(const State *pState, double Tdiff, double t0);
26  double getNewInternalTimeDifference(GslRandomNumberGenerator *pRndGen, const State *pState);
27  bool isUseless();
28 
29  bool m_isAidsMortality;
30 };
31 
32 #endif // EVENTMORTALITY_H
This class both describes the simulation state and contains the core algorithm (as shown on the main ...
Definition: state.h:40
This class allows you to generate random numbers, and uses the GNU Scientific Library for this...
Definition: gslrandomnumbergenerator.h:15
This is the base class for a person in a population-based simulation that used the Population class...
Definition: personbase.h:23