engine.rete.agenda¶
Agenda scheduling and conflict resolution for RETE rule activations.
Classes¶
Sortable agenda entry implementing conflict-resolution priorities. |
|
Central scheduler for rule activations. |
Module Contents¶
- class engine.rete.agenda.AgendaEntry¶
Sortable agenda entry implementing conflict-resolution priorities.
- class engine.rete.agenda.Agenda(actions: collections.abc.Iterable[engine.rete.consequents.ActionInstance] = ())¶
Central scheduler for rule activations.
The agenda applies conflict resolution using user-defined salience first, then breadth-first inference depth, while preserving stable insertion order among otherwise equivalent activations.
- enqueue(action: engine.rete.consequents.ActionInstance) None¶
Add
actionto the agenda using conflict-resolution ordering.
- extend(actions: collections.abc.Iterable[engine.rete.consequents.ActionInstance]) None¶
Enqueue every action in
actions.
- pop() engine.rete.consequents.ActionInstance¶
Remove and return the highest-priority scheduled action.
- drain() tuple[engine.rete.consequents.ActionInstance, Ellipsis]¶
Pop all scheduled actions in priority order.