1. Home
  2. Working Memory

Working Memory

◷ Reading Time: 1 minute

In an inference engine, the working memory is a memory into which all of the facts will be asserted. As a result, the engine Rete cycle will be activated on different nodes.

Working memory has the following interface to interact:

// Summary:
//     Working memory of the engine that holds all of the facts as FlexRule.Inference.Rete.WMElement
public interface IWorkingMemory
{
    // Summary:
    //     Numbers of available facts inside the memory
    int Count { get; }
 
    // Summary:
    //     Filters and finds facts based on type and provided filter
    //
    // Parameters:
    //   filters:
    //
    // Type parameters:
    //   T:
    IEnumerable<T> Find<T>(params Func<T, bool>[] filters);
    //
    // Summary:
    //     Lists all of the facts in the working memory
    IEnumerable<object> List();
}

This interface makes your application capable of querying the memory via API when it is required.

Updated on July 16, 2019

Was this article helpful?