Hi,
thanks for your reply Martijn. The solution should work
but is also rather inefficient because all facts would have
be stored twice. Maybe some Rete expert could argue, if such
a rule could be expressed direcly in a rete network (not considering
the specification language). If this is
I would not use this rule provided I understood the problem correctly as:
Find all facts foo where the length of foo.my-list equals the value of slot
foo.desired.
The proposed solution does not compare a length with foo.desired, and
binding of a multislot vaue should use a variable starting with
Lars,
If you think about it, there are only two ways to write a rule to
react to the absence of data:
1) Remember what the data was, so you can compare the present
situation to the previous situation;
2) Use a time machine, travel back in time, find out what the data
used to be, then
While reading the original posting I didn't (and I still don't) see the
reason for the rules you're looking for. Somewhere in the system, there
must be some action that adds or removes an element from the multislot
list (perhaps using (modify)). There you know what is going on, and the
old
Lars,
With activations and retractions I was thinking about something like this:
For every object in (c (m a b c)) assert a separate relation-fact (object ?x)
and keep a object-status template-fact for reference. Once an object gets
asserted it will be remembered by a object-status fact with
Dear all,
I like the proposal of reifying the remove action
as a separate fact. I haven't thought about that.
But I would rather go for option #2 if possible, given
that Jess already implements the kind of time machine
required for that. It is called Rete network and can
be activated by the
There is a small bug in the 'actually-remove-things-from-c' rule:
(remove ?c ?b?) should be (remove ?c ?x)
Anyway, is 'do-something-when-something-gets-removed-from-c' guaranteed
to fire? If 'actually-remove-things-from-c' fires before, then
'do-something-when-something-gets-removed-from-c' will
Hi all,
In the DJESS - how often the working memory/fact/repository has to be
replicated?
How about if my the information that I am going to fire is always change- so
this is means that my distributed information are also need to change.
Rgds
mnoor
It depends on whether you know a priori what objects can be added to the list
if you can use a rule with a not-condition without extra facts (to be exact you
need one: a fact with a list of all possible objects). Otherwise you need
shadow-facts like I did in the previous example. Every piece of
that's one of the performance limitations with full fact replication
approach for distributed pattern matching. In a situation where a
significant percent of the facts always change, the most optimal method is
to replicate just the indexes. Most modern RETE implementation like JESS
already index
Martijn Tromm wrote:
Lars,
With activations and retractions I was thinking about something like this:
For every object in (c (m a b c)) assert a separate relation-fact (object ?x)
and keep a object-status template-fact for reference. Once an object gets
asserted it will be remembered by a
Hi Hal, Peter Wolfgang,
The proposed solution does not compare a length with foo.desired, and
binding of a multislot vaue should use a variable starting with $?.
Hal, since you said you were satisfied with Peter's solution, I never posted
my reply which anticipated Wolfgang's almost verbatim.
Hi All,
I am having an issue writing rules for an application that has some
interesting requirements. Consider that we are categorizing say news feeds
into specific categories based on specific rule matches (news article contains
the fact NBA ,or NFL, or NHL, etc... so categorize as a
Yes, I think the missing $ was the issue that was preventing this
working. Will reformulate and try (should work).
Thx.
On Feb 20, 2008, at 3:28 AM, Wolfgang Laun wrote:
I would not use this rule provided I understood the problem
correctly as:
Find all facts foo where the length of
Thanks
Peter, do you still holding the patent? :)
Cheers
mnoor
On Wed, Feb 20, 2008 at 2:43 PM, Peter Lin [EMAIL PROTECTED] wrote:
that's one of the performance limitations with full fact replication
approach for distributed pattern matching. In a situation where a
significant percent of
I only posted an abstraction to figure out my problem, leaving out the
other details. What I'm doing is essentially modeling workflow which
manages to some target number of instances, so the fact in question is
further qualified by other attributes as you have indicated.
On Feb 20, 2008, at
Another way (assuming that indeed a pair of facts with equal-length
multislots is to be found):
(defrule find-eql
?b1 - (bar (list $?l1))
?b2 - (bar (list $?l2 :(= (length$ $?l1)(length$ $?l2
(test ( ?b1 ?b2))
=
(printout t lists $?l1 and $?l2 have equal length crlf)
)
This doesn't
On Feb 20, 2008, at 9:15 AM, Henrique Lopes Cardoso wrote:
There is a small bug in the 'actually-remove-things-from-c' rule:
(remove ?c ?b?) should be (remove ?c ?x)
Thanks, yes.
Anyway, is 'do-something-when-something-gets-removed-from-c'
guaranteed
to fire? If
Wolfgang wrote:
It seems that the object facts are retracted all right if some slot c.m is
reduced, but this does not trigger the second rule.
Why not?
This certainly is the case in Haley's eclipse-rule engine (Eclipse is a
derivative of Nasa Clips), which may be different on some points
I am adding a defTemplate to a Rete engine using engine.addDeftemplate,
and when I subsequently instantiate a peer engine using new Rete(engine),
the peer engine does not contain the defTemplate. Is this expected?
John S.
I should state, the work was the result of several years of research by Said
Tabet and myself. To answer your question, both said and I are listed as the
inventors.
peter
On Feb 20, 2008 10:25 AM, Mohd. Noor [EMAIL PROTECTED] wrote:
Thanks
Peter, do you still holding the patent? :)
Cheers
sounds like the rule is handling join/fork from a BPM graph?
On Feb 20, 2008 10:24 AM, Hal Hildebrand [EMAIL PROTECTED] wrote:
I only posted an abstraction to figure out my problem, leaving out the
other details. What I'm doing is essentially modeling workflow which
manages to some target
Martijn Tromm wrote:
Wolfgang wrote:
It seems that the object facts are retracted all right if some slot c.m is reduced,
but this does not trigger the second rule.
Why not?
Because
?os - (object-status (obj ?x) (status p))
contains a typo. Omit (status p) and it works fine.
Nothing so fancy :). All I'm currently doing is simply allocating
new process instances based on a target number of instances - either
adding or subtracting - on various hosts. Kind of a quick and dirty
allocation scheme for a demo.
On Feb 20, 2008, at 8:02 AM, Peter Lin wrote:
sounds like
I think you must time-stamp your facts (in an additional slot), and base
your rules in those time-stamps.
Henrique
Marco Zappatore wrote:
Dear Jess Developers,
is there a way to compare the exact time at which two
or more facts have been added to the working memory?
For instance:
-asserts
You have to make time explicit. Look at the FAQ (http://
www.jessrules.com/FAQ.shtml) for a simple rule that manages a clock
fact, so your rules can know what time it is; then you need to add a
slot to your templates to hold a timestamp. You could use the default-
dynamic slot property to
I am adding a deftemplate to a Rete engine using
engine.addDeftemplate, and when I subsequently instantiate a peer
engine using new Rete(engine), the peer engine does not contain the
deftemplate. Is this expected?
I misstated the problem. In the engine from which I am creating the
peer, the
Oh, no. Peering was added in 7.1, wasn't it? I just looked at the
online doc chapter for Embedding in 7.0 and the section on peering
isn't there.
I am adding a deftemplate to a Rete engine using
engine.addDeftemplate, and when I subsequently instantiate a peer
engine using new Rete(engine),
On Feb 20, 2008, at 2:12 PM, Adair, John wrote:
I am adding a deftemplate to a Rete engine using
engine.addDeftemplate, and when I subsequently instantiate a peer
engine using new Rete(engine), the peer engine does not contain the
deftemplate. Is this expected?
I misstated the problem. In
Now, you say something about a warning, and so maybe you're talking
about the JessDE? In that case, you need to make sure the
Userfunction class is on the Java build path of your project so that
the editor can find it.
Yes, I'm using the JessDE plugin for Eclipse and I have
such a hierarchy
30 matches
Mail list logo