Simpact Cyan
Population based event driven simulation using mNRM
eventformation.h
1 #ifndef EVENTFORMATION_H
2 
3 #define EVENTFORMATION_H
4 
5 #include "simpactevent.h"
6 
7 class ConfigSettings;
8 class EvtHazard;
9 
10 class EventFormation : public SimpactEvent
11 {
12 public:
13  // set last dissolution time to -1 if irrelevant
14  EventFormation(Person *pPerson1, Person *pPerson2, double lastDissTime);
15  ~EventFormation();
16 
17  std::string getDescription(double tNow) const;
18  void writeLogs(double tNow) const;
19  void fire(State *pState, double t);
20 
21  double getLastDissolutionTime() const { return m_lastDissolutionTime; }
22 
23  static void processConfig(ConfigSettings &config);
24  static void obtainConfig(ConfigWriter &config);
25 protected:
26  double calculateInternalTimeInterval(const State *pState, double t0, double dt);
27  double solveForRealTimeInterval(const State *pState, double Tdiff, double t0);
28  bool isUseless();
29 
30  double m_lastDissolutionTime;
31 
32  static EvtHazard *m_pHazard;
33 };
34 
35 #endif // EVENTFORMATION_H
36 
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