Skip to content

[BUG] Incomplete bounding of expressions with products or powers #980

@arnaud-m

Description

@arnaud-m

Describe the bug

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.

Model m = new Model();
IntVar[] x = m.intVarArray("x", 3, 0, IntVar.MAX_INT_BOUND);        
model.times(x[0], x[1], x[2]).post(); // Valid and posted
x[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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions