Binary variables which are not zero
We optimize energy networks in an iterative linear form. Binary decision variables in our data model are bools. If we get a non-binary result from Gurobi for a binary variable we round this and use the value to form the optimization problem in the next iteration.
Now we have a binary variable with a solution value of 1.99324e-06. We multiply this variable by a large value (13000). The result is used in the next iteration of the iterative optimization to form a constraint. Additionally we form constraints based on the rounded zero of the binary variable in our data model.
This results in an infeasible. How can we solve this?
One solution was to introduce IntFeasTol=1e-9. This solved the infeasible in our case. Is there a better way, which does not harm performance?
Can we force Gurobi to return true bools and integers as solution for binary and integer variables?
Thank you!
Henrik
-
Hi Henrik,
I created a support ticket from your request so that we can handle your request directly.
Best regards,
Elisabeth
0
サインインしてコメントを残してください。
コメント
1件のコメント