[gecode-users] commit on already-assigned variable

kellen at cretin.net kellen at cretin.net
Mon Mar 31 12:59:41 CEST 2014


> This is most likely okay and can happen due to recomputation during search:                                                                                                                                                                                                                                                                                              
> it might be the case that the variable has already been assigned by                                                                                                                                                                                                                                                                                                      
> propagation during recomputation before the commit operation is executed.                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                           
Is the correct behavior in this case to fail if commit() attempts to commit                                                                                                                                                                                                                                                                                                
a value which is already outside the possible range?                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                           
It seems like with IntVars this would be the case. e.g.                                                                                                                                                                                                                                                                                                                    
variable x assigned to 13, i.e. the range [13,13]                                                                                                                                                                                                                                                                                                                          
commit with n = 10                                                                                                                                                                                                                                                                                                                                                         
choice 0: x <= 10 --> empty domain, FAILED                                                                                                                                                                                                                                                                                                                                 
choice 1: x > 10  --> no change                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                           
My case is similar:                                                                                                                                                                                                                                                                                                                                                        
variable x assigned to 1010, i.e. the domain [1010,1010]                                                                                                                                                                                                                                                                                                                   
commit with n = 0001 (i.e. choose this bit to branch upon)                                                                                                                                                                                                                                                                                                                 
choice 0: set bit specified by n to 0 --> no change                                                                                                                                                                                                                                                                                                                        
choice 0: set bit specified by n to 1 --> fail?                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                           
Cheers,                                                                                                                                                                                                                                                                                                                                                                    
Kellen  



More information about the users mailing list