Actually the Defrule(String) constructor wants the name of the rule, not the complete text. Building a Defrule object is a tricky thing. Instead, use the "eval()" method (which used to be called "executeCommand()") to pass the text of a new rule to the Rete object. As Bob said, you could also use "batch", which would let you specify the text of the rules using XML if you wanted -- XML is often more convenient for automated rule construction.

There's an "undefrule()" method you might also want to use.


On Jul 25, 2007, at 11:11 AM, Orchard, Bob wrote:

You should be able to add fuzzy rules exactly the same as non-fuzzy rules from Java. You could use the Defrule class to create the rule from a text string and then use addRule method with your Rete (FuzzyRete) instance. You might also use the batch method of your Rete (FuzzyRete) instance to load the rule(s) from a file.


Bob Orchard
National Research Council Canada Conseil national de recherches Canada Institute for Information Technology Institut de technologie de l'information
1200 Montreal Road, Building M-50     M50, 1200 chemin Montréal
Ottawa, ON, Canada K1A 0R6            Ottawa (Ontario) Canada K1A 0R6
(613) 993-8557
(613) 952-0215 Fax / télécopieur
[EMAIL PROTECTED]
Government of Canada | Gouvernement du Canada

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:owner-jess- [EMAIL PROTECTED] On Behalf Of Makibar Kepa
Sent: Wednesday, July 25, 2007 10:38 AM
To: [email protected]
Subject: JESS: Add, remove and update rules dinamically


Hello,

I´d like to add, remove and update rules dinamically in Jess from Java. We have several sensors from which we get a lot of data, and using data mining we want to create new rules. We would like to know if there is any way to introduce these rules in Jess.


Thanks.

---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
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