re once for every bag for which this
condition holds.
-Original Message-
From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On
Behalf Of Aurelien Mazurie
Sent: Wednesday, July 31, 2013 1:13 AM
To: jess-users
Subject: Re: JESS: [EXTERNAL] Dynamic rule matching in the LHS
Thank yo
On 30/07/2013, Aurelien Mazurie wrote:
> Thank you very much for this answer. It seems like 'forall' will fire the
> rule only if all the 'bag-of-items' facts are validated (i.e., if all of
> them have 'item' facts with the names listed in their 'names' slot). Is that
> correct?
Yes.
>
> If yes,
Thank you for this tip. It is not what I am trying to achieve, however. I must
apologize if my original email was misunderstood.
My goal is to write a rule that would fire for any 'bag-of-items' fact whose
item names, as listed in a multislot, are all represented by 'item' facts. The
rule shoul
Thank you very much for this answer. It seems like 'forall' will fire the rule
only if all the 'bag-of-items' facts are validated (i.e., if all of them have
'item' facts with the names listed in their 'names' slot). Is that correct?
If yes, then what I am trying to do is slightly different. I do
Another "old skool" way of doing it using predicate constraints is...
(clear)
(deftemplate item (slot name))
(deftemplate bag-of-items (multislot item-names))
(defrule fire-for-all-members-in-bag
; If you have a bag of item names ...
(bag-of-items (item-names $?item-names))
; and there is a
set (initial-fact).
-Original Message-
From: owner-jess-us...@sandia.gov [mailto:owner-jess-us...@sandia.gov] On
Behalf Of Aurelien Mazurie
Sent: Friday, July 26, 2013 4:56 PM
To: jess-users
Subject: JESS: [EXTERNAL] Dynamic rule matching in the LHS
Dear Jess users,
I am wondering how t
Dear Jess users,
I am wondering how to write a rule that would dynamically match multiple
facts based on their names.
Let say I have two types of facts; one representing the information that an
item (with a given name) exists, and the other one representing a list of
items (e.g., as a list of name