[Cbc] Documentation; Warmstart; Timelimit
Haroldo Gambini Santos
haroldo.santos at gmail.com
Thu Nov 12 15:08:33 EST 2015
Hi Mona,
Could you include the log of the solver so that I can check if there is
some message indicating what happened ?
Cheers
On 12-11-2015 12:00, Mona Rahn wrote:
> Hi Haroldo,
>
> Thanks for your answer.
>
> I actually meant getting the mipstart (after solving), not entering it
> to the solver. Anyway, I now programmed my own function to do that,
> and I feed the solver the mipstart upon the next solve via setMIPStart
> as you suggested - but it doesn't seem to change anything! When I
> resolve, it still takes quite a lot of time to find a feasible
> solution. Do you have an idea on that?
>
> Thanks a lot for your help!
>
> Kind regards,
> Mona
>
> On Wed, Nov 11, 2015 at 4:37 PM, Haroldo Gambini Santos
> <haroldo.santos at gmail.com <mailto:haroldo.santos at gmail.com>> wrote:
>
> Hi Mona,
>
> To enter MIPStart programatically you should call
>
> CbcModel method
> void setMIPStart( const std::vector< std::pair< std::string,
> double > > &mips ) {
> this->mipStart_ = mips;
> }
>
> MIPstart is used when you an initial feasible solution to enter to
> the solver.
>
> You need to inform shit solution using pairs
>
> variableName value
>
> variable names are used because the initial solution may be used
> in the pre-processed model (variable indexes change).
>
> You only need to enter the main active decision variables.
> Auxiliary variables are computed if they exist.
>
> Cheers,
>
> Haroldo
>
>
>
>
> On 11-11-2015 12:38, Mona Rahn wrote:
>> @ John:
>> Thanks for your answer.
>> Is there a function to save the mipstart (as getMIPStart doesn't
>> seem to do it)? And do you have an example about mipstart?
>> The event handler works perfectly btw! :) Thanks.
>>
>> @ Ted, Babak: thank you too!
>>
>> Btw, can anybody tell me is the precise difference is between
>> - hotstart
>> - warmstart
>> - resolve
>> - mipstart?
>>
>> Kind regards,
>> Mona
>>
>>
>> On Sat, Nov 7, 2015 at 3:46 PM, John Forrest
>> <john.forrest at fastercoin.com
>> <mailto:john.forrest at fastercoin.com>> wrote:
>>
>> Mona,
>>
>> On 06/11/15 13:45, Mona Rahn wrote:
>>> Hi!
>>>
>>> I have three questions:
>>>
>>> 1) I am pretty new in using CBC with C++. Do you have a tip
>>> on a good way to start, i.e. a documentation / tutorial /
>>> handbook for beginners? Most of the stuff I found online was
>>> aimed at a much higher level of knowledge. The documentation
>>> link that can be found on the COIN-OR website
>>> (https://projects.coin-or.org/Cbc at the bottom) doesn't work.
>>>
>> Documentation has never been the strong point of Cbc. It can
>> be useful to invoke cbc and try ? and then look at individual
>> options - see 2)
>>
>>> 2) I have an minimization LP that I resolve several times
>>> with different objectives. That is, I solve it, upper bound
>>> the unique variable appearing in my first objective function
>>> to the calculated value, and set another variable as my
>>> objective.
>>> Now, my question is: The solver appears to start from
>>> scratch every time I call it, but I would like to keep the
>>> old solution and start from there. Is there a way to do
>>> this? I have seen the warm start in OsiCbcSolverinterface,
>>> but I am not sure how to use it.
>>>
>>
>> If you do cbc and then mipstart?? you will see that you can
>> save the solution from one run and then use it as an input
>> solution to next.
>>> 3) I would like to have set a time limit that only stops the
>>> program if there is already a solution found (which isn't
>>> necessarily optimal), but not if it is still searching for a
>>> solution. The only time limit I have found is
>>> CbcModel::setMaximumSeconds, but this stops the program no
>>> matter what. Do you have a solution for this?
>>>
>>
>> You may wish to use the drivers that allow you to call cbc as
>> normal but with changes. Look at driver6.cpp. If you have a
>> driver like that then you could check if you have a solution
>> and then stop on time. I would suggest modifying
>> MyEventHandler3::event to check if event was treeStatus and
>> solution found and too many seconds.
>>
>> John Forrest
>>> Thanks a lot in advance.
>>>
>>> Kind regards,
>>> Mona
>>>
>>>
>>> _______________________________________________
>>> Cbc mailing list
>>> Cbc at list.coin-or.org <mailto:Cbc at list.coin-or.org>
>>> http://list.coin-or.org/mailman/listinfo/cbc
>>
>>
>> _______________________________________________
>> Cbc mailing list
>> Cbc at list.coin-or.org <mailto:Cbc at list.coin-or.org>
>> http://list.coin-or.org/mailman/listinfo/cbc
>>
>>
>>
>>
>> _______________________________________________
>> Cbc mailing list
>> Cbc at list.coin-or.org <mailto:Cbc at list.coin-or.org>
>> http://list.coin-or.org/mailman/listinfo/cbc
>
> --
> ==================================================
> Haroldo Gambini Santos
> D.Sc, Computer Science
> Universidade Federal de Ouro Preto
> http://www.decom.ufop.br/haroldo/
>
>
--
==================================================
Haroldo Gambini Santos
D.Sc, Computer Science
Universidade Federal de Ouro Preto
http://www.decom.ufop.br/haroldo/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20151112/485822ee/attachment.html>
More information about the Cbc
mailing list