Regarding your first question, it depends on how you want to model your
application:
* You can, for instance, just call fireAllRules() from your application code
for the current generation. The engine will fire all rules it can fire and
when the agenda is empty, return control to the application. Then you update
your current generation object from the application code, and call
fireAllRules() again, what will fire all rules for the new current
generation, etc.
* If you want to implement the change of generation as a rule itself, just
place that rule in a subsequent ruleflow-group or agent-group, or if you are
not using groups, just make the rule have the lowest salience. This way, all
other rules will fire first. The last rule to fire is the one that updates
the generation counter to the next value, restarting the rules for the next
generation.
Edson
2010/1/22 drooler <david_wynter(a)yahoo.com>
Hi,
New to Drools. Could not find a specific answer to this, but it may be
there
in the forum somewhere. I have written a rule set for testing the 'fitness'
of 3000 generations of organizms. The rules always test fitness against the
last dozen or so generations. So I need to start at generation 13 and then
when all rules have run against that generation and referencing the
previous
12 I need to increment the 'current' generation so that it points at
generation 14. All rules are written relative to that current generation.
How do I know when to increment to the next generation as I need to be
certain that Drools has fired all the rules for the current generation?
Once I have done that, I have some modification objects to put in working
memory that influences the 'fitness' of the generations. These modification
objects have up to 5 parameters. I what to be able to vary these 5
parameters and retest. Rather than tweak them and re run the 3000
generations is there a way to use the Planner where different moves can
alter the 5 parameters and determine a score to measure whether the
modifications are enduring over many generations. In other words the score
does not relate to an individual generation but a lasting affect over many
generations.
Thx.
David
--
View this message in context:
http://n3.nabble.com/How-do-you-know-when-all-rules-have-finished-tp13476...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @
www.jboss.com