[rules-users] How to even out n buckets in Drools Planner?

aitchnyu jesvinj at technovia.co.in
Sat Feb 4 09:18:26 EST 2012


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-Planner-tp3713200p3715546.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list