Does Gurobi support mathematical integers or is it limited to machine precision for Integer programs?
AnsweredSuppose that I have the very simple helloworld style integer program below:
Max X s.t.
X * W <= A
X <= 1
0 <= X
Where X is the integer variable (can be 0 or 1), and W and A are constant integers.
Suppose further, that W is very large, for example, 2251799813685248.
With such a large size, using standard primitives (like a 32 bit int) will cause problems.
Therefore, my question is does Gurobi support mathematical integers (i.e. no bounds and uses something like GMP under the hood) or is it limited to machine precision?
-
Official comment
Gurobi uses standard mixed-integer programming (MIP) techniques: it solves MIP models via a series of continuous (linear programming) relaxations. All variables are therefore continuous (double) values; a value is considered an integer if it is within IntFeasTol of an integer value.
Additionally, a large coefficient like
2251799813685248
will cause numerical problems for the underlying LP relaxation.(I moved this to the modeling topic).
Please sign in to leave a comment.
Comments
1 comment