On Mon, 7 Feb 2000, friedman_hill ernest j wrote:
> reset() removes all the facts, then asserts the fact (initial-fact),
> then asserts all the facts that appear in any (deffacts)
> constructs. The entire implementation of the Jess (reset) function is
>
> case RESET:
> context.getEngine().reset();
> break;
>
> So clearly the two do the same thing.
>
Hi, my application creates a rete object, then immediatly executes a reset
command, this action asserts the initial fact, as it must do it.
Later each determined time (a simulation step) it receives an object that
is included in the KB in this way:
f = new Funcall("definstance", rete);
f.add(new Value("element", RU.ATOM));
f.add(new Value(objInMemory));
f.execute(rete.getGlobalContext());
After this, the program executes the method:
rete.run();
The first time the rules that must be fired are fired. I want now to clean
the KB of all the facts, therefore the program executes:
rete.reset();
rete.executeCommand("(facts)");
Apparently the facts are not erased because the next command (the
above facts) show me all the facts, even though I have executed the reset.
The big problem is that the rule that must be fired only once in each step
of the simulation recognizes the previous facts and the rule is fired
several times in each step. Is this right? or Have I misunderstood the
reset function?
Thank you in advance...
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
Re: JESS: A question about reset function.
Calicrates Policroniades Borraz Tue, 8 Feb 2000 09:43:38 -0800
- JESS: A question about reset function. Calicrates Policroniades Borraz
- Re: JESS: A question about reset func... Calicrates Policroniades Borraz
- Re: JESS: A question about reset func... ejfried
