<div dir="ltr">Or indeed another option is running the software on Amazon EC2 where you can rent a grunty machine (lots of memory) and have it run even when there is no power where you are :-). Just make sure you use a client like 'screen' to make sure the optimisation continues when you are not connected.<div><br></div><div>Stu</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 11, 2017 at 3:22 AM, <a href="mailto:acw@ascent.com">acw@ascent.com</a> <span dir="ltr"><<a href="mailto:acw@ascent.com" target="_blank">acw@ascent.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<font size="2" face="sans-serif">Jeff, the CBC event handler absolutely has a callback that it calls whenever it finds a new best-so-far solution. You can fill in that callback to write out an MPS file, and then when you restart, you can read the saved solution
 and "hot-start" from it, or (almost as good) add a constraint that insists that the objective be at least as good as the one that was found earlier.</font>
<br>
<br>
<br>
<table width="100%">
<tbody>
<tr valign="top">
<td><font size="1" color="#5f5f5f" face="sans-serif">From:</font> </td>
<td><font size="1" face="sans-serif">Christopher Gross <<a href="mailto:christopher.gross@unikat.uni-augsburg.de" target="_blank">christopher.gross@unikat.uni-<wbr>augsburg.de</a>></font>
</td>
</tr>
<tr valign="top">
<td><font size="1" color="#5f5f5f" face="sans-serif">To:</font> </td>
<td><font size="1" face="sans-serif"><a href="mailto:cbc@list.coin-or.org" target="_blank">cbc@list.coin-or.org</a></font> </td>
</tr>
<tr valign="top">
<td><font size="1" color="#5f5f5f" face="sans-serif">Date:</font> </td>
<td><font size="1" face="sans-serif">07/10/2017 10:52 AM</font> </td>
</tr>
<tr valign="top">
<td><font size="1" color="#5f5f5f" face="sans-serif">Subject:</font> </td>
<td><font size="1" face="sans-serif">Re: [Cbc] Intermediate Results</font></td>
</tr>
</tbody>
</table>
<br>
<hr noshade><div><div class="h5">
<br>
<br>
<br>
<tt><font size="2">Hi Jeff,<br>
<br>
being only an average C programmer myself and having looked at CBC code <br>
before, I would assume that storing and loading intermediate solution <br>
data will be quite a feat. Unfortunately, I can't give you any advice on <br>
that.<br>
<br>
However, I would suggest a different solution that works not only for <br>
CBC: Have you ever thought about getting an uninterrupted power supply <br>
(UPS)? Consumer units are available for less than 100USD and will last <br>
about 5-20 minutes, depending on the size of the device and your power <br>
consumption. If your power outages aren't longer than that, this should <br>
be sufficient to continue running your computations.<br>
<br>
If your power outages are longer than that, you could also consider <br>
running CBC in a virtual machine. Those can be paused and resumed at a <br>
later point in time. When the power goes out, your UPS will signal your <br>
guest system which will pause the virtual machine and shut down the <br>
system. You can then power it back up when the power is back on and <br>
resume the virtual machine, continuing your calculations.<br>
<br>
Hope that helps.<br>
<br>
Best regards,<br>
<br>
Christopher<br>
<br>
On 2017-07-10 15:49, Jeff Willert wrote:<br>
> I have recently started using CBC both standalone and through the PuLP <br>
> interface.  Some of my problems become rather large and take a <br>
> significant amount of time to run.  Unfortunately, I've been having <br>
> issues with computer reliability (power outages and such) and if the <br>
> optimization hasn't completed, I lose all of the progress which has been <br>
> made.<br>
> <br>
> Does CBC currently have the ability to write (to a file) the current <br>
> best solution at some interval, either in time or based on an iteration <br>
> count?  I've been looking at the source code but I am only a moderate C <br>
> programmer and haven't been able to find an easy way to do this.  I'm <br>
> happy to make changes to the code myself on my local copy if someone <br>
> could point me to the correct location.  Even an approximate solution is <br>
> better than losing all progress.<br>
> <br>
> Regards,<br>
> Jeff<br>
> <br>
> <br>
> ______________________________<wbr>_________________<br>
> Cbc mailing list<br>
> <a href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a><br>
> </font></tt><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=gEVaymfbiUvp55D10lWK6mFSIIFoSWnM41MvN3xiko6wjVENkHAS1IDcdpwngCCy&m=vU7ldw2G_FnOiwF6LzEqInJmI-c3LU0ZdJbjz2dLUtA&s=9h8XAYvraSGlKjFkU5k6pDTjF0_lUajzEXZKpbmXndw&e=" target="_blank"><tt><font size="2">https://urldefense.proofpoint.<wbr>com/v2/url?u=https-3A__list.<wbr>coin-2Dor.org_mailman_<wbr>listinfo_cbc&d=DwICAg&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>gEVaymfbiUvp55D10lWK6mFSIIFoSW<wbr>nM41MvN3xiko6wjVENkHAS1IDcdpwn<wbr>gCCy&m=vU7ldw2G_<wbr>FnOiwF6LzEqInJmI-<wbr>c3LU0ZdJbjz2dLUtA&s=<wbr>9h8XAYvraSGlKjFkU5k6pDTjF0_<wbr>lUajzEXZKpbmXndw&e=</font></tt></a></div></div><tt><font size="2"><div><div class="h5"><br>
> <br>
<br>
-- <br>
Christopher Gross, M.Sc.<br>
<br>
Lehrstuhl für Health Care Operations/Health Information Management<br>
<br>
Universitäres Zentrum für Gesundheitswissenschaften am Klinikum Augsburg<br>
(UNIKA-T), Neusässer Straße 47, 86156 Augsburg;<br>
<br>
Wirtschaftswissenschaftliche Fakultät, Universität Augsburg,<br>
Universitätsstraße 16, 86159 Augsburg<br>
<br>
<br>
Tel.: <a href="tel:+49%20821%205986452" value="+498215986452" target="_blank">+49 821 598-6452</a><br>
<br>
E-Mail:  <a href="mailto:christopher.gross@unikat.uni-augsburg.de" target="_blank">christopher.gross@unikat.uni-<wbr>augsburg.de</a><br></div></div>
Web:  </font></tt><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.unika-2Dt.de_&d=DwIGaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=UGItoAdbN76DIO86bdusOQ&m=h2okBq7QuhYOBOu_SO6GMhp38YAi-_8am9cv4MIxkdI&s=bgspdUjsrozmDWtHwUipNFw1dn1yofHex5GvrQU3tLE&e=" target="_blank"><tt><font size="2">https://urldefense.<wbr>proofpoint.com/v2/url?u=http-<wbr>3A__www.unika-2Dt.de_&d=<wbr>DwIGaQ&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>UGItoAdbN76DIO86bdusOQ&m=<wbr>h2okBq7QuhYOBOu_SO6GMhp38YAi-_<wbr>8am9cv4MIxkdI&s=<wbr>bgspdUjsrozmDWtHwUipNFw1dn1yof<wbr>Hex5GvrQU3tLE&e=</font></tt></a><tt><font size="2">
<br><span class="">
______________________________<wbr>_________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org" target="_blank">Cbc@list.coin-or.org</a><br>
</span></font></tt><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.org_mailman_listinfo_cbc&d=DwIGaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=UGItoAdbN76DIO86bdusOQ&m=h2okBq7QuhYOBOu_SO6GMhp38YAi-_8am9cv4MIxkdI&s=ty2FrXQdupLpHRwSISjxh_Bl47e8rhai98aeLk8NPoY&e=" target="_blank"><tt><font size="2">https://urldefense.proofpoint.<wbr>com/v2/url?u=https-3A__list.<wbr>coin-2Dor.org_mailman_<wbr>listinfo_cbc&d=DwIGaQ&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>UGItoAdbN76DIO86bdusOQ&m=<wbr>h2okBq7QuhYOBOu_SO6GMhp38YAi-_<wbr>8am9cv4MIxkdI&s=<wbr>ty2FrXQdupLpHRwSISjxh_<wbr>Bl47e8rhai98aeLk8NPoY&e=</font></tt></a><tt><font size="2">
<br>
</font></tt><br>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div>Stuart Mitchell</div><div>PhD Engineering Science</div><div><span>Extraordinary </span><span>Freelance Programmer and Optimisation Guru</span></div><div><a href="http://www.stuartmitchell.com" target="_blank">www.stuartmitchell.com</a></div></div>
</div>