[gecode-users] mzn-gecode search strategy
Guido Tack
tack at gecode.org
Tue Apr 30 02:41:58 CEST 2013
This is available in the svn trunk now. The AFC and activity searches can be specified using the following annotations:
annotation afc_min;
annotation afc_size_min;
annotation afc_max;
annotation afc_size_max;
annotation activity_min;
annotation activity_size_min;
annotation activity_max;
annotation activity_size_max;
And we have annotations for default search:
annotation int_default_search(ann: varsel, ann: valsel);
annotation bool_default_search(ann: varsel, ann: valsel);
annotation set_default_search(ann: varsel, ann: valsel);
annotation float_default_search(ann: varsel, ann: valsel);
The decay is set globally using the -decay command line option.
Cheers,
Guido
On 24/04/2013, at 11:02 PM, Guido Tack <tack at gecode.org> wrote:
> On 24/04/2013, at 20:32, Tias Guns <tias.guns at cs.kuleuven.be> wrote:
>
>> On Thu, 18 Apr 2013 09:36:13 +0200, Guido Tack <tack at 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?)
>>
>
> Yes, that's possible. I'll add support for this next week.
>
> Cheers,
> Guido
>
>
>>
>> Kind regards,
>> Tias
>>
>> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>>
>> _______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
More information about the users
mailing list