<div id="geary-body" dir="auto"><div>Hi,</div><div><br></div><div>MIPstart is also accessible with the C++ API</div><div><br></div><div><div> void CbcModel::setMIPStart(const std::vector< std::pair< std::string, double > > &mipstart)</div></div><div><br></div><div>and the C API</div><div><br></div><div><div>COINLIBAPI void COINLINKAGE</div><div>Cbc_setMIPStart(Cbc_Model *model, int count, const char **colNames, const double colValues[]);</div></div><div><br></div><div><br></div><div><br></div></div><div id="geary-signature" dir="auto"><span style="font-family:monospace,monospace"><span class="gmail_default" style="font-size: small;"></span>=============================================================<br>Haroldo Gambini Santos<br>Computing Department<br>Universidade Federal de Ouro Preto - UFOP</span><div><span style="font-family:monospace,monospace">KU Leuven - CODeS<br>email: haroldo [at ] ufop.edu.br</span></div><div><span style="font-family:monospace,monospace"> Haroldo.GambiniSantos@cs.kuleuven.br<br>home/research page: <a href="http://www.decom.ufop.br/haroldo/" target="_blank">www.decom.ufop.br/haroldo</a><br><br><br>It has long been an axiom of mine that the little things are infinitely<br>the most important.<br></span></div></div><div id="geary-quote" dir="auto"><br>On Wed, Jun 5, 2019 at 11:15 AM, John Forrest <jjhforrest@gmail.com> wrote:<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">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:
<blockquote>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 <a href="https://github.com/casadi/casadi/issues/2410">https://github.com/casadi/casadi/issues/2410</a>)
_______________________________________________
Cbc mailing list
<a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a href="https://list.coin-or.org/mailman/listinfo/cbc">https://list.coin-or.org/mailman/listinfo/cbc</a>
</blockquote>
_______________________________________________
Cbc mailing list
<a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a href="https://list.coin-or.org/mailman/listinfo/cbc">https://list.coin-or.org/mailman/listinfo/cbc</a>
</div></blockquote></div>