This problem is most likely caused by the use of a constraint that uses equality encoding on variables without a specific domain (i.e., var int
).
When we decompose constraints within the linear library, for Gurobi, CBC, or CPLEX, not all statements are easily rewritten into a linear form. For constraints like the element
or min
constraint, we use equality encoding. This means that we use a 0/1 variable for every possible value of an integer variable and use these new variables to formulate the constraints we need.
The problem here is that this does not work if a variable has no bounds. We would have to create a 0/1 variable for every value in the integer domain, which according to mathematics would be infinite. Since this would not work for the solver, constraints that require equality encoding will require bounds on the variables used.