chocoteam / choco-solver

An open-source Java library for Constraint Programming
http://choco-solver.org/
BSD 4-Clause "Original" or "Old" License
683 stars 137 forks source link

Add frequency + fallback value selector #1057

Closed cprudhom closed 10 months ago

cprudhom commented 11 months ago

There's no doubt that BIVS is very useful. However, it is also time-consuming and it is not always appropriate to use it. I propose, in this PR, to make it possible to indicate an alternative frequency and strategy.

jgFages commented 11 months ago

I agree that BIVS is costly. However, I would prefer the condition to be a generic function : IntVar -> Boolean. One implementation could be to be based on the number of backtracks, another could be based on the variable's name or domain. It could also be random...

cprudhom commented 11 months ago

Ok, I can change to a more functional behavior even if sometimes when there's too much freedom you don't know what to choose :)

cprudhom commented 10 months ago

I propose to define the default application of BIVS each time, i.e. v -> true in order to keep the performance tests unchanged.