As follow up, I included my domain model and an incomplete rule
*Problem facts*:
Entity:
weight: int
Bucket:
id: int
*Planning entity*:
EntityBucketAssignment
entity: Entity
bucket: Bucket (planning variable)
*The rule fragment is*:
when
$b1:Bucket($id:id)
$minSum:Number from accumulate(
Entity(
bucket==$b1,
$weight:wieght
),
sum($wieght)
)
not($b2:Bucket(id!=$id)
$minSum:Number from accumulate(
Entity(
bucket==$b2,
$weight:wieght
),
sum($wieght)
)
)
then
...
Could you correct this?
--
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.