[rules-users] SolutionInitializer for Nullable Planning Variable

newbie dspecialist18 at yahoo.com
Sat Nov 23 21:20:09 EST 2013


I created a custom solver which assign planning variables to planning
entities. I have a simple rule checking if  there are no assign variable
that adds negative soft constraint. But when I assigned my planning variable
it increases the negative score instead of reducing it. I have for example
12 entities and my starting score was 
0/-12.But when I initialized it with 4 variables it increases to 0/-16.

rule "null variable"

    when
    	$myEntity : Entity( variable == null )
    then
    	scoreHolder.addSoftConstraintMatch(kcontext, 0, -1);
end



--
View this message in context: http://drools.46999.n3.nabble.com/SolutionInitializer-for-Nullable-Planning-Variable-tp4026901.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list