[rules-users] Re: Is this scenario suitable for using Drools?
Steven Williams
stevearoonie at gmail.com
Wed Apr 23 04:15:17 EDT 2008
without knowing how you are accessing the database your two algorithms come
down to something like:
Alg. 1
max(select max(p) from y, select max(t) from z)
Alg. 2
select min(p) from y + select min(t) from z
which is basically the same as what Michael has proposed.
Personally I think if you are already using Drools then this would fit, but
it wouldn't seem like enough of a reason to introduce Drools on its own.
cheers
Steve
On Wed, Apr 23, 2008 at 2:27 AM, Cheng Wei Lee <zhenwei.li at gmail.com> wrote:
> I've 2 algorithms to calculate the cost of a product. At any one time,
> there is only 1 algorithm in use. Initially algorithm 1 will be the default.
> Subsequently, the decision to use which algorithm will depend on customers
> feedback. The algorithms are:
>
> Algorithm 1:
> Cost = MAX(P1, T1, P2, T2, P3, T3, ...)
>
> Algorithm 2:
> Cost = MIN(P1, P2, P3, ...) + MIN(T1, T2, T3, ...)
>
> The values of P1, P2, ... are stored within a database. The number of Ps &
> Ts are unknown but can be determined by querying the database, Would drools
> be a good option to use to store the algorithms? If so, how could I be able
> to retrieve the values of P1, P2, etc from the database from within drools?
>
> Thanks!
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Steven Williams
Supervising Consultant
Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
steven.williams at objectconsulting.com.au
www.objectconsulting.com.au
consulting | development | training | support
our experience makes the difference
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080423/fa6ee482/attachment.html
More information about the rules-users
mailing list