The clear is used for running the system multiple times. For example,
the user starts the program, gets his results, and then wants to repeat
the process (maybe with other input data). I want to ensure that
everything from the last use gets clean. That's why i need a clear.
In the current version, the user will have to restart the application,
because there is information in the working memory that will probably
make conflicts with the new data (and we don't want that).
But this is not even important. Doesn't matter if i need to use, or i
have to use it, i simply wanna use it, and since is an available jess
command, why not? The question to make is: why when i use a clear
statement the system doesn't work, and if i don't use it works perfectly?
Also I don't understand where is the big problem for inserting shadow
facts through a concurrent thread. The rules, templates and functions
are loaded into jess. I want to insert facts (shadow facts), and see
what results i get. I really don't see anything awkward.
Some people had contact me in order to get more information about how i
implement the process. Here it goes some more information:
- My rete is a java object, using jessWin.getRete().
- I load the templates and rules through the batch function, using
rete.batch("file.clp).
- I also use the clear through the rete interface, like rete.clear().
- For run-until-halt, i use the function eval from rete, like:
rete.eval("(run-until-halt)") -> this is executed in a separated thread.
The stopping part is not important for now, since i get the error when i
tried to run jess.
Regard,
Joao
-unclassified
On 20-08-2009 15:09, Ernest Friedman-Hill wrote:
On Aug 20, 2009, at 4:24 AM, Joao Carlos Mourao wrote:
Other important note is that when i don't use clear, and just start the
system from scratch (batch - reset - and run-until-halt), the rule-based
system works perfectly. The problem arises when i put a clear in the
beginning of the chain process.
Well, putting aside the problem that
"(start-thread-for-inserting-shadow-facts)" should never be called,
let me ask you this: what is the "clear" for? What is defined before
the "clear", and why do you need to clear it? And are you absolutely
sure that you're restoring everything that needs to be restored after
the "clear?"
---------------------------------------------------------
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].
--------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
Disclaimer:
If you are not the intended recipient of this email, please notify the sender and delete it.
Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden.
Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s).
Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------
begin:vcard
fn;quoted-printable:Jo=C3=A3o Mour=C3=A3o
n;quoted-printable;quoted-printable:Mour=C3=A3o;Jo=C3=A3o
org:Thales;Above Water Systems
adr:;;;Hengelo;;;Netherlands
email;internet:[email protected]
title:THALES NETHERLANDS B.V.
tel;work:2640
note:-unclassified mail-
version:2.1
end:vcard