Hello,
I have a problem with two rules which do nearly the
same. They all modify an item with a slot weight. The
new value of weight results from multiplying with
two different factors. Here is the code:
(defrule MODULE1::rule1)
(declare (no-loop TRUE))
(factor1
(factorValue ?value)
?item <- (item
(weight ?weight))
=>
(modify ?item
(weight (* ?weight ?value)))
)
(defrule MODULE1::rule2)
(declare (no-loop TRUE))
(factor2
(factorValue ?value)
?item <- (item
(weight ?weight))
=>
(modify ?item
(weight (* ?weight ?value)))
)
The "no-loop" declaration works fine with one
single rule modifying a fact used on the LHS of
the rule. But in the situation mentioned above
the two rules produce a infinite loop. That's
exactly what I expected or feared, because it
looks like circumventing the "no-loop" declaration.
I could combine the two rules to one rule. But
there are more than two rules, which are not that
straightforward. And it would be much more
extensible.
Does anyone know a "good" way to realize this?
Thank you in advance
Sven Siorpaes
--------------------------------------------------------------------
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]
--------------------------------------------------------------------