Example #1
0
        /// <summary> the implementation just propogates the assert down the network
        /// </summary>
        public override void assertFact(IFact fact, Rete engine, IWorkingMemory mem)
        {
            IAlphaMemory alpha = (IAlphaMemory)mem.getAlphaMemory(this);

            alpha.addPartialMatch(fact);
            propogateAssert(fact, engine, mem);
        }
Example #2
0
 /// <summary> the implementation will first check to see if the fact already matched.
 /// If it did, the fact stops and doesn't go any further. If it doesn't,
 /// it will attempt to evaluate it and Add the fact if it matches.
 /// </summary>
 /// <param name="">factInstance
 /// </param>
 /// <param name="">engine
 ///
 /// </param>
 public override void assertFact(IFact fact, Rete engine, IWorkingMemory mem)
 {
     if (evaluate(fact))
     {
         IAlphaMemory alpha = (IAlphaMemory)mem.getAlphaMemory(this);
         // we set the time of the last match
         alpha.addPartialMatch(fact);
         propogateAssert(fact, engine, mem);
     }
 }
Example #3
0
 /// <summary> the implementation will first check to see if the fact already matched.
 /// If it did, the fact stops and doesn't go any further. If it doesn't,
 /// it will attempt to evaluate it and Add the fact if it matches.
 /// </summary>
 /// <param name="">factInstance
 /// </param>
 /// <param name="">engine
 ///
 /// </param>
 public override void assertFact(IFact fact, Rete engine, IWorkingMemory mem)
 {
     if (evaluate(fact))
     {
         IAlphaMemory alpha = (IAlphaMemory)mem.getAlphaMemory(this);
         alpha.addPartialMatch(fact);
         // if watch is on, we notify the engine. Rather than
         // create an event class here, we let Rete do that.
         propogateAssert(fact, engine, mem);
     }
 }