[Coin-discuss] Osi interfaces do not return MIP status	appropriately!
    Vishy Jeet 
    vishv.jeet at gmail.com
       
    Mon May 14 17:47:34 EDT 2007
    
    
  
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20070514/0674cef4/attachment.html>
    
    
More information about the Coin-discuss
mailing list