Why are binary Variables getting float results. Is there any command to prevent it?
回答済みHello.
I have defined two types of variables in my model running in different iterations. To restrict the variable values, I have considered both ways like binary and Integer variables with lb=0 and ub=1.

However, for some iterations, the variables are taking float values. Is there any way to prevent it? Please Suggest.
-
Hi Biswajit,
It is possible, that due to machine precision and numerical inaccuracies caused by, e.g., so-called trickle-flows, that discrete variables take float values in an optimal solution. To avoid this you could either decrease the IntFeasTol parameter value or use the IntegralityFocus parameter.
I recommend using (and reading the description of) the IntegralityFocus parameter even tho it might have a visible impact on performance
Best regards,
Jaromił0 -
In addition to Jaromil's reply, please refer to Why does Gurobi sometimes return non-integral values for integer variables?
0
サインインしてコメントを残してください。
コメント
2件のコメント