[Cbc] Anomaly with optimal solution

Daniel Grace danwgrace at gmail.com
Wed Feb 5 12:32:54 EST 2020


Hi,

I have made a solver for a type of knapsack problem and it appears to be
working fine. However CBC is reporting that a particular solution is
optimal, when according to the literature it is possible to get a higher
value.

Is the Cbc_isProvenOptimal function reliable and am I using it correctly?

Here is how I am processing the result from CBC:

Cbc_solve(model);

if (Cbc_status(model) == 0)
{
    if (Cbc_isAbandoned(model))
        cc = 'a';
    else
    {
        if (Cbc_isProvenInfeasible(model))
            cc = 'i';
        else
        {
            ret = Cbc_isProvenOptimal(model);
            if (ret)
                cc = 'z';
            else
                cc = 'y';
            x = Cbc_getColSolution(model);
            v = Cbc_getObjValue(model);
...

The resulting code cc is 'z', but the value v appears to be suboptimal.

Thanks for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20200205/aac719f6/attachment.html>


More information about the Cbc mailing list