<div dir="ltr">I like the solution as outlined in Message 4 with the ability to "hot-start" from the saved solution.  Can anyone provide insight into how to do this?  I'm not very familiar with the CBC event handler.<div><br></div><div>Regards,</div><div>Jeff</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 10, 2017 at 12:00 PM,  <span dir="ltr"><<a href="mailto:cbc-request@coin-or.org" target="_blank">cbc-request@coin-or.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Cbc mailing list submissions to<br>
        <a href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <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=YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_2SOzf_unxwWOU&m=33A66K40oFtlLoKFA-MJBes5sHDL4o1el_Yj5FeWUEM&s=kvyJSGNdxzP9OQ2TjtL2zwOXXrdaKqW5EZX4vCuLr5w&e=" rel="noreferrer" target="_blank">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>YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_<wbr>2SOzf_unxwWOU&m=<wbr>33A66K40oFtlLoKFA-<wbr>MJBes5sHDL4o1el_Yj5FeWUEM&s=<wbr>kvyJSGNdxzP9OQ2TjtL2zwOXXrdaKq<wbr>W5EZX4vCuLr5w&e=</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:cbc-request@list.coin-or.org">cbc-request@list.coin-or.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:cbc-owner@list.coin-or.org">cbc-owner@list.coin-or.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Cbc digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Intermediate Results (Jeff Willert)<br>
   2. Re: Intermediate Results (Christopher Gross)<br>
   3. Re: Intermediate Results (Tobias Stengel)<br>
   4. Re: Intermediate Results (<a href="mailto:acw@ascent.com">acw@ascent.com</a>)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Mon, 10 Jul 2017 09:49:54 -0400<br>
From: Jeff Willert <<a href="mailto:willert.jeff@gmail.com">willert.jeff@gmail.com</a>><br>
To: <a href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a><br>
Subject: [Cbc] Intermediate Results<br>
Message-ID:<br>
        <<a href="mailto:CAGCnxHmwSpzSyodE40FdsJBc808GMdzBQRApsAOL-Kd8NGGF8A@mail.gmail.com">CAGCnxHmwSpzSyodE40FdsJBc808G<wbr>MdzBQRApsAOL-Kd8NGGF8A@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<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 significant<br>
amount of time to run.  Unfortunately, I've been having issues with<br>
computer reliability (power outages and such) and if the optimization<br>
hasn't completed, I lose all of the progress which has been made.<br>
<br>
Does CBC currently have the ability to write (to a file) the current best<br>
solution at some interval, either in time or based on an iteration count?<br>
I've been looking at the source code but I am only a moderate C programmer<br>
and haven't been able to find an easy way to do this.  I'm happy to make<br>
changes to the code myself on my local copy if someone could point me to<br>
the correct location.  Even an approximate solution is better than losing<br>
all progress.<br>
<br>
Regards,<br>
Jeff<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_pipermail_cbc_attachments_20170710_cc9cd2bd_attachment-2D0001.html&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_2SOzf_unxwWOU&m=33A66K40oFtlLoKFA-MJBes5sHDL4o1el_Yj5FeWUEM&s=7ZOg_8fX3AxzT1Yo1Nqz5eNL7TGEjq05Dw8Gzeid7bY&e=" rel="noreferrer" target="_blank">https://urldefense.<wbr>proofpoint.com/v2/url?u=http-<wbr>3A__list.coin-2Dor.org_<wbr>pipermail_cbc_attachments_<wbr>20170710_cc9cd2bd_attachment-<wbr>2D0001.html&d=DwICAg&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_<wbr>2SOzf_unxwWOU&m=<wbr>33A66K40oFtlLoKFA-<wbr>MJBes5sHDL4o1el_Yj5FeWUEM&s=<wbr>7ZOg_<wbr>8fX3AxzT1Yo1Nqz5eNL7TGEjq05Dw8<wbr>Gzeid7bY&e=</a> ><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 10 Jul 2017 16:50:08 +0200<br>
From: Christopher Gross <<a href="mailto:christopher.gross@unikat.uni-augsburg.de">christopher.gross@unikat.uni-<wbr>augsburg.de</a>><br>
To: <a href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a><br>
Subject: Re: [Cbc] Intermediate Results<br>
Message-ID:<br>
        <<a href="mailto:ae648c7b-bdfd-1eac-a871-e8fd1e857655@unikat.uni-augsburg.de">ae648c7b-bdfd-1eac-a871-<wbr>e8fd1e857655@unikat.uni-<wbr>augsburg.de</a>><br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
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">Cbc@list.coin-or.org</a><br>
> <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=" rel="noreferrer" target="_blank">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=</a><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:%2B49%20821%20598-6452" value="+498215986452">+49 821 598-6452</a><br>
<br>
E-Mail:  <a href="mailto:christopher.gross@unikat.uni-augsburg.de">christopher.gross@unikat.uni-<wbr>augsburg.de</a><br>
Web:  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.unika-2Dt.de_&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_2SOzf_unxwWOU&m=33A66K40oFtlLoKFA-MJBes5sHDL4o1el_Yj5FeWUEM&s=LzRV5Fms_Su_hBwOQsovkYbg9GEd_k_ypCxDR1bLuRc&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__www.<wbr>unika-2Dt.de_&d=DwICAg&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_<wbr>2SOzf_unxwWOU&m=<wbr>33A66K40oFtlLoKFA-<wbr>MJBes5sHDL4o1el_Yj5FeWUEM&s=<wbr>LzRV5Fms_Su_hBwOQsovkYbg9GEd_<wbr>k_ypCxDR1bLuRc&e=</a><br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 10 Jul 2017 15:21:02 +0000<br>
From: Tobias Stengel <<a href="mailto:Tobias.Stengel@locom.de">Tobias.Stengel@locom.de</a>><br>
To: "<a href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a>" <<a href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a>><br>
Subject: Re: [Cbc] Intermediate Results<br>
Message-ID:<br>
        <<wbr>EDC45EE5442B124EBB022ECACBBA59<wbr>11EC8567@VM-Exchange2010.<wbr>intranet.lan><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
It is not that difficult (assuming you are using something like Cbc/samples/driver4.cpp, remove the "static int callBack(CbcModel * model, int whereFrom)" function):<br>
<br>
 - Create your on subclass of  CbcEventHandler if you don't have one [1]. Override event(CbcEvent). In driver4.cpp there is "MyEventHandler3" which queries each new solution as soon as one is found.<br>
<br>
- a feasible solution can be loaded like this:<br>
CbcModel* model = ...<br>
std::vector<std::pair<std::<wbr>string, double> > sol; auto solver = model->solver();<br>
double* initialSolution = ...<br>
for (int i = 0; i < number_of_columns; ++i) {<br>
        const auto val = initialSolution[i];<br>
        sol.emplace_back(solver-><wbr>getColName(i), val); }<br>
<br>
model->setMIPStart(sol);<br>
<br>
Note that setting the MIPStart does not prevent CBC from visiting (at least some) of the nodes it visited in the previous run.<br>
So fixing the power supply will be better.<br>
<br>
Tobias<br>
<br>
[1] <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.coin-2Dor.org_Doxygen_Cbc_classCbcEventHandler.html&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_2SOzf_unxwWOU&m=33A66K40oFtlLoKFA-MJBes5sHDL4o1el_Yj5FeWUEM&s=w_KkCbR9OCwKwPB6XrdD-o9OgjO4jEPgqzBFKNf9zR4&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=https-3A__www.<wbr>coin-2Dor.org_Doxygen_Cbc_<wbr>classCbcEventHandler.html&d=<wbr>DwICAg&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_<wbr>2SOzf_unxwWOU&m=<wbr>33A66K40oFtlLoKFA-<wbr>MJBes5sHDL4o1el_Yj5FeWUEM&s=w_<wbr>KkCbR9OCwKwPB6XrdD-<wbr>o9OgjO4jEPgqzBFKNf9zR4&e=</a><br>
[2] <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.coin-2Dor.org_Doxygen_Cbc_classCbcModel.html-23a3a1e768202835e9ee3c6d415e992e543&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_2SOzf_unxwWOU&m=33A66K40oFtlLoKFA-MJBes5sHDL4o1el_Yj5FeWUEM&s=wQQeIVrQTsleknGBeKMuVCSUcf4eUrIuE3MJUq2qOw0&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=https-3A__www.<wbr>coin-2Dor.org_Doxygen_Cbc_<wbr>classCbcModel.html-<wbr>23a3a1e768202835e9ee3c6d415e99<wbr>2e543&d=DwICAg&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_<wbr>2SOzf_unxwWOU&m=<wbr>33A66K40oFtlLoKFA-<wbr>MJBes5sHDL4o1el_Yj5FeWUEM&s=<wbr>wQQeIVrQTsleknGBeKMuVCSUcf4eUr<wbr>IuE3MJUq2qOw0&e=</a><br>
<br>
<br>
<br>
-----Urspr?ngliche Nachricht-----<br>
Von: Cbc [mailto:<a href="mailto:cbc-bounces@coin-or.org">cbc-bounces@coin-or.<wbr>org</a>] Im Auftrag von Christopher Gross<br>
Gesendet: Montag, 10. Juli 2017 16:50<br>
An: <a href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a><br>
Betreff: Re: [Cbc] Intermediate Results<br>
<br>
Hi Jeff,<br>
<br>
being only an average C programmer myself and having looked at CBC code before, I would assume that storing and loading intermediate solution data will be quite a feat. Unfortunately, I can't give you any advice on 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 (UPS)? Consumer units are available for less than 100USD and will last about 5-20 minutes, depending on the size of the device and your power consumption. If your power outages aren't longer than that, this should be sufficient to continue running your computations.<br>
<br>
If your power outages are longer than that, you could also consider running CBC in a virtual machine. Those can be paused and resumed at a later point in time. When the power goes out, your UPS will signal your guest system which will pause the virtual machine and shut down the system. You can then power it back up when the power is back on and 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<br>
> been 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<br>
> iteration count?  I've been looking at the source code but I am only a<br>
> moderate C programmer and haven't been able to find an easy way to do<br>
> this.  I'm happy to make changes to the code myself on my local copy<br>
> if someone could point me to the correct location.  Even an<br>
> approximate solution is 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">Cbc@list.coin-or.org</a><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__list.coin-2Dor.or" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=https-3A__list.<wbr>coin-2Dor.or</a><br>
> g_mailman_listinfo_cbc&d=<wbr>DwICAg&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WP<br>
> A_2Wlc4&r=<wbr>gEVaymfbiUvp55D10lWK6mFSIIFoSW<wbr>nM41MvN3xiko6wjVENkHAS1IDcdpwn<br>
> gCCy&m=vU7ldw2G_<wbr>FnOiwF6LzEqInJmI-<wbr>c3LU0ZdJbjz2dLUtA&s=<wbr>9h8XAYvraSGlKjFkU<br>
> 5k6pDTjF0_lUajzEXZKpbmXndw&e=<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 (UNIKA-T), Neus?sser Stra?e 47, 86156 Augsburg;<br>
<br>
Wirtschaftswissenschaftliche Fakult?t, Universit?t Augsburg, Universit?tsstra?e 16, 86159 Augsburg<br>
<br>
<br>
Tel.: +49 821 598-6452<br>
<br>
E-Mail:  <a href="mailto:christopher.gross@unikat.uni-augsburg.de">christopher.gross@unikat.uni-<wbr>augsburg.de</a><br>
Web:  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.unika-2Dt.de_&d=DwIGaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=zU1-bo4qay1GSxqnW8lKSuGZO4rtR2XKpD4FKabSFw8&m=2opujEm6AKOMaW_68TgwVQUe5l_PIR6UYRQCEHFVUqY&s=JEpeyKDI4-QhbOIXGrFjyvO0_roHye4MTgYVvYEeVm0&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__www.<wbr>unika-2Dt.de_&d=DwIGaQ&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=zU1-<wbr>bo4qay1GSxqnW8lKSuGZO4rtR2XKpD<wbr>4FKabSFw8&m=2opujEm6AKOMaW_<wbr>68TgwVQUe5l_PIR6UYRQCEHFVUqY&<wbr>s=JEpeyKDI4-QhbOIXGrFjyvO0_<wbr>roHye4MTgYVvYEeVm0&e=</a><br>
______________________________<wbr>_________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a><br>
<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=zU1-bo4qay1GSxqnW8lKSuGZO4rtR2XKpD4FKabSFw8&m=2opujEm6AKOMaW_68TgwVQUe5l_PIR6UYRQCEHFVUqY&s=86AV8-RKq-46OnS-iTFOyMjBx5dqf-4aj64i2ruqKHY&e=" rel="noreferrer" target="_blank">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=zU1-<wbr>bo4qay1GSxqnW8lKSuGZO4rtR2XKpD<wbr>4FKabSFw8&m=2opujEm6AKOMaW_<wbr>68TgwVQUe5l_PIR6UYRQCEHFVUqY&<wbr>s=86AV8-RKq-46OnS-<wbr>iTFOyMjBx5dqf-4aj64i2ruqKHY&e=</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Mon, 10 Jul 2017 11:22:48 -0400<br>
From: <a href="mailto:acw@ascent.com">acw@ascent.com</a><br>
To: Christopher Gross <<a href="mailto:christopher.gross@unikat.uni-augsburg.de">christopher.gross@unikat.uni-<wbr>augsburg.de</a>><br>
Cc: Cbc <<a href="mailto:cbc-bounces@coin-or.org">cbc-bounces@coin-or.org</a>>, <a href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a><br>
Subject: Re: [Cbc] Intermediate Results<br>
Message-ID:<br>
        <<a href="mailto:OF346FE62A.2CFF6087-ON85258159.005419FB-85258159.00547C5D@ascent.com">OF346FE62A.2CFF6087-<wbr>ON85258159.005419FB-85258159.<wbr>00547C5D@ascent.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Jeff, the CBC event handler absolutely has a callback that it calls<br>
whenever it finds a new best-so-far solution. You can fill in that<br>
callback to write out an MPS file, and then when you restart, you can read<br>
the saved solution and "hot-start" from it, or (almost as good) add a<br>
constraint that insists that the objective be at least as good as the one<br>
that was found earlier.<br>
<br>
<br>
<br>
From:<br>
Christopher Gross <<a href="mailto:christopher.gross@unikat.uni-augsburg.de">christopher.gross@unikat.uni-<wbr>augsburg.de</a>><br>
To:<br>
<a href="mailto:cbc@list.coin-or.org">cbc@list.coin-or.org</a><br>
Date:<br>
07/10/2017 10:52 AM<br>
Subject:<br>
Re: [Cbc] Intermediate Results<br>
<br>
<br>
<br>
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>
<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>
<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">Cbc@list.coin-or.org</a><br>
><br>
<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=" rel="noreferrer" target="_blank">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=</a><br>
<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:%2B49%20821%20598-6452" value="+498215986452">+49 821 598-6452</a><br>
<br>
E-Mail:  <a href="mailto:christopher.gross@unikat.uni-augsburg.de">christopher.gross@unikat.uni-<wbr>augsburg.de</a><br>
Web:<br>
<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=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__www.<wbr>unika-2Dt.de_&d=DwIGaQ&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>UGItoAdbN76DIO86bdusOQ&m=<wbr>h2okBq7QuhYOBOu_SO6GMhp38YAi-_<wbr>8am9cv4MIxkdI&s=<wbr>bgspdUjsrozmDWtHwUipNFw1dn1yof<wbr>Hex5GvrQU3tLE&e=</a><br>
<br>
______________________________<wbr>_________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a><br>
<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=" rel="noreferrer" target="_blank">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=</a><br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coin-2Dor.org_pipermail_cbc_attachments_20170710_587f7c2c_attachment-2D0001.html&d=DwICAg&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_2SOzf_unxwWOU&m=33A66K40oFtlLoKFA-MJBes5sHDL4o1el_Yj5FeWUEM&s=mqks9Ji98tY7-ArIvtd2Tm52PFtWgVSsb3usx4bkPzE&e=" rel="noreferrer" target="_blank">https://urldefense.<wbr>proofpoint.com/v2/url?u=http-<wbr>3A__list.coin-2Dor.org_<wbr>pipermail_cbc_attachments_<wbr>20170710_587f7c2c_attachment-<wbr>2D0001.html&d=DwICAg&c=Ngd-<wbr>ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLx<wbr>WPA_2Wlc4&r=<wbr>YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_<wbr>2SOzf_unxwWOU&m=<wbr>33A66K40oFtlLoKFA-<wbr>MJBes5sHDL4o1el_Yj5FeWUEM&s=<wbr>mqks9Ji98tY7-<wbr>ArIvtd2Tm52PFtWgVSsb3usx4bkPzE<wbr>&e=</a> ><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<br>
Cbc mailing list<br>
<a href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a><br>
<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=YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_2SOzf_unxwWOU&m=33A66K40oFtlLoKFA-MJBes5sHDL4o1el_Yj5FeWUEM&s=kvyJSGNdxzP9OQ2TjtL2zwOXXrdaKqW5EZX4vCuLr5w&e=" rel="noreferrer" target="_blank">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>YUeQqYslcDlgyHs6ZNNI0gXeJaAfI_<wbr>2SOzf_unxwWOU&m=<wbr>33A66K40oFtlLoKFA-<wbr>MJBes5sHDL4o1el_Yj5FeWUEM&s=<wbr>kvyJSGNdxzP9OQ2TjtL2zwOXXrdaKq<wbr>W5EZX4vCuLr5w&e=</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Cbc Digest, Vol 119, Issue 4<br>
******************************<wbr>*****<br>
</blockquote></div><br></div>