[Cbc] Intermediate results via CbcModel.bestSolution()
John Forrest
john.forrest at fastercoin.com
Thu Jul 15 12:39:10 EDT 2010
bestSolution() never decompressed solution so you just must have been
lucky.
If you did CglPreProcess and pass a pointer to that in to the handler
using bestSolution() then you can pick up originalColumns() and put the
solution back into the original model.
John Forrest
On Thu, 2010-07-15 at 11:27 -0400, acw at ascent.com wrote:
> In our application, we pose biggish problems to Cbc, which then goes
> off and spends quite a while solving them. Even before we get the
> optimal solution, we can make use of any solutions Cbc finds along the
> way.
>
> So, during the solution process, when we see that Cbc has improved its
> best result, we query the CbcModel using bestSolution().
>
> Recently we've started encountering a problem where the returned
> solution is much shorter than expected. Looking at the number of
> columns in the solution makes us suspect that we are seeing solutions
> to the processed model, and not to the original one. That is, Cbc is
> boiling the problem down to a smaller, equivalent problem, and solving
> that; when it's completely finished it inverts the transformation to
> give a solution to the original problem. But if we interrupt it, we
> find an intermediate solution to the transformed problem, not the
> original.
>
> This makes a certain amount of sense, but it didn't use to happen. In
> a previous Cbc version, either the model was not compressed in the
> same way, or bestSolution() inverted the compression regardless of
> whether the solution was complete.
>
> Is this change in behavior intentional? If so, does there remain any
> supported way to extract an intermediate solution to the problem as
> posed?
>
> Thank you; our experience with Cbc has been overwhelmingly positive,
> and we're sure there's an easy solution to this glitch as there have
> been for every problem we've encountered in the past.
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
More information about the Cbc
mailing list