[gecode-users] Search and Recomputation

Max Ostrowski ostrowsk at cs.uni-potsdam.de
Fri Nov 18 13:29:22 CET 2011


I have 2 general questions on how search works in gecode.

Search and Propagation

I just read on page 306 in "Modelling and Programming with Gecode", that
during search "pristine" clones are stored, where no propagation was made.
How is this possible. Considering the simple case, without
recomputation, having a full "trail" of spaces.
having space[0] to space[n] for the first n decision levels.
Now i do a choice on some variable x==1.
Now i would expect doing some propagation.
Do you copy the space[n+1], do some propagation, and afterwards delete
the propagated space to do another choice ?
Do you always propagate all constraints with all choices without storing
intermediate, usable, results of this propagation?




2nd Question:

Using Recomputation:


If i have stored a space S and done some choices C1,C2,C3

S->C1->S1->C2->S2->C3->S3

and now recognize that space S3 is failed and want to "backtrack" to S2
i would do

S->commit(C1)
S->commit(C2)

This should lead to a space equivalent to S2. Is this space already
propagated ?
If i now call status() on S, is any propagator invoked?
Does commit redo the propagation?
Does it just restore the effects of the propagation?
Does it just repost the decision (as i could do by hand saying post(x==1) )?

Best,

Max Ostrowski




More information about the users mailing list