Skip to content

Conditions

Raphael Mack edited this page Jan 23, 2018 · 6 revisions

Conditions are "functions" which map a likelihood to each activity. All evaluated conditions are summed up to have the global likelihood for the next activities.

In future it is planned to compare the highest likelihood of the successors with global threshold and the likelihood of the current activity to stay active to implement automatic switching of the current activity, but for now we only use conditions for sorting the next activities.

Here is a small documentation of the internals of Conditions:

  • They have a name, e. g. "Predecessor", "Successor" or "Weekday"
  • For each Condition a setting is used to en-/disable it and to configure its weight (this should go into an "advanced settings page")
  • Each Condition is modeled as a Java class
  • reevaluation is triggered in defined places - the condition instances are responsible to register their trigger at relevant places
  • Each evaluation runs in a dedicated thread
  • ActivityHelper collects the results of all conditions and sums them up
Clone this wiki locally