You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The computation of bounds of the auxiliary variable is not accurate for mul or pow expressions.
It raises an exception because it does not take into account the right member of the relation.
However, the constraint times does not meet the same issue.
To Reproduce
Define the model below.
Modelm = newModel();
IntVar[] x = m.intVarArray("x", 3, 0, IntVar.MAX_INT_BOUND);
model.times(x[0], x[1], x[2]).post(); // Valid and postedx[0].mul(x[1]).eq(x[2]).post(); // Valid, but raise an exception
The issue is also encountered with pow expression.
x[0].pow(x[1]).eq(x[2]).post(); // Valid, but raise an exception
Expected behavior
No exception.
The text was updated successfully, but these errors were encountered:
I can sharp the bounds computed in VariableUtils to [IntVar.MIN_INT_BOUND, IntVar.MAX_INT_BOUND].
That will not fail anymore in the cases you depicted (well, the one with pow should be reduced, because there is no power constraint, it is turned into a table constraint).
BUT, the following example (from cryptator) will be problematic:
Indeed, the bounds of the intermediate variable for copper.mul(neon) will be [100000000L, 9998990001L] and an exception will be raised because the intermediate variable cannot be instantiated to an int value.
Describe the bug
The computation of bounds of the auxiliary variable is not accurate for
mul
orpow
expressions.It raises an exception because it does not take into account the right member of the relation.
However, the constraint
times
does not meet the same issue.To Reproduce
Define the model below.
The issue is also encountered with
pow
expression.Expected behavior
No exception.
The text was updated successfully, but these errors were encountered: