hi, Ernest It does make sense. A couple of more questions on implementation.Suppose that we want to modify the existing fact which is an unordered fact with many slots:
Benifit of modification: =============== It is expensive to retract that fact and create a new one if that fact holds many entities. How to modify an existing fact: ====================== There is a jess function to do this: (modify <fact-specifier> (<slot-name> <value>)+) But in its description: ....The original fact is retracted. The fact-ID of the new fact is returned. ...... Performance of (modify) function: ======================== It seems (modify) = (retract) + (assert) with new value. If this is true, this will be against our "Benifit of modification". thanks in advance gang >From: [EMAIL PROTECTED] >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: JESS: Threads. >Date: Thu, 5 Sep 2002 08:38:35 -0700 (PDT) > >I think Gang Liu wrote: > > hi, all > > I borrow this topic to ask another question. Thanks in advance! > > > > Requirement: > > =========== > > We have two rules. The values are hold by facts. We want to pass > > values from the first rule to the second rules. > >Generally, it's better to think of working memory as a "database" of >information, which the rules all share; this leads to a clearer answer >to your question below. > > > [Should we modify an existing fact, or create a new fact?] > >If the facts are akin to temporary variables -- i.e., they hold a bit >of information with a finite lifespan -- then, like a temporary >variable, it's best to create a new one for a new purpose, rather than >reusing an old one. > >However, if the facts represent entities, as a Java object often does, >and the new information adds to or modifies the character of that >entity, then you should modify the existing fact. > >Make sense? > >--------------------------------------------------------- >Ernest Friedman-Hill >Distributed Systems Research Phone: (925) 294-2154 >Sandia National Labs FAX: (925) 294-2234 >Org. 8920, MS 9012 [EMAIL PROTECTED] >PO Box 969 http://herzberg.ca.sandia.gov >Livermore, CA 94550 > >-------------------------------------------------------------------- >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] >-------------------------------------------------------------------- > _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -------------------------------------------------------------------- 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] --------------------------------------------------------------------
