<br><font size=2 face="sans-serif">In our BCP application we kept getting
errors which we eventually tracked down to reduced_cost_fixing screwing
up the bounds on some variables. Our suspicion is that when dj[i]
(the reactivity of the objective to the given variable) ought to be zero,
it can sometimes be given a very small value due to roundoff error. In
this case, the bounds can get slammed to one end or the other, leaving
the relaxed value of the variable outside the bounds.</font>
<br>
<br><font size=2 face="sans-serif">We propose adding a check that doesn't
adjust the bound if doing so would exclude the current value of the variable.
The relevant code is:</font>
<br>
<br><font size=2 face="sans-serif"> if (dj[i] >
0) {</font>
<br><font size=2 face="sans-serif"> const
double lb = var->lb();</font>
<br><font size=2 face="sans-serif"> const
double new_ub = lb + floor(gap / dj[i]);</font>
<br><font size=2 face="sans-serif"> if
(new_ub < var->ub() && (atAny || CoinAbs(x[i])<petol)</font>
<br><font size=2 face="sans-serif">
&& (new_ub >= x[i])) { // If x[i] is no longer
in range, you've goofed due to roundoff error.</font>
<br><font size=2 face="sans-serif">
// (this problem came up with an upper bound of 1e+24 and
a dj of -1.9e-13)</font>
<br><font size=2 face="sans-serif">
vars[i]->set_ub(new_ub);</font>
<br><font size=2 face="sans-serif">
changed_indices.unchecked_push_back(i);</font>
<br><font size=2 face="sans-serif">
changed_bounds.unchecked_push_back(lb);</font>
<br><font size=2 face="sans-serif">
changed_bounds.unchecked_push_back(new_ub);</font>
<br><font size=2 face="sans-serif"> }</font>
<br><font size=2 face="sans-serif"> } else if (dj[i]
< 0) {</font>
<br><font size=2 face="sans-serif"> const
double ub = var->ub();</font>
<br><font size=2 face="sans-serif"> const
double new_lb = ub - floor(gap / (-dj[i]));</font>
<br><font size=2 face="sans-serif"> if
(new_lb > var->lb() && (atAny || CoinAbs(x[i])<petol)</font>
<br><font size=2 face="sans-serif">
&& (new_lb <= x[i])) { // If x[i] is no longer
in range, you've goofed due to roundoff error.</font>
<br><font size=2 face="sans-serif">
// (this problem came up with an upper bound of 1e+24 and
a dj of -1.9e-13)</font>
<br><font size=2 face="sans-serif">
vars[i]->set_lb(new_lb);</font>
<br><font size=2 face="sans-serif">
changed_indices.unchecked_push_back(i);</font>
<br><font size=2 face="sans-serif">
changed_bounds.unchecked_push_back(new_lb);</font>
<br><font size=2 face="sans-serif">
changed_bounds.unchecked_push_back(ub);</font>
<br><font size=2 face="sans-serif"> }</font>
<br><font size=2 face="sans-serif"> }</font>
<br>
<br><font size=2 face="sans-serif">The changes are marked with comments.</font>
<br>
<br><font size=2 face="sans-serif">So far our tests show the problem that
used to cause the errors, no longer doing so. But our confidence-level
is not high: the error was elusive, appearing and disappearing with changes
that ought to have made no difference. We are wondering if we are
on the right track, and if this is a worthwhile change to migrate back
into the source. We'd appreciate any insights from other members
of the COIN/Bcp community.</font>