[gecode-users] mod constraint branching

Alin alin_pt at yahoo.com
Sat May 14 21:39:34 CEST 2011


Hallo,

 I have been trying the mod constraint, but I encountered kind of a problem with
the branching:

[details about what I did]
I have resources that can do a job only on a certain day
so i set the time to be the same as the resource available that day

mod(*this, resources[i], iDays, start_times[i]);

[actual problem]
my problem is that when doing the branching
if I do:

branch(*this, resources, INT_VAR_NONE, INT_VAL_RND);

I get correct values for resources, but 

branch(*this, resources, INT_VAR_NONE, INT_VAL_MIN);

will return incorrect values,
for example: resource[i] will be set to 0,
             and start_times[i] will be 2
             
             while iDay is constant (7)

why does this happen ?
shouldn't branching determine just the order of the elements that are searched ?
shouldn't the value be correct indifferent of the branching type ?




More information about the users mailing list