Esempio n. 1
0
    def focus(self, module: Module):
        """The module associated with the current focus.

        Equivalent to the CLIPS (get-focus) function.

        """
        return lib.Focus(module._ptr())
Esempio n. 2
0
    def reorder(self, module: Module = None):
        """Reorder the Activations in the Agenda.

        If no Module is specified, the agendas of all modules are reordered.

        To be called after changing the conflict resolution strategy.

        """
        if module is not None:
            lib.ReorderAgenda(module._ptr())
        else:
            lib.ReorderAllAgendas(self._env)
Esempio n. 3
0
    def refresh(self, module: Module = None):
        """Recompute the salience values of the Activations on the Agenda
        and then reorder the agenda.

        Equivalent to the CLIPS (refresh-agenda) function.

        If no Module is specified, the agendas of all modules are refreshed.

        """
        if module is not None:
            lib.RefreshAgenda(module._ptr())
        else:
            lib.RefreshAllAgendas(self._env)