[gecode-users] probability to apply constraint

Richard Portelli richard.portell at gmail.com
Mon Jun 9 14:48:16 CEST 2014


Hello,
Is it possible to apply a constraint with a probability associated?
For example I have an array of 10 integers which has two constraint :
1) The sum should be equal to 100;
2) The numbers of even array index should be equal to 0.

To the 2) constraint, I would like to add a probability saying that the
constraint apply in 80% of the cases.
I know that what could work would be for each even array index to pick a
number between 0 and 100 and apply the rule dynamically depending on the
number picked (<80 -> apply, otherwise doesn'y apply).
However, I would like to know if there would be a more elegant way.

Cheers

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140609/c34ec82e/attachment.html>


More information about the users mailing list