[Cbc] CbcMain1 returns bogus result when it cannot improve on setBestSolution

John Forrest jjhforrest at gmail.com
Wed Jun 5 05:15:56 EDT 2019


Jack,

I may get round to looking at this but have you tried -

put out the solution

-solution x.sol

and then on next iteration

-mipstart x.sol

John Forrest
On 03/06/2019 10:09, Jack Vreeken wrote:
> Hello all,
>
> I am doing multi-objective/priority optimization, and want to pass the best
> solution from the previous priority along to the next (which speeds up things
> a lot). I therefore first call setBestSolution(), before calling CbcMain1(). I
> am however a bit confused about how to (1) reliably check if CBC was able to
> find a solution, and (2) how to get/store/return that solution.
>
> According to some examples in Cbc, the correct procedure is "[...] but
> initially check if status is 0 and secondary status is 1 -> infeasible".
> This approach fails when setBestSolution() returns the optimal objective
> value. The return status values from the model after calling CbcMain1() are
> then:
>
> status: 0, isProvenOptimal: 1, secondaryStatus: 1
> isProvenInfeasible: 0, objective: 0.0000000
>
> Am I correct in understanding that a proper check would have to involve
> checking isProvenOptimal() and/or isProvenInfeasible() as well?
>
> Also, it seems that CbcMain1() return a bogus solution in this case, whereas I
> was expecting it to return the solution that setBestSolution() found. Is this
> intended behavior? Is there a way to make CbcMain1() return it somehow, or
> should I store/overwrite the solution myself with the one after calling
> setBestSolution()?
>
> Kind regards,
>
> Jack Vreeken
>
> (Spin-off from https://github.com/casadi/casadi/issues/2410)
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> https://list.coin-or.org/mailman/listinfo/cbc
>
>



More information about the Cbc mailing list