[Coin-discuss] some information about Cbc

John J Forrest jjforre at us.ibm.com
Thu Aug 3 08:22:49 EDT 2006


Benoît,

Your approach adds all possible cuts before going on to allow Cbc to
branch.  Are you sure you need to do that?  The main thing is to add cuts
while you have what looks like an integral solution but which is invalid
because of possible cuts.  You also want to add cuts to improve bound but
it is the first that is important.  You can force Cbc to keep going round
adding cuts until you tell it to stop and there are various other switches
you can set to avoid fake solutions e.g. in strong branching.  You can find
an example in examples/qmip2.cpp.  It is still a bit experimental.

It might also be useful to use -pg to profile your code to see where time
is being spent.

John Forrest


                                                                           
             Benoît MERLET                                                 
             <benoit.merlet at or                                             
             ange-ft.com>                                               To 
             Sent by:                  Discussions about open source       
             coin-discuss-boun         software for Operations Research    
             ces at list.coin-or.         <coin-discuss at list.coin-or.org>     
             org                                                        cc 
                                                                           
                                                                   Subject 
             08/02/06 11:01 AM         Re: [Coin-discuss] some information 
                                       about Cbc                           
                                                                           
             Please respond to                                             
             Discussions about                                             
                open source                                                
               software for                                                
                Operations                                                 
                 Research                                                  
             <coin-discuss at lis                                             
              t.coin-or.org>                                               
                                                                           
                                                                           




> Benoît,
>
> Part of the problem could be basis handling.  The actual copying of the
> solver should not take much time but the way you are doing it you are
> losing the optimal basis.
>
> I would replace the loadProblem by
>
> OsiSolverInterface * osiSolver = si.clone();  which keeps basis
> information.
>
> Then if you need an OsiClpSolverInterface do a dynamic cast.
>
> See if that helps.  If not I may have one more suggestion but that is the
> simplest.
>
> John Forrest

John,

Thank you for your first suggestion !

Here are the result of the command `time' on the executable.

   * with the loadProblem :

422.95user 48.57system 8:02.77elapsed 97%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (4major+2984823minor)pagefaults 0swaps

   * with the clone :

372.24user 62.17system 7:47.75elapsed 92%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (673major+4512987minor)pagefaults 0swaps

The result is a gain of 50 seconds of execution time, ie 12%.

I'm curious to know your other suggestion. :)

Benoît.


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






More information about the Coin-discuss mailing list