[rules-users] Writing a rule to find a fact that has a minimum value

Michael Anstis michael.anstis at gmail.com
Wed Dec 19 10:37:21 EST 2012


when
   $c : City( $p : population )
   not City( population < $p )
then
   // $c is the City with the smallest population

sent on the move

On 19 Dec 2012 15:22, "David R Robison" <drrobison at openroadsconsulting.com>
wrote:

> I want to write a rule that will select a fact that has the minimum
> value for an attribute. For example, find the city that has the minimum
> population. How would I write such a rule? David
>
> --
>
> David R Robison
> Open Roads Consulting, Inc.
> 103 Watson Road, Chesapeake, VA 23320
> phone: (757) 546-3401
> e-mail: drrobison at openroadsconsulting.com
> web: http://openroadsconsulting.com
> blog: http://therobe.blogspot.com
> book:
> http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526
>
>
>
> This email communication (including any attachments) may contain
> confidential and/or privileged material intended solely for the individual
> or entity to which it is addressed.
> If you are not the intended recipient, please delete this email
> immediately.
>
>
> _______________________________________________
> 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/20121219/f8560253/attachment-0001.html 


More information about the rules-users mailing list