Tolerances for Floating Point numbers under Integer Relaxation
回答済みI am trying to relax integer variables such that the resulting problem is linear. To do this, I am using a iterative weighted approach. The intermediate solutions I obtain (say after 6 iterations) are:
x[1,1] = 0.99999999999 and x[1,2] = 1.0000001e-11.
I am wondering if it is possible to set a tolerance in Gurobi such that after a tolerance of say 10e-5, the numbers are rounded automatically. As of now, 1e-14 rounds to 0. I am using Python as my base language.
-
正式なコメント
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Sagnik,
No, any rounding of variables to account for these tiny numerical differences must be done on your own after the solver terminates. In some cases, small roundings like this can impact the feasibility or optimality of a solution, hence why Gurobi leaves it up to the user.
You can read more about integer variable tolerances here.
Thanks,
Eli
0
投稿コメントは受け付けていません。
コメント
2件のコメント