[rules-users] Tuples discrimination
Eymeric VIEUILLE
evieuille at gfi.fr
Wed Sep 12 09:33:55 EDT 2007
Hi !
After solving the problem of Out of Memory, I come back with another
question :
I currently implemented rules that give me tuples like this (in the
agenda, before firing rules) : M1xM2xM3xM4.
But now, I want to select THE tuple that as M1xM2xM3xM4 with a property
p as little as possible to execute the right hand of the rule.
For sample, I have the two following tuples activated in the agenda :
M'1(date = "09/25/2006") M'1(date = "09/25/2006")
M'2(date = "09/26/2006") M'2(date = "09/26/2006")
M'3(date = "09/29/2006") M"3(date = "09/27/2006")
M'4(date = "09/31/2006") M"4(date = "09/30/2006")
I would like the second tuples to be selected for executing the right
hand of the rule because dates of M'2, M"3, M"4 are the closest dates
compared to M'1.
The problem is that I do not know on what layer this selection must be
made : in the Left Hand of the rule ? Or in a AgendaFilter (selecting
the better tuple to use) ?
For the LH, I thought to the "accumate" CE, but I am affraid to have
unreadle rules (impossible to maintain). And I don't see quite well how
to implement this with "accumulate" CE (knowing that I use a DSL).
For the AgendaFilter, I saw that only the current activation is
accessible...so impossible to compare whith other tuples
values....Moreover, I am affraid to make performance fall.
Is this selection possible ? And what would be the best practice to
implement it ?
Regards,
Eymeric.
More information about the rules-users
mailing list