[rules-users] How do you know when all rules have finished

Wolfgang Laun wolfgang.laun at gmail.com
Fri Jan 22 10:39:07 EST 2010


On Fri, Jan 22, 2010 at 3:34 PM, drooler <david_wynter at yahoo.com> wrote:

>
> 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?
>
>
One way to do it: You use
   session.fireAllRules();
after you have inserted all your germs or whatever. Then, the updates to
increment the generate may be done, after which you call fireAllRules()
again.

Another way would be to have a rule with very low salience, which will
fire after all the regular ones. Here, the consequence might do the update
modifications, which should reactivate regular rules. And so on.



> 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.
>

Surely you don't expect an answer to this question? We have no way of
telling
what sort of influence the parameters have on the rules and/or facts, or how
to propose a way for assessing the outcome of the runs.

-W


>
> Thx.
>
> David
> --
> View this message in context:
> http://n3.nabble.com/How-do-you-know-when-all-rules-have-finished-tp134766p134766.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100122/5789f14a/attachment.html 


More information about the rules-users mailing list