[gecode-users] Value assignment
Debdeep Banerjee
debdeep.banerjee at rsise.anu.edu.au
Wed Sep 19 11:12:41 CEST 2007
hi,
In some cases when I know my problem is solved, I want to assign all
non-assigned variables to -1 ( -1 is included in their domain). I wrote
a custom branching. when i know I have assigned all the variable that
should be in the solution, I know I am done. The what i did is post
constraint like following
for ( int i = 0; i < transitions.size(); ++i)
{
IntVarView tr = transitions.get(i);
if ( !tr.assigned())
{
IntVar v = transitionsVars.get(i);
eq(home, v, CSPOrderBasedEnc2.NOT_IN_PLAN);
}
}
and return null from my "JavaBranchingDesc description(Space home)"
method. But I am getting a JVM error.......
what I am doing wrong....or what is the best way to do it?
Any help will be highly appreciated.
With regards
Debdeep
More information about the gecode-users
mailing list