[gecode-users] Valid Domain Recomputation

Christian Schulte schulte at imit.kth.se
Mon Aug 7 13:55:16 CEST 2006


No, unfortunately not. But you cannot expect miracles here: Invoking
complete search for each variable value pair is bound to cost something.

One could use ideas similar to branch-and-bound that records what
variable-value combinations have already been recorded. I know that Mikael
Lagerkvist (zayenz at kth.se) has been toying with this idea but he is
currently on holidays.

Cheers
Christian


--
Christian Schulte, http://www.imit.kth.se/~schulte/ 
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Efstratios Kalogirou
Sent: Monday, August 07, 2006 10:50 AM
To: users at gecode.org
Subject: [gecode-users] Valid Domain Recomputation


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





More information about the gecode-users mailing list