|
ReteEngine 1.0
A rules engine and builder
|
The Agenda class manages pending rule activations in a Rete-based rule engine. It maintains a list of activations that have been triggered but not yet executed. More...
Public Member Functions | |
| void | Add (Activation a) |
| Adds a new activation to the agenda. This method is typically called when a rule's conditions are satisfied, creating an activation that represents the pending execution of that rule. The activation is added to the list of pending activations, which will be processed later during the firing phase. | |
| void | RemoveByFact (object fact) |
| Removes any pending activations from the agenda that are associated with the specified fact. This is typically called when a fact is retracted from the working memory, ensuring that any rules that were triggered by that fact but have not yet fired are cancelled and will not execute based on outdated information. | |
| void | FireAll () |
| Fires all pending activations in the agenda, executing their associated actions in order of descending salience (priority). After firing, the activations are removed from the agenda. This method is typically called during the rule execution phase to process all activated rules based on their priority, ensuring that higher salience rules are executed before lower salience ones when multiple activations are present. | |
The Agenda class manages pending rule activations in a Rete-based rule engine. It maintains a list of activations that have been triggered but not yet executed.
| void ReteCore.Agenda.Add | ( | Activation | a | ) |
Adds a new activation to the agenda. This method is typically called when a rule's conditions are satisfied, creating an activation that represents the pending execution of that rule. The activation is added to the list of pending activations, which will be processed later during the firing phase.
| a | The Activation object to add to the list of activations. |
| void ReteCore.Agenda.RemoveByFact | ( | object | fact | ) |
Removes any pending activations from the agenda that are associated with the specified fact. This is typically called when a fact is retracted from the working memory, ensuring that any rules that were triggered by that fact but have not yet fired are cancelled and will not execute based on outdated information.
| fact | The fact object to remove. |