[Coin-discuss] Problem in Osi->branchAndBound() (with Clp as linear solver)

John J Forrest jjforre at us.ibm.com
Fri Apr 7 09:31:05 EDT 2006


Mathieu,

It was only meant to be a simple implementation to help you out not a fully
tested version.

I will look into it when I get time but why not try  -

OsiClpSolverInterface model - got by some method
while ()
  OsiSolverInterface * newModel = model.clone();
  // modify newModel if you want
  newModel->branchAndBound();
  // use results
  delete newModel;
}

John Forrest


                                                                           
             mathieu lacroix                                               
             <mathieu.lacroix@                                             
             isima.fr>                                                  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 
             04/07/06 09:18 AM         [Coin-discuss] Problem in           
                                       Osi->branchAndBound() (with Clp as  
                                       linear   solver)                    
             Please respond to                                             
             Discussions about                                             
                open source                                                
               software for                                                
                Operations                                                 
                 Research                                                  
             <coin-discuss at lis                                             
              t.coin-or.org>                                               
                                                                           
                                                                           




Hi,

I use COIN (OSI/CLP) in linear optimization lesson. I need to solve a
little integer linear problem so I use  the osi method
branchAndBound().  I thank you a lot to implement the method with the
linear solver Clp. It work well but  there  still exists a little
mistake. Indeed, you can't run the branchAndBound method more than once
on the same OSI object. In this case, it throws an exception. (One
reason is that when you write the problem in a lp file after running
once branchAndBound method, the lower and upper bounds of the variables
are not the initial ones but the one of the optimal solution. But, even
you change those bounds (setColLower(...) and setColUpper(...)), it
doesn't work and throws an exception. I think that it is because in a
more general form, at the end of the branchandbound method, the initial
data are substituted by other generated and used by the branchAndBound()
method).
Or, I have to solve the integer linear problem of 4 variables and one
constraint several times by changing each time only objective
coefficients. The only way to do it is to construct each time a new
problem from scratch or to apply the method loadProblem(...), even if it
is exactly the same problem you want to solve twice.

Thank you in advance for your answer,

Best regards,

Mathieu LACROIX



--
Mathieu LACROIX
mathieu.lacroix at isima.fr
Université Blaise Pascal - Clermont Fd II
Laboratoire LIMOS
Bâtiment ISIMA - Bureau D112
Complexe scientifique des Cézeaux
63 177 Aubière, Cedex - France
Tel : 04.73.40.79.48
Fax : 04.73.40.76.39

_______________________________________________
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