[gecode-users] strange behaviour of SetVarArray
Guido Tack
tack at ps.uni-sb.de
Thu Mar 5 01:53:56 CET 2009
Stefano,
thanks for the bug report. I just fixed it in the trunk (empty
IntSets now have min=Int::Limits::max and max=Int::Limits::min).
Cheers,
Guido
Stefano Gualandi wrote:
> Hi,
> there is a strange behavior of one of the SetVarArray constructors,
> in the trunk version.
> In practice, if you try to define an array of set variables as
> follows:
>
> x ( *this, 4, IntSet::empty, 2, 4, 0, 4 )
>
> it raises an exception, since it fails the test in the file gecode/
> set/array.cpp at lines 84-85:
>
> 84: if (minCard > maxCard || minCard > lubSize || maxCard <
> glbSize ||
> 85: glb.min() < ubMin || glb.max() > ubMax)
>
> The point is that glb.min() of an empty set is 1 (?).
> Commenting the line 85 seems to fix the problem, but I don't know if
> it breaks some other assumption.
>
> You can find attached the smallest example the show the *behavior*.
>
> cheers,
> Stefano
>
>
> <test.cpp>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
More information about the gecode-users
mailing list