Precision Limit?

333 views
Skip to first unread message

nk

unread,
May 11, 2011, 1:39:11 PM5/11/11
to Gurobi Optimization
I am using Gurobi 4.5 and gurobipy on Python 2.6 to maximize a linear
model under certain constraints. In principle I iteratively add
constraints to the model and recalculate the objective value, in order
to compare the two and thus determine which influence this constraint
has on the solution. So for my work, it is rather important to know
whether two objective values are the same or not.

Recently I have seen an issue where sometimes the introduction of an
additional constraint actually increased the obtained objective value
slightly, by a value in the order of around 10^-8. Since this should
of course never be the case I believe that this might indicate a
problem with the precision with which Gurobi handles small numbers and
returns them to Python.

Is a known problem? And if so, what can I do to avoid it? Do I just
have to disregard digits beyond a certain limit?

Greg Glockner

unread,
May 12, 2011, 9:42:31 AM5/12/11
to gur...@googlegroups.com
Optimality is determined by the OptimalityTol parameter; the default optimality tolerance is 1e-6. You can reduce this to 1e-9. However, be aware that it is often unrealistic to expect accuracy down to 1e-8 or 1e-9. You may want to rescale your model to ensure you're getting the solutions you want.

Reply all
Reply to author
Forward
0 new messages