engine.rete.agenda ================== .. py:module:: engine.rete.agenda .. autoapi-nested-parse:: Agenda scheduling and conflict resolution for RETE rule activations. Classes ------- .. autoapisummary:: engine.rete.agenda.AgendaEntry engine.rete.agenda.Agenda Module Contents --------------- .. py:class:: AgendaEntry Sortable agenda entry implementing conflict-resolution priorities. .. py:attribute:: salience_rank :type: int .. py:attribute:: depth_rank :type: int .. py:attribute:: insertion_rank :type: int .. py:attribute:: action :type: engine.rete.consequents.ActionInstance .. py:class:: 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. .. py:method:: enqueue(action: engine.rete.consequents.ActionInstance) -> None Add ``action`` to the agenda using conflict-resolution ordering. .. py:method:: extend(actions: collections.abc.Iterable[engine.rete.consequents.ActionInstance]) -> None Enqueue every action in ``actions``. .. py:method:: pop() -> engine.rete.consequents.ActionInstance Remove and return the highest-priority scheduled action. .. py:method:: drain() -> tuple[engine.rete.consequents.ActionInstance, Ellipsis] Pop all scheduled actions in priority order.