[gecode-users] Branching and FlatZincGecode
Guido Tack
tack at ps.uni-sb.de
Tue Jan 27 16:34:54 CET 2009
Morten Boysen wrote:
> I am trying to add new propagators to the FlatZincGecode space, and I
> have some question regarding this:
>
> 1) What is the defualt variable order for the FlatZincGecode space?
First branch over the IntVars with VAR_NONE, VAL_MIN, then over the
BoolVars with NONE, VAL_MIN, then over the SetVars with NONE,
VAL_MIN_INC.
> 2) If I want to add my own branching heuristic, I believe I need to
> remove the branchings posted to the FlatZincGecode space or else my
> branching will not have any effect. Is this true?
Yes, right. All variables will be assigned by the default branchings
before your branching is even considered.
> 3) I want to make a branching that follows the standard "fail-first"
> heuristic, that is, choose the value with the smallest domain possible
> and then use a special value heuristic. As I understand I need to
> implement a branching for the integer variables in the FlatZincGecode
> space and a branching for the boolean variables. If I understand it
> correctly, this means the search will process all integer variables
> first and then the boolean variables or vice verse, depending on the
> order the branching were posted to the space (the branching posted
> first
> is tested first). Is this correct?
Yes, that's right. For your own branching, you can reuse the
ViewValBranching class, and instantiate it with the BySizeMin view
selector class and your own value selector. Then you can add support
for that branching to the FlatZinc parser in gecode.cc, in the
function parseSolveAnn. That's also the place where you can disable
the default branching. Let us know if you need more help.
Cheers,
Guido
More information about the gecode-users
mailing list