[gecode-users] Valid Domain Recomputation

Efstratios Kalogirou efkalog at gmail.com
Mon Aug 7 10:50:24 CEST 2006


Hi all,

I am using Gecode to create a function that receives a variable x and a
value v for that variable from the user and returns only the valid values
for all the variables (some of them are excluded because of constraint
propagation after the assignment x=v). What I am doing is :
1. Assign variable x value v
2. For all the variables i of this new space which I call FATHER SPACE
3.    For all the values j  of each variable
4.       Clone FATHER to TEMP Space and assign inside TEMP variable i= value
j
5.           Get the Status of the TEMP Space. if SS_SOLVED do nothing, if
SS_FAILED post i!=j in the FATHER SPACE. If SS_BRANCH I am using a search
engine to check weather there is a solution or not. If there is, do nothing,
otherwise post again i!=j in the FATHER SPACe.
6.       Delete TEMP

By posting i!=j I manage to exclude from my father space the values that are
no longer valid. This works fine, but steps 1-5 are repeated many times and
each time I perform this valid domain check, i have to go through all the
variables and all the values, copy the father space to temp, and get the
status of the temp. This slows things down a lot and I have been wondering
if there is a faster way to do this. Any ides?

Best,
Stratos Kalogirou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20060807/61bbb217/attachment.htm>


More information about the gecode-users mailing list