[Cbc] Are heuristics required to respect the bounds of the current node?

John Forrest john.forrest at fastercoin.com
Thu Sep 30 09:02:16 EDT 2010


Thomas,

A solution does not have to respect current bounds.  For example RINS
can easily generate a solution violating current bounds.

The code in setBestSolution picks up a copy of continuousSolver_ (which
is solver at root node after initial preprocessing) and uses that.

In your heuristic, try cloning the continuousSolver, fixing variables
and see if that is feasible.  There may be a quirk in the preprocessing
that throws off your specialized heuristic.

John Forrest


On Thu, 2010-09-30 at 14:11 +0200, Thomas Schoenemann wrote:
> Dear all,
> 
> I have written my own heuristic for a specialized problem I have, and I 
> believe it returns feasible solutions. However, I found out that some of them 
> are not consistent with the variable bounds I get by calling getCbcColLower()
> and getCbcColUpper(). Now, if I let my solution() method return 1 in this 
> case, CBC prints a message that the node is infeasible. If I call 
> setBestSolution() instead, I get a message that I am trying to save an 
> infeasible solution.
> 
> Of course I cannot be 100% certain that the error is not on my side. But can 
> anyone tell me if the current release (Cbc-2.5.0) should indeed behave this 
> way? That is, will it (incorrectly) cut away the node if solution() returns 1 
> because it thinks the node is infeasible? And is there a reason (i.e. the 
> current software design does not allow a modification of the code) why one 
> should not save a good solution that is inconsistent with the current branch?
> 
> Best regards,
>    Thomas Schoenemann
> 
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
> 




More information about the Cbc mailing list