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!