Simpact Cyan
Population based event driven simulation using mNRM
eventintervention.h
1 #ifndef EVENTINTERVENTION_H
2 
3 #define EVENTINTERVENTION_H
4 
5 #include "simpactevent.h"
6 #include "configsettings.h"
7 #include <list>
8 
9 class EventIntervention : public SimpactEvent
10 {
11 public:
12  EventIntervention();
13  ~EventIntervention();
14 
15  std::string getDescription(double tNow) const;
16  void writeLogs(double tNow) const;
17 
18  void fire(State *pState, double t);
19 
20  // We don't know which parameters are going to change in a very general
21  // intervention event, so everyone must be assumed to be (possibly) affected
22  bool isEveryoneAffected() const { return true; }
23 
24  static void processConfig(ConfigSettings &config);
25  static void obtainConfig(ConfigWriter &config);
26  static bool hasNextIntervention();
27 private:
28  double getNewInternalTimeDifference(GslRandomNumberGenerator *pRndGen, const State *pState);
29 
30  static double getNextInterventionTime();
31  static void popNextInterventionInfo(double &t, ConfigSettings &config);
32 
33  static std::list<double> m_interventionTimes;
34  static std::list<ConfigSettings> m_interventionSettings;
35  static bool m_interventionsProcessed;
36 };
37 
38 #endif // EVENTINTERVENTION_H
39 
This class both describes the simulation state and contains the core algorithm (as shown on the main ...
Definition: state.h:40
Helper class to read configuration settings, more advanced than ConfigReader.
Definition: configsettings.h:20
This class allows you to generate random numbers, and uses the GNU Scientific Library for this...
Definition: gslrandomnumbergenerator.h:16