[Coin-discuss] Osi interfaces do not return MIP status appropriately!

John J Forrest jjforre at us.ibm.com
Wed May 16 06:46:02 EDT 2007


Vishy,

OsiCbcSolverInterface is just like Osi...SolverInterface in many ways, so
those functions are returning values for the last continuous solve - not
for branch and bound.

Look at Cbc specific public interfaces.  So use ->status() to see if search
completed.  You may also need to use functions such as getModelPtr()->
isProvenOptimal() which ask questions of the underlying cbc solver.

John Forrest


                                                                           
             "Vishy Jeet"                                                  
             <vishv.jeet at gmail                                             
             .com>                                                      To 
             Sent by:                  coin-discuss at list.coin-or.org       
             coin-discuss-boun                                          cc 
             ces at list.coin-or.                                             
             org                                                   Subject 
                                       [Coin-discuss] Osi interfaces do    
                                       not return MIP status               
             05/14/07 05:47 PM         appropriately!                      
                                                                           
                                                                           
             Please respond to                                             
             Discussions about                                             
                open source                                                
               software for                                                
                Operations                                                 
                 Research                                                  
             <coin-discuss at lis                                             
              t.coin-or.org>                                               
                                                                           
                                                                           





Hi everyone,

I am using an MPS file which is located at the following location:
http://uts.cc.utexas.edu/~jeetv/MIPproblem.mps. (too big to be posted
here...)

When I am using the following code it returns the message isAbandoned
regardless
whether branchAndBound() is called or not....but if I use Cbc solver
directly, it returns the primal infeasibility. Could you check if the
status functions (called in the code below) written OsiCbcSolverInterface()
are working properly..

regards,
vishy

Code for solving the MPS file using Osi interface:

#include <iostream.h>
#include "OsiCbcSolverInterface.hpp"


int main() {
  MP_model my_knap(new OsiCbcSolverInterface);
  int num_err = 0;
  num_err = my_knap->readMps("MIPproblem");
  if(num_err != 0)
  cout << "errors reading MPS file\n";

  my_knap->branchAndBound();)


  if( my_knap->isProvenPrimalInfeasible() == true)
    cout << "primal infeasible\n";
   if( my_knap->isProvenDualInfeasible() == true)
    cout << "dual infeasible\n";
  if( my_knap->isAbandoned() == true)
    cout << "isAbandoned\n";
  if( my_knap->isProvenOptimal() == true)
    cout << "isProvenOptimal\n";
   if( my_knap->isDualObjectiveLimitReached() == true)
    cout << "isDualObjectiveLimitReached\n";
  if( my_knap->isPrimalObjectiveLimitReached() == true)
    cout << "isPrimalObjectiveLimitReached\n";
  if( my_knap->isIterationLimitReached() == true)
    cout << "isIterationLimitReached\n";
}


executabe  prints "isAbandoned"....



Code for solving the MPS file using Cbc directly:)

Using minimum.cpp in Cbc examples --aalong with the following test:

 33   if (model.isProvenInfeasible () == true)
 34     cout<< "YES"<<endl;
 35   else
 36     cout<< "NO"<<endl;

executabe  prints "YES"....

















--
Best Regards,
Vishv Jeet, Ph.D.,
Operations Research Scientist,
Gravitant Inc.,
(The Business Governance Company)
http://www.gravitant.com.
Austin, TX, USA.
Cell    : 1-512-657-8678
Home : 1-512-788-5795
Work  : 1-512-535-7399
_______________________
Youngest Music Meastro
http://www.mayanksahu.net. _______________________________________________
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