On Thu, 18 Apr 2013 09:36:13 +0200, Guido Tack <t...@gecode.org> wrote:
Hi Tias,
it's slightly complicated (and it has changed in Gecode 4). The default
search is implemented in gecode/flatzinc/flatzinc.cpp in function
createBranchers, and the defaults in 4.0.0 are
branch(*this, iv_sol, INT_VAR_AFC_SIZE_MAX(0.99), INT_VAL_MIN());
branch(*this, bv_sol, INT_VAR_AFC_MAX(0.99), INT_VAL_MIN());
branch(*this, fv_sol, FLOAT_VAR_SIZE_MIN(), FLOAT_VAL_SPLIT_MIN());
branch(*this, sv_sol, SET_VAR_AFC_SIZE_MAX(0.99), SET_VAL_MIN_INC());
where iv_sol are the variables mentioned in the output statement and not
mentioned in an explicit search annotation, and
branch(fzs,fzs.iv_aux,INT_VAR_AFC_SIZE_MAX(),INT_VAL_MIN());
branch(fzs,fzs.bv_aux,INT_VAR_AFC_MAX(),INT_VAL_MIN());
branch(fzs,fzs.sv_aux,SET_VAR_AFC_SIZE_MAX(),SET_VAL_MIN_INC());
branch(fzs,fzs.fv_aux,FLOAT_VAR_AFC_SIZE_MAX(),FLOAT_VAL_SPLIT_MIN());
where iv_aux are variables introduced by mzn2fzn that are not
functionally defined.
I'm planning to introduce annotations
default_{int,bool,set,float}_search that you can stick on the solve item
to change the default for the different variable types - would that be
useful?
Yes.
But since your asking, would there be a way to express the exact search
strategy (on the *_sols) in minizinc itself, instead of introducing a new
default_* annotation?
For example:
int_search(IntVars, size_afc_max(0.99), indomain_min, complete);
(I guess the only difference with what is available now is adding the
0.99?)
Kind regards,
Tias
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users