<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Mustafa,<br>
    <br>
    To inform an Integer solution you should use
    <meta http-equiv="content-type" content="text/html;
      charset=windows-1252">
    <pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">CbcModel::setBestSolution

<a class="moz-txt-link-freetext" href="http://list.coin-or.org/pipermail/cbc/2008-October/000194.html">http://list.coin-or.org/pipermail/cbc/2008-October/000194.html</a>

Cheers
</pre>
    <div class="moz-cite-prefix">On 20-08-2014 12:28, Mustafa Kilinc
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALWzrPD3SURDsnbjF5x6u3e7nZnVuorxrtCs9J6c=Rvjvor+Cw@mail.gmail.com"
      type="cite">
      <pre wrap="">Hi all,

I want to provide an initial solution to hotstart Cbc. For this purpoose, I use

model.setHotstartSolution(startx);

In the output, I do not see anything if the solution is acceptted or
not. Does Cbc accept partial solution? For example: does Cbc solve an
lp after fixing integer variables to current values for hot start
solution?

The other feature I use is solution pool of Cbc. For this purpose I set

model.setMaximumSavedSolutions(10);

But it seems like these two features do not work in harmony together.
I get valgrind errors.


==24176== Invalid read of size 8
==24176==    at 0x4A09C2E: memcpy (mc_replace_strmem.c:883)
==24176==    by 0x4F991D3: CbcModel::setBestSolution(double const*,
int, double, bool) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4CA344F: CbcMain1(int, char const**, CbcModel&amp;, int
(*)(CbcModel*, int)) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbcSolver.so.3.8.0)
==24176==    by 0x40FAAA: main (in
/home/mkilinc/cbc/Cbc-2.8.0/Cbc/examples/driver3)
==24176==  Address 0x7868f60 is 0 bytes after a block of size 272 alloc'd
==24176==    at 0x4A08182: operator new[](unsigned long)
(vg_replace_malloc.c:363)
==24176==    by 0x4F85A3D: CbcModel::saveExtraSolution(double const*,
double) (in /home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4F85B9A: CbcModel::saveBestSolution(double const*,
double) (in /home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4F9D325: CbcModel::setBestSolution(CBC_Message,
double&amp;, double const*, int) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4FA6120: CbcModel::doOneNode(CbcModel*, CbcNode*&amp;,
CbcNode*&amp;) (in /home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4FAAC6E: CbcModel::branchAndBound(int) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4CA2B3A: CbcMain1(int, char const**, CbcModel&amp;, int
(*)(CbcModel*, int)) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbcSolver.so.3.8.0)
==24176==    by 0x40FAAA: main (in
/home/mkilinc/cbc/Cbc-2.8.0/Cbc/examples/driver3)
==24176==

==24176== Invalid read of size 8
==24176==    at 0x4A09D3C: memcpy (mc_replace_strmem.c:883)
==24176==    by 0x4F991D3: CbcModel::setBestSolution(double const*,
int, double, bool) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4CA344F: CbcMain1(int, char const**, CbcModel&amp;, int
(*)(CbcModel*, int)) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbcSolver.so.3.8.0)
==24176==    by 0x40FAAA: main (in
/home/mkilinc/cbc/Cbc-2.8.0/Cbc/examples/driver3)
==24176==  Address 0x692b7a0 is 0 bytes after a block of size 272 alloc'd
==24176==    at 0x4A08182: operator new[](unsigned long)
(vg_replace_malloc.c:363)
==24176==    by 0x4F85A3D: CbcModel::saveExtraSolution(double const*,
double) (in /home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4F85B9A: CbcModel::saveBestSolution(double const*,
double) (in /home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4F9D325: CbcModel::setBestSolution(CBC_Message,
double&amp;, double const*, int) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4FA6120: CbcModel::doOneNode(CbcModel*, CbcNode*&amp;,
CbcNode*&amp;) (in /home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4FAAC6E: CbcModel::branchAndBound(int) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbc.so.3.8.0)
==24176==    by 0x4CA2B3A: CbcMain1(int, char const**, CbcModel&amp;, int
(*)(CbcModel*, int)) (in
/home/mkilinc/cbc/Cbc-2.8.0/lib/libCbcSolver.so.3.8.0)
==24176==    by 0x40FAAA: main (in
/home/mkilinc/cbc/Cbc-2.8.0/Cbc/examples/driver3)

To reproduce, you can use the file below.

<a class="moz-txt-link-freetext" href="http://www.speedyshare.com/k7Hmr/driver3.cpp">http://www.speedyshare.com/k7Hmr/driver3.cpp</a>
_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/cbc">http://list.coin-or.org/mailman/listinfo/cbc</a>

</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
==================================================
Haroldo Gambini Santos
D.Sc, Computer Science
Universidade Federal de Ouro Preto
<a class="moz-txt-link-freetext" href="http://www.decom.ufop.br/haroldo/">http://www.decom.ufop.br/haroldo/</a></pre>
  </body>
</html>