[Cbc] CbcMain1 returns bogus result when it cannot improve on setBestSolution
haroldo
haroldo at ufop.edu.br
Wed Jun 5 08:31:44 EDT 2019
Hi,
MIPstart is also accessible with the C++ API
void CbcModel::setMIPStart(const std::vector< std::pair< std::string,
double > > &mipstart)
and the C API
COINLIBAPI void COINLINKAGE
Cbc_setMIPStart(Cbc_Model *model, int count, const char **colNames,
const double colValues[]);
=============================================================
Haroldo Gambini Santos
Computing Department
Universidade Federal de Ouro Preto - UFOP
KU Leuven - CODeS
email: haroldo [at ] ufop.edu.br
Haroldo.GambiniSantos at cs.kuleuven.br
home/research page: www.decom.ufop.br/haroldo
<http://www.decom.ufop.br/haroldo/>
It has long been an axiom of mine that the little things are infinitely
the most important.
On Wed, Jun 5, 2019 at 11:15 AM, John Forrest <jjhforrest at gmail.com>
wrote:
> 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 <mailto:Cbc at list.coin-or.org>
>> <https://list.coin-or.org/mailman/listinfo/cbc>
>>
>>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org <mailto:Cbc at list.coin-or.org>
> <https://list.coin-or.org/mailman/listinfo/cbc>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20190605/11de291c/attachment.html>
More information about the Cbc
mailing list