[Cbc] infeasibility() and checkInfeasibility()

Pietro Belotti petr.7b6 at gmail.com
Tue Sep 23 19:20:47 EDT 2014


Hello again,

OsiObjects have two methods for checking and handling infeasibility:
OsiObject::infeasibility() and OsiObject::checkInfeasibility(). In its
main implementation, OsiObject::checkInfeasibility() just calls
infeasibility(), but other solvers (namely Couenne) have two entirely
different methods. Cbc only uses infeasibility() even where
checkInfeasibility() would suffice, since the output parameter
preferredWay is not used. Here is a list for stable/2.8 of the nine
calls that do not seem to use preferredWay (with line numbers):

CbcModel.cpp:8526:            double infeasibility =
object_[i]->infeasibility(&usefulInfo, preferredWay);
CbcModel.cpp:12392:        double infeasibility =
object->infeasibility(&usefulInfo, preferredWay);
CbcModel.cpp:12412:        double infeasibility =
object->infeasibility(&usefulInfo, preferredWay);
CbcModel.cpp:14939:
object_[iObject]->infeasibility(&usefulInfo, preferredWay);
CbcModel.cpp:17353:
object_[iObject]->infeasibility(&usefulInfo, preferredWay);

CbcNode.cpp:1415:                        double infeasibility =
object->infeasibility(&usefulInfo, preferredWay);
CbcNode.cpp:1629:                double infeasibility =
object->infeasibility(&usefulInfo, preferredWay);
CbcNode.cpp:2050:                double infeasibility =
object->infeasibility(&usefulInfo, preferredWay);
CbcNode.cpp:3832:        double infeasibility =
object->infeasibility(&usefulInfo, preferredWay);

It would be nice if these calls were replaced by checkInfeasibility(),
as that would make no difference to Cbc, I believe, but might be very
beneficial to Couenne and would be a little cleaner. It would also be
good to merge this into trunk/.

Thanks,
Pietro


More information about the Cbc mailing list