-
-
Notifications
You must be signed in to change notification settings - Fork 37
Conditions
Raphael Mack edited this page Jan 26, 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 (#18), 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", "Alphabetical" 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"), enabling is handled by the Condition
- Each Condition is modeled as a Java class
- reevaluation is triggered by the condition, which shall register the respective listeners -> The Conditions are responsible to reevaluate the likelihood of all the activities if necessary.
- Each evaluation runs in a dedicated thread
- ActivityHelper collects the results of all conditions and sums them up