Based just on this pseudocode, the two things I can say is that after the call to (clear), if the function "insert-rules-and-templates-using- batch" were a deffunction, it would be undefined; same for "start- thread-for-inserting-shadow-facts". Also, it seems odd that you're running the engine with run-until-halt before adding your facts on the next line; normally you'd want to do that in the other order. But as I said, since this isn't real code, it's hard to say what's wrong. "clear", in general, should return the Jess engine to its initial state, and everything should continue to work fine after that (except that everything previously defined is gone, of course.)


On Aug 18, 2009, at 3:41 AM, Joao Carlos Mourao wrote:

Hello,

I'm trying to implement a method to restart the rule engine by using the
clear command. The idea is before running, clear everything (using
clear), add all the facts available, and run the engine with the command (run-until-halt). Although, every time i make use of clear command, the
rule engine blocks, and even if i insert new rules or facts, no rule
becomes active, its seems that is blocked. The procedure that i follow
is with two functions, start and stop, like following:

start:
   (clear)
   (insert-rules-and-templates-using-batch)
   (reset)
   (run-until-halt)
   (start-thread-for-inserting-shadow-facts)

stop:
   (halt)

Can anyone tell me what i'm doing wrong?

Thanks in advance,

Joao

------------------------
unclassified


---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com







--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------

Reply via email to