Re: Random labeling options for CLPFD

From: <lausgans_at_gmail.com>
Date: Sun, 8 Nov 2015 07:54:32 +0300


> 5 нояб. 2015 г., в 20:10, <lausgans_at_gmail.com> <lausgans_at_gmail.com> <lausgans_at_gmail.com> написал(а):
>
>>
>> 5 нояб. 2015 г., в 16:04, Michael Hanus <mh_at_informatik.uni-kiel.de> написал(а):
>>
>> Sure, I could do it, but since it is an undocumented feature,
>> please could you explain the difference between random_value
>> and random_variable (in order to put the right documentation
>> comment into the library)?
>>
>> Best regards,
>>
>> Michael
>
> Michael, I will try.
>
> random_variable is the variable selection strategy: the random variable is selected next for instantiation (so stochastic not yet tried permutation per solution in contrast to controlled vars traversal in other strategies).
> random_value is the value order option: the domain is explored for instantiation in random order (set random not yet tried value within domain to selected variable instead of incrementation with up/down orders).
>
> They may be used separately for a single solution with either random permutation or random set of values requirements, or combined together for random distribution when multiple solutions are needed. The only current problem I know is that they both set the seed, so when used together, the option order matters: https://github.com/SWI-Prolog/swipl-devel/blob/master/library/clp/clpfd.pl#L1496 Not a case for time-dependent seed value though :-)
>
> Alex

P.S.: This also means that current comment in CLPFD/CLP.FD for random_variable is incorrect (but fits random_value). Sorry for this! I was as well confused due to absent notes on these two swipl labeling options.
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry

Received on Tue Nov 10 2015 - 11:23:48 CET

This archive was generated by hypermail 2.3.0 : Mon Sep 16 2019 - 07:15:09 CEST