Binary variables which are not zero
AnsweredWe 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 -
Typically, the root cause of problems like this are that there are some significant numerical issues in the model. Generally speaking, a model with numerical issues can produce inconsistent or unexpected results, and degrade performance. Some cases can be improved using parameter settings, but this should be viewed more as a way to tackle the "symptoms" of the issues rather than the underlying cause, which can often be addressed with the tips given in our Guidelines for Numerical Issues.
0
Please sign in to leave a comment.
Comments
2 comments