I have n buckets and mn entities. Each bucket must have m entities. Each
entity carries a weight. My objective is to even out the total weight per
bucket, make them close to the average.
For example, a solution like this is skewed, see their sums.
bucket 1: 1,2,4,5=12
bucket 2: 6,8,9,6=29
bucket 3: 7,7,4,7=25
The same entities may be placed into buckets like this. This is more
desirable as the sums are closer to the mean (and each other); one does not
dominate the others.
bucket 1: 1,8,7,4=20
bucket 2: 6,2,9,6=23
bucket 3: 7,7,5,4=23
*Question:*How do I write a rule for this:
for each bucket, penalize (with soft scores) a bucket whose total
entity.weight differs from the average total entity.weight of the buckets.
Will I get the same results when I penalize each bucket for differing with
*each other*?
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-even-out-n-buckets-in-Drools-Pla...
Sent from the Drools: User forum mailing list archive at
Nabble.com.