-
-
Notifications
You must be signed in to change notification settings - Fork 37
Conditions
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
activities starting with "a" get higher likelihood, mainly helpful in cases where other conditions lead to equal likelihood, or the user wants to use only alphabetical sorting
activities that have been following the current activity in the diary are more likely
likelihood of all activities defined by the global amount of how often they have been in the diary (frequency, not time)