Closed krishvk closed 1 year ago
It is not really the case that Gecode hangs from the element constraint. When you use random branching on the a variable the domain will become very large lists of segments, while branching on the minimum value while keep the domain of the variable as just a couple of segments.
While Gecode (and most constraint programming systems) can handle large domains, it is mostly feasible when the domains are mostly used for bounds.
So closing with a works as intended, and I hope you can solve your larger problem.
I am just getting started with Gecode element constraints. It seems to hang when the list elements are too far apart.
Here is the full program to demonstrate the issue, with a few knobs (MACROS) to change the behavior.
To run (Assuming an envvar GECODE_HOME pointing to the GECODE installation)
Here is the summary of the results
Why is GECODE unable to optimize for large numbers just with INT_VAL_RAND? What am I missing?
PS: The example might not make sense to use a constraint solver, but please note that it is stripped down to demonstrate the issue and there are more variables involved in the actual constraint.