Simpact Cyan
Population based event driven simulation using mNRM
eventdissolution.h
1 #ifndef EVENTDISSOLUTION_H
2 
3 #define EVENTDISSOLUTION_H
4 
5 #include "simpactevent.h"
6 
7 class ConfigSettings;
8 
9 class EventDissolution : public SimpactEvent
10 {
11 public:
12  EventDissolution(Person *pPerson1, Person *pPerson2, double formationTime);
13  ~EventDissolution();
14 
15  std::string getDescription(double tNow) const;
16  void writeLogs(double tNow) const;
17  void fire(State *pState, double t);
18 
19  static void processConfig(ConfigSettings &config);
20  static void obtainConfig(ConfigWriter &config);
21 protected:
22  double calculateInternalTimeInterval(const State *pState, double t0, double dt);
23  double solveForRealTimeInterval(const State *pState, double Tdiff, double t0);
24 
25  double m_formationTime;
26 
27  static double getTMax(Person *pPerson1, Person *pPerson2);
28 
29  static double a0; // baseline_factor
30  static double a1; // male_current_relations_factor -> just current_relations_factor ?
31  static double a2; // female_current_relations_factor -> just current_relations_factor ?
32  static double a3; // current_relations_difference_factor?? TODO can't find this
33  static double a4; // mean_age_factor
34  static double a5; // age_difference_factor
35  static double Dp; // preferred_age_difference
36  static double b; // last_change_factor
37  static double tMaxDiff;
38 };
39 
40 #endif // EVENTDISSOLUTION_H
41 
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