<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Irina,<br>
<br>
The solver needs to know about the solution and then it may use
Local or other heuristics e.g. RINS. You could play around with
the standalone solver and use mipstart with a solution file. Then
if that looks good either still use mipstart and code based on
example driver4.cpp or with more work directly pass in the
solution -<br>
<br>
CbcModel model ...<br>
model.setBestSolution( sol, nvars, objvalue, false );<br>
model.setCutoff(obj+epsilon);<br>
model.setSolutionCount(1);<br>
<br>
or something like that.<br>
<br>
John Forrest<br>
On 06/11/17 17:09, Irina Hafner wrote:<br>
</div>
<blockquote type="cite"
cite="mid:VI1P193MB007731D070B6286949B61F97F2500@VI1P193MB0077.EURP193.PROD.OUTLOOK.COM">
<meta http-equiv="Context-Type" content="text/html;
charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hi all,</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">I am currently working
on a specific LP, where it is easy to calculate a feasible
solution in advance. Hence, I am looking for an algorithm to
improve an initial solution, for example via local search.
</span></p>
<p class="MsoNormal"><span lang="EN-GB">I know, there is the
“CbcHeuristicLocal” class and I even found some examples.
When I tried to implement the algorithm in the following
way
</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">OsiClpSolverInterface</span><span
lang="EN-GB"> clp;</span></p>
<p class="MsoNormal"><span lang="EN-GB">CbcModel</span><span
lang="EN-GB"> model(clp);</span></p>
<p class="MsoNormal"><span lang="EN-GB">//[…set initial
solution…]</span></p>
<p class="MsoNormal"><span lang="EN-GB">CbcHeuristicLocal</span><span
lang="EN-GB"> heuristicLocal(model);</span></p>
<p class="MsoNormal"><span lang="EN-GB">heuristicLocal.</span><span
lang="EN-GB">setSearchType</span><span lang="EN-GB">(1);
</span></p>
<p class="MsoNormal"><span lang="EN-GB">heuristicLocal.</span><span
lang="EN-GB">setFractionSmall</span><span lang="EN-GB">(0.5);</span></p>
<p class="MsoNormal"><span lang="EN-GB">heuristicLocal.</span><span
lang="EN-GB">setHeuristicName</span><span lang="EN-GB">(</span><span
lang="EN-GB">"local"</span><span lang="EN-GB">);</span></p>
<p class="MsoNormal"><span lang="EN-GB">model.</span><span
lang="EN-GB">addHeuristic</span><span lang="EN-GB">(&heuristicLocal);</span></p>
<p class="MsoNormal"><span lang="EN-GB">//[…]</span></p>
<p class="MsoNormal"><span>model.</span><span>initialSolve</span><span>();</span></p>
<p class="MsoNormal"><span>model.</span><span>branchAndBound</span><span>();</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span lang="EN-GB">the solution didn’t
improve, and I got the following log massage “Cbc0045I
Heuristic local took 0 seconds (no good)”. So, I think the
algorithm didn’t even start.</span></p>
<p class="MsoNormal"><span lang="EN-GB">I am wondering if I
missed to set some parameters or if I can’t use this class
as I thought?
</span></p>
<p class="MsoNormal"><span lang="EN-GB">Has somebody some
experiences with local search, the CbCHeuristicLocal class
or with the CbcTreeLocal class? It would be great to get
more information on this topic!</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Thank you in advance,</span></p>
<p class="MsoNormal"><span lang="EN-GB">Irina</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Clp mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Clp@list.coin-or.org">Clp@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="https://list.coin-or.org/mailman/listinfo/clp">https://list.coin-or.org/mailman/listinfo/clp</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>