<div dir="ltr">Dear Jakob,<div><br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On 15 September 2016 at 14:14, Jakob Witzig <span dir="ltr"><<a href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi James,<br>
<br>
what do you mean exactly with you suspect you doing it wrong? Do you got wrong results?<br>
<br>
Yes, the parameter mentioned below should exactly do the same as you are doing by hand. Do you observe any differences between using the parameter and separating OPTSOL by hand?<br></blockquote><div><br></div><div><br></div><div>I do observe a difference. When I set reoptimization/sepabestsol = TRUE and just do:</div><div>Do k times:<br>---Solve problem    SCIP_CALL( SCIPsolve(scip) );</div><div>---Inspect best solution: SCIP_CALL( SCIPprintSol(scip, SCIPgetBestSol(scip), NULL, FALSE) ); </div><div>---Inspect best solution another way: SCIP_CALL( SCIPprintSol(scip, SCIPgetReoptLastOptSol(scip), NULL, FALSE) );  <br>---SCIP_CALL( SCIPfreeTransform(scip) );<br><br></div><div>With one exception, I just get the same optimal solution on each iteration. It is as if the parameter is having no effect. </div><div>The exception is that the first call to SCIP_CALL( SCIPprintSol(scip, SCIPgetReoptLastOptSol(scip), NULL, FALSE) );  prints out an infeasible solution.</div><div><br></div><div>Perhaps I am looking in the wrong place for optimal solutions for k>1 or somehow preventing the best solutions from each iteration being separated.</div><div><br></div><div>James</div><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Cheers,<br>
Jakob<br>
<br>
<br>
Am 15.09.2016 um 14:03 schrieb James Cussens:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Dear SCIPers,<br>
<br>
I am using reoptimization to solve a series of binary IPs, and I suspect<br>
I am doing it wrong.<br>
<br>
My problem is analogous, I think, to the k-Constrained Shortest Path<br>
Problem mentioned in Section 4.2 of Jakob Witzig's master thesis. For my<br>
original IP I want to get the optimal solution, then the 2nd best, then<br>
3rd best and so on. The objective function never changes.<br>
<br>
I have set reoptimization/enable to TRUE and then do the following:<br>
<br>
Do k times:<br>
---Solve problem    SCIP_CALL( SCIPsolve(scip) );<br>
---store information sufficient to identify optimal solution OPTSOL<br>
---SCIP_CALL( SCIPfreeTransform(scip) );<br>
---add in constraint ruling out just OPTSOL<br>
<br>
I notice that there is a parameter<br>
# separate the optimal solution, i.e., for constrained shortest path<br>
# [type: bool, range: {TRUE,FALSE}, default: FALSE]<br>
reoptimization/sepabestsol = FALSE<br>
<br>
which, I suspect, can be used to do what I am doing 'by hand'. Is this<br>
the case?<br>
<br>
More generally, I would appreciate knowing the correct recipe for doing<br>
this sort of thing (when using the SCIP callable library).<br>
<br>
James<br>
<br>
--<br>
James Cussens<br>
Dept of Computer Science &<br>
York Centre for Complex Systems Analysis<br>
Room 326, The Hub, Deramore Lane            Tel    <a href="tel:%2B44%20%280%291904%20325371" value="+441904325371" target="_blank">+44 (0)1904 325371</a><br>
University of York                                        Fax  +44<br>
(0)1904 500159<br>
York YO10 5GE, UK                               <a href="http://www.cs.york.ac.uk/~jc" rel="noreferrer" target="_blank">http://www.cs.york.ac.uk/~jc</a><br>
<a href="http://www.york.ac.uk/docs/disclaimer/email.htm" rel="noreferrer" target="_blank">http://www.york.ac.uk/docs/dis<wbr>claimer/email.htm</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
Scip mailing list<br>
<a href="mailto:Scip@zib.de" target="_blank">Scip@zib.de</a><br>
<a href="http://listserv.zib.de/mailman/listinfo/scip" rel="noreferrer" target="_blank">http://listserv.zib.de/mailman<wbr>/listinfo/scip</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
Jakob Witzig<br>
<br>
Zuse Institute Berlin (ZIB)<br>
<br>
Division Mathematical Optimization and Scientific Information<br>
Research Group Mathematical Optimization Methods<br>
<br>
Takustrasse 7<br>
14195 Berlin<br>
<br>
Tel. : <a href="tel:%2B49%20%280%2930%2084185-416" value="+493084185416" target="_blank">+49 (0)30 84185-416</a><br>
Fax  : <a href="tel:%2B49%20%280%2930%2084185-269" value="+493084185269" target="_blank">+49 (0)30 84185-269</a><br>
email: <a href="mailto:witzig@zib.de" target="_blank">witzig@zib.de</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">James Cussens<br>Dept of Computer Science &<br>York Centre for Complex Systems Analysis<br>Room 326, The Hub, Deramore Lane            Tel    +44 (0)1904 325371<br>University of York                                        Fax  +44 (0)1904 500159<br>York YO10 5GE, UK                               <a href="http://www.cs.york.ac.uk/~jc" target="_blank">http://www.cs.york.ac.uk/~jc</a><br><a href="http://www.york.ac.uk/docs/disclaimer/email.htm" target="_blank">http://www.york.ac.uk/docs/disclaimer/email.htm</a></div>
</div></div>