[Coin-discuss] Cbc branchAndBound

Matthew Galati Matthew.Galati at sas.com
Fri Mar 16 15:03:31 EDT 2007


./cbc -cpp 1 -solve
 
 cat "void branchAndBound() {"           >> CbcModel.hpp
 cat "void CbcModel::branchAndBound() {" >> CbcModel.cpp
 cat user_driver.cpp                     >> CbcModel.cpp
 cat " } "                               >> CbcModel.cpp
 
So, would something like this work?  :)
 
Matt
 
 

________________________________

From: coin-discuss-bounces at list.coin-or.org [mailto:coin-discuss-bounces at list.coin-or.org] On Behalf Of John J Forrest
Sent: Friday, March 16, 2007 2:10 PM
To: Discussions about open source software for Operations Research
Subject: Re: [Coin-discuss] Cbc branchAndBound



Of course there is also this 

cbc -cpp 1 -solve

this generates user_driver.cpp which does pretty well everything (not sure if RINS got in yet).

John Forrest
 Esben Mose Hansen <esben at ange.dk>




				Esben Mose Hansen <esben at ange.dk> 
				Sent by: coin-discuss-bounces at list.coin-or.org 

				03/16/07 01:15 PM 
	
	Please respond to
Discussions about open source software for Operations Research <coin-discuss at list.coin-or.org>

 

To

Discussions about open source software for Operations Research <coin-discuss at list.coin-or.org>	


cc

	


Subject

Re: [Coin-discuss] Cbc branchAndBound	
	 	

On Thursday 15 March 2007 14:53:32 Matthew Galati wrote:
> Hi -- lots of related discussion on other threads. Solutions all seem to
> involve a re-design or new version of OSI.
>
> Can someone just answer this simple question?
>   CbcModel cbc(*si);
>   CbcStrategyDefault cbcStrategyDefault;
>   cbc.setStrategy(cbcStrategyDefault);
>   cbc.branchAndBound();
>
> Is this approximately equivalent to what is in CoinSolve.cpp? From
> experimentation, just running cbc.branchAndBound() without setting the
> strategy is a bad idea.

As John wrote, not really. What I did was look in the source code for cbc 
(especially cbcsolve()) and lift anything that looked useful.

No idea what that analyse() function is supposed to do. I have yet to find a 
problem for which it returns anything useful, though, so you can probably 
just skip that. Then skip anything about option handling and cut out look at 
the bit concerning branch and bound, and you will get down to the 100 lines 
or so that will get you a solver that works "like cbc". Of course, that code 
doesn't use stuff like the strategy, but I have no experience using that.

Essentially, you want to do 3 things:
1. preprocess
2. add cutgenerators
3. add heuristics.

It is not too hard to see which one Cbc uses per default (which are most).

-- 
kind regards, Esben
_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20070316/cdef684a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: graycol.gif
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20070316/cdef684a/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: ecblank.gif
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20070316/cdef684a/attachment-0001.gif>


More information about the Coin-discuss mailing list