Ignore:
Timestamp:
Nov 9, 2009 6:33:07 PM (10 years ago)
Author:
EdwinStraver
Message:

Changed formatting using AStyle -A4 -p

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/Cbc/src/Cbc_C_Interface.cpp

    r1271 r1286  
    1818
    1919//  bobe including extras.h to get strdup()
    20 #if defined(__MWERKS__) 
     20#if defined(__MWERKS__)
    2121// #include <extras.h>  // bobe 06-02-14
    2222#endif
     
    2929
    3030// To allow call backs
    31 class Cbc_MessageHandler
    32  : public CoinMessageHandler
    33   {
    34  
     31class Cbc_MessageHandler
     32            : public CoinMessageHandler {
     33
    3534public:
    36   /**@name Overrides */
    37   //@{
    38   virtual int print();
    39   //@}
    40   /**@name set and get */
    41   //@{
    42   /// Model
    43   const Cbc_Model * model() const;
    44   void setModel(Cbc_Model * model);
    45   /// Call back
    46   void setCallBack(cbc_callback callback);
    47   //@}
    48 
    49   /**@name Constructors, destructor */
    50   //@{
    51   /** Default constructor. */
    52   Cbc_MessageHandler();
    53   /// Constructor with pointer to model
    54   Cbc_MessageHandler(Cbc_Model * model,
    55          FILE * userPointer=NULL);
    56   /** Destructor */
    57   virtual ~Cbc_MessageHandler();
    58   //@}
    59 
    60   /**@name Copy method */
    61   //@{
    62   /** The copy constructor. */
    63   Cbc_MessageHandler(const Cbc_MessageHandler&);
    64   /** The copy constructor from an CoinSimplexMessageHandler. */
    65   Cbc_MessageHandler(const CoinMessageHandler&);
    66  
    67   Cbc_MessageHandler& operator=(const Cbc_MessageHandler&);
    68   /// Clone
    69   virtual CoinMessageHandler * clone() const ;
    70   //@}
    71    
    72    
     35    /**@name Overrides */
     36    //@{
     37    virtual int print();
     38    //@}
     39    /**@name set and get */
     40    //@{
     41    /// Model
     42    const Cbc_Model * model() const;
     43    void setModel(Cbc_Model * model);
     44    /// Call back
     45    void setCallBack(cbc_callback callback);
     46    //@}
     47
     48    /**@name Constructors, destructor */
     49    //@{
     50    /** Default constructor. */
     51    Cbc_MessageHandler();
     52    /// Constructor with pointer to model
     53    Cbc_MessageHandler(Cbc_Model * model,
     54                       FILE * userPointer = NULL);
     55    /** Destructor */
     56    virtual ~Cbc_MessageHandler();
     57    //@}
     58
     59    /**@name Copy method */
     60    //@{
     61    /** The copy constructor. */
     62    Cbc_MessageHandler(const Cbc_MessageHandler&);
     63    /** The copy constructor from an CoinSimplexMessageHandler. */
     64    Cbc_MessageHandler(const CoinMessageHandler&);
     65
     66    Cbc_MessageHandler& operator=(const Cbc_MessageHandler&);
     67    /// Clone
     68    virtual CoinMessageHandler * clone() const ;
     69    //@}
     70
     71
    7372protected:
    74   /**@name Data members
    75      The data members are protected to allow access for derived classes. */
    76   //@{
    77   /// Pointer back to model
    78   Cbc_Model * model_;
    79   /// call back
    80   cbc_callback callback_;
    81   //@}
     73    /**@name Data members
     74       The data members are protected to allow access for derived classes. */
     75    //@{
     76    /// Pointer back to model
     77    Cbc_Model * model_;
     78    /// call back
     79    cbc_callback callback_;
     80    //@}
    8281};
    8382
    8483
    8584//-------------------------------------------------------------------
    86 // Default Constructor 
     85// Default Constructor
    8786//-------------------------------------------------------------------
    88 Cbc_MessageHandler::Cbc_MessageHandler () 
    89   : CoinMessageHandler(),
    90     model_(NULL),
    91     callback_(NULL)
     87Cbc_MessageHandler::Cbc_MessageHandler ()
     88        : CoinMessageHandler(),
     89        model_(NULL),
     90        callback_(NULL)
    9291{
    9392}
    9493
    9594//-------------------------------------------------------------------
    96 // Copy constructor 
     95// Copy constructor
    9796//-------------------------------------------------------------------
    98 Cbc_MessageHandler::Cbc_MessageHandler (const Cbc_MessageHandler & rhs) 
    99  : CoinMessageHandler(rhs),
    100     model_(rhs.model_),
    101     callback_(rhs.callback_)
    102 { 
    103 }
    104 
    105 Cbc_MessageHandler::Cbc_MessageHandler (const CoinMessageHandler & rhs) 
    106   : CoinMessageHandler(rhs),
    107     model_(NULL),
    108     callback_(NULL)
    109 { 
     97Cbc_MessageHandler::Cbc_MessageHandler (const Cbc_MessageHandler & rhs)
     98        : CoinMessageHandler(rhs),
     99        model_(rhs.model_),
     100        callback_(rhs.callback_)
     101{
     102}
     103
     104Cbc_MessageHandler::Cbc_MessageHandler (const CoinMessageHandler & rhs)
     105        : CoinMessageHandler(rhs),
     106        model_(NULL),
     107        callback_(NULL)
     108{
    110109}
    111110
    112111// Constructor with pointer to model
    113112Cbc_MessageHandler::Cbc_MessageHandler(Cbc_Model * model,
    114                                        FILE * /*userPointer*/)
    115   : CoinMessageHandler(),
    116     model_(model),
    117     callback_(NULL)
     113                                       FILE * /*userPointer*/)
     114        : CoinMessageHandler(),
     115        model_(model),
     116        callback_(NULL)
    118117{
    119118}
    120119
    121120//-------------------------------------------------------------------
    122 // Destructor 
     121// Destructor
    123122//-------------------------------------------------------------------
    124123Cbc_MessageHandler::~Cbc_MessageHandler ()
     
    127126
    128127//----------------------------------------------------------------
    129 // Assignment operator 
     128// Assignment operator
    130129//-------------------------------------------------------------------
    131130Cbc_MessageHandler &
    132 Cbc_MessageHandler::operator=(const Cbc_MessageHandler& rhs)
    133 {
    134   if (this != &rhs) {
    135     CoinMessageHandler::operator=(rhs);
    136     model_ = rhs.model_;
    137     callback_ = rhs.callback_;
    138   }
    139   return *this;
     131Cbc_MessageHandler::operator=(const Cbc_MessageHandler & rhs)
     132{
     133    if (this != &rhs) {
     134        CoinMessageHandler::operator=(rhs);
     135        model_ = rhs.model_;
     136        callback_ = rhs.callback_;
     137    }
     138    return *this;
    140139}
    141140//-------------------------------------------------------------------
     
    144143CoinMessageHandler * Cbc_MessageHandler::clone() const
    145144{
    146   return new Cbc_MessageHandler(*this);
    147 }
    148 int 
     145    return new Cbc_MessageHandler(*this);
     146}
     147int
    149148Cbc_MessageHandler::print()
    150149{
    151   if (callback_) {
    152     int messageNumber = currentMessage().externalNumber();
    153     if (currentSource()!="Cbc")
    154       messageNumber += 1000000;
    155     int i;
    156     int nDouble=numberDoubleFields();
    157     assert (nDouble<=200);
    158     double vDouble[200];
    159     for (i=0;i<nDouble;i++)
    160       vDouble[i]=doubleValue(i);
    161     int nInt=numberIntFields();
    162     assert (nInt<=200);
    163     int vInt[200];
    164     for (i=0;i<nInt;i++)
    165       vInt[i]=intValue(i);
    166     int nString=numberStringFields();
    167     assert (nString<=200);
    168     char * vString[200];
    169     for (i=0;i<nString;i++) {
    170       std::string value = stringValue(i);
    171       vString[i]=strdup(value.c_str());
     150    if (callback_) {
     151        int messageNumber = currentMessage().externalNumber();
     152        if (currentSource() != "Cbc")
     153            messageNumber += 1000000;
     154        int i;
     155        int nDouble = numberDoubleFields();
     156        assert (nDouble <= 200);
     157        double vDouble[200];
     158        for (i = 0; i < nDouble; i++)
     159            vDouble[i] = doubleValue(i);
     160        int nInt = numberIntFields();
     161        assert (nInt <= 200);
     162        int vInt[200];
     163        for (i = 0; i < nInt; i++)
     164            vInt[i] = intValue(i);
     165        int nString = numberStringFields();
     166        assert (nString <= 200);
     167        char * vString[200];
     168        for (i = 0; i < nString; i++) {
     169            std::string value = stringValue(i);
     170            vString[i] = strdup(value.c_str());
     171        }
     172        callback_(model_, messageNumber,
     173                  nDouble, vDouble,
     174                  nInt, vInt,
     175                  nString, vString);
     176        for (i = 0; i < nString; i++)
     177            free(vString[i]);
     178
    172179    }
    173     callback_(model_,messageNumber,
    174         nDouble,vDouble,
    175         nInt,vInt,
    176         nString,vString);
    177     for (i=0;i<nString;i++)
    178       free(vString[i]);
    179    
    180   }
    181   return CoinMessageHandler::print();
    182   return 0;
     180    return CoinMessageHandler::print();
     181    return 0;
    183182}
    184183const Cbc_Model *
    185184Cbc_MessageHandler::model() const
    186185{
    187   return model_;
    188 }
    189 void 
     186    return model_;
     187}
     188void
    190189Cbc_MessageHandler::setModel(Cbc_Model * model)
    191190{
    192   model_ = model;
     191    model_ = model;
    193192}
    194193// Call back
    195 void 
     194void
    196195Cbc_MessageHandler::setCallBack(cbc_callback callback)
    197196{
    198   callback_ = callback;
     197    callback_ = callback;
    199198}
    200199/**
     
    208207#include <iostream>
    209208
    210 #if defined(__MWERKS__) 
     209#if defined(__MWERKS__)
    211210#pragma export on
    212211#endif
     
    215214COINLIBAPI double COINLINKAGE Cbc_getVersion()
    216215{
    217   double v = 1.0;
    218   return v;
     216    double v = 1.0;
     217    return v;
    219218}
    220219
    221220/* Default Cbc_Model constructor */
    222 COINLIBAPI Cbc_Model *  COINLINKAGE 
     221COINLIBAPI Cbc_Model *  COINLINKAGE
    223222Cbc_newModel()
    224223{
    225   const char prefix[] = "Cbc_C_Interface::Cbc_newModel(): ";
    226 //  const int  VERBOSE = 1;
    227   if (VERBOSE>0) printf("%s begin\n",prefix);
    228  
    229   Cbc_Model * model = new Cbc_Model;
    230   OsiClpSolverInterface solver1;
    231   model->solver_    = &solver1;
    232   model->solver_->OsiClpSolverInterface::setHintParam(OsiDoReducePrint,true,OsiHintTry);
    233   model->model_     = new CbcModel(solver1);
    234   model->handler_   = NULL;
    235   model->information_ = NULL;
    236  
    237   if (VERBOSE>0) printf("%s return\n",prefix);
    238   return model;
     224    const char prefix[] = "Cbc_C_Interface::Cbc_newModel(): ";
     225//  const int  VERBOSE = 1;
     226    if (VERBOSE > 0) printf("%s begin\n", prefix);
     227
     228    Cbc_Model * model = new Cbc_Model;
     229    OsiClpSolverInterface solver1;
     230    model->solver_    = &solver1;
     231    model->solver_->OsiClpSolverInterface::setHintParam(OsiDoReducePrint, true, OsiHintTry);
     232    model->model_     = new CbcModel(solver1);
     233    model->handler_   = NULL;
     234    model->information_ = NULL;
     235
     236    if (VERBOSE > 0) printf("%s return\n", prefix);
     237    return model;
    239238}
    240239/* Cbc_Model Destructor */
    241 COINLIBAPI void COINLINKAGE 
     240COINLIBAPI void COINLINKAGE
    242241Cbc_deleteModel(Cbc_Model * model)
    243242{
    244   const char prefix[] = "Cbc_C_Interface::Cbc_deleteModel(): ";
    245 //  const int  VERBOSE = 1;
    246   if (VERBOSE>0) printf("%s begin\n",prefix); fflush(stdout);
    247  
    248   if (VERBOSE>1) printf("%s delete model->model_\n",prefix); fflush(stdout);
    249   delete model->model_;
    250  
    251   if (VERBOSE>1) printf("%s delete model->handler_\n",prefix); fflush(stdout);
    252   delete model->handler_;
    253  
    254   if (VERBOSE>1) printf("%s free model->information_\n",prefix); fflush(stdout);
    255   if (model->information_) free(model->information_);
    256  
    257   if (VERBOSE>1) printf("%s delete model\n",prefix); fflush(stdout);
    258   delete model;
    259 
    260   if (VERBOSE>0) printf("%s return\n",prefix); fflush(stdout);
     243    const char prefix[] = "Cbc_C_Interface::Cbc_deleteModel(): ";
     244//  const int  VERBOSE = 1;
     245    if (VERBOSE > 0) printf("%s begin\n", prefix);
     246    fflush(stdout);
     247
     248    if (VERBOSE > 1) printf("%s delete model->model_\n", prefix);
     249    fflush(stdout);
     250    delete model->model_;
     251
     252    if (VERBOSE > 1) printf("%s delete model->handler_\n", prefix);
     253    fflush(stdout);
     254    delete model->handler_;
     255
     256    if (VERBOSE > 1) printf("%s free model->information_\n", prefix);
     257    fflush(stdout);
     258    if (model->information_) free(model->information_);
     259
     260    if (VERBOSE > 1) printf("%s delete model\n", prefix);
     261    fflush(stdout);
     262    delete model;
     263
     264    if (VERBOSE > 0) printf("%s return\n", prefix);
     265    fflush(stdout);
    261266}
    262267
     
    266271    <ul>
    267272    <li> <code>colub</code>: all columns have upper bound infinity
    268     <li> <code>collb</code>: all columns have lower bound 0 
     273    <li> <code>collb</code>: all columns have lower bound 0
    269274    <li> <code>rowub</code>: all rows have upper bound infinity
    270275    <li> <code>rowlb</code>: all rows have lower bound -infinity
     
    273278
    274279   Just like the other loadProblem() method except that the matrix is
    275    given in a standard column major ordered format (without gaps). 
     280   given in a standard column major ordered format (without gaps).
    276281*/
    277 COINLIBAPI void COINLINKAGE 
     282COINLIBAPI void COINLINKAGE
    278283Cbc_loadProblem (Cbc_Model * model,  const int numcols, const int numrows,
    279      const CoinBigIndex * start, const int* index,
    280      const double* value,
    281      const double* collb, const double* colub,   
    282      const double* obj,
    283      const double* rowlb, const double* rowub)
    284 {
    285   const char prefix[] = "Cbc_C_Interface::Cbc_loadProblem(): ";
     284                 const CoinBigIndex * start, const int* index,
     285                 const double* value,
     286                 const double* collb, const double* colub,
     287                 const double* obj,
     288                 const double* rowlb, const double* rowub)
     289{
     290    const char prefix[] = "Cbc_C_Interface::Cbc_loadProblem(): ";
    286291//  const int  VERBOSE = 2;
    287   if (VERBOSE>0) printf("%s begin\n",prefix);
    288 
    289   OsiSolverInterface * solver = model->model_->solver();
    290 
    291   if (VERBOSE>1) {
    292     printf("%s numcols = %i, numrows = %i\n",
    293       prefix, numcols, numrows);
    294     printf("%s model = %p, start = %p, index = %p, value = %p\n",
    295       prefix, static_cast<void*>(model), static_cast<const void*>(start),
    296            static_cast<const void*>(index), static_cast<const void*>(value));
    297     printf("%s collb = %p, colub = %p, obj = %p, rowlb = %p, rowub = %p\n",
    298       prefix, static_cast<const void*>(collb),
    299            static_cast<const void*>(colub), static_cast<const void*>(obj),
    300            static_cast<const void*>(rowlb), static_cast<const void*>(rowub));
    301   }
    302 
    303   if (VERBOSE>1) printf("%s Calling solver->loadProblem()\n",prefix);
    304   fflush(stdout);
    305  
    306   if (1) {
    307     solver->loadProblem(numcols,numrows,start,index,value,
    308              collb,colub,obj,rowlb,rowub);
    309   } else {
    310     solver->loadProblem(0,0,NULL,NULL,NULL,
    311              NULL,NULL,NULL,NULL,NULL);
    312   }
    313   if (VERBOSE > 1) printf("%s Finished solver->loadProblem()\n",prefix);
    314   fflush(stdout);
    315 
    316   if (VERBOSE>0) printf("%s return\n",prefix);
     292    if (VERBOSE > 0) printf("%s begin\n", prefix);
     293
     294    OsiSolverInterface * solver = model->model_->solver();
     295
     296    if (VERBOSE > 1) {
     297        printf("%s numcols = %i, numrows = %i\n",
     298               prefix, numcols, numrows);
     299        printf("%s model = %p, start = %p, index = %p, value = %p\n",
     300               prefix, static_cast<void*>(model), static_cast<const void*>(start),
     301               static_cast<const void*>(index), static_cast<const void*>(value));
     302        printf("%s collb = %p, colub = %p, obj = %p, rowlb = %p, rowub = %p\n",
     303               prefix, static_cast<const void*>(collb),
     304               static_cast<const void*>(colub), static_cast<const void*>(obj),
     305               static_cast<const void*>(rowlb), static_cast<const void*>(rowub));
     306    }
     307
     308    if (VERBOSE > 1) printf("%s Calling solver->loadProblem()\n", prefix);
     309    fflush(stdout);
     310
     311    if (1) {
     312        solver->loadProblem(numcols, numrows, start, index, value,
     313                            collb, colub, obj, rowlb, rowub);
     314    } else {
     315        solver->loadProblem(0, 0, NULL, NULL, NULL,
     316                            NULL, NULL, NULL, NULL, NULL);
     317    }
     318    if (VERBOSE > 1) printf("%s Finished solver->loadProblem()\n", prefix);
     319    fflush(stdout);
     320
     321    if (VERBOSE > 0) printf("%s return\n", prefix);
    317322} //  Cbc_loadProblem()
    318323
    319324/* Read an mps file from the given filename */
    320 COINLIBAPI int COINLINKAGE 
    321 Cbc_readMps(Cbc_Model * model,const char *filename)
    322 {
    323   const char prefix[] = "Cbc_C_Interface::Cbc_readMps(): ";
     325COINLIBAPI int COINLINKAGE
     326Cbc_readMps(Cbc_Model * model, const char *filename)
     327{
     328    const char prefix[] = "Cbc_C_Interface::Cbc_readMps(): ";
    324329//  const int  VERBOSE = 2;
    325   if (VERBOSE>0) printf("%s begin\n",prefix);
    326   if (VERBOSE>1) printf("%s filename = '%s'\n",prefix,filename);
    327 
    328   int result = 1;
    329   result = model->model_->solver()->readMps(filename);
    330   assert(result==0);
    331 
    332   if (VERBOSE>0) printf("%s return %i\n",prefix, result);
    333   return result;
     330    if (VERBOSE > 0) printf("%s begin\n", prefix);
     331    if (VERBOSE > 1) printf("%s filename = '%s'\n", prefix, filename);
     332
     333    int result = 1;
     334    result = model->model_->solver()->readMps(filename);
     335    assert(result == 0);
     336
     337    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     338    return result;
    334339}
    335340/* Write an mps file from the given filename */
    336 COINLIBAPI void COINLINKAGE 
    337 Cbc_writeMps(Cbc_Model * model,const char *filename)
    338 {
    339   const char prefix[] = "Cbc_C_Interface::Cbc_writeMps(): ";
     341COINLIBAPI void COINLINKAGE
     342Cbc_writeMps(Cbc_Model * model, const char *filename)
     343{
     344    const char prefix[] = "Cbc_C_Interface::Cbc_writeMps(): ";
    340345//  const int  VERBOSE = 2;
    341   if (VERBOSE>0) printf("%s begin\n",prefix);
    342   if (VERBOSE>1) printf("%s filename = '%s'\n",prefix,filename);
    343 
    344   model->model_->solver()->writeMps(filename,"mps",Cbc_optimizationDirection(model));
    345 
    346   if (VERBOSE>0) printf("%s return\n",prefix);
    347   return;
     346    if (VERBOSE > 0) printf("%s begin\n", prefix);
     347    if (VERBOSE > 1) printf("%s filename = '%s'\n", prefix, filename);
     348
     349    model->model_->solver()->writeMps(filename, "mps", Cbc_optimizationDirection(model));
     350
     351    if (VERBOSE > 0) printf("%s return\n", prefix);
     352    return;
    348353}
    349354/* Integer information */
    350 COINLIBAPI char * COINLINKAGE 
     355COINLIBAPI char * COINLINKAGE
    351356Cbc_integerInformation(Cbc_Model * model)
    352357{
    353   const char prefix[] = "Cbc_C_Interface::Cbc_integerInformation(): ";
    354 //  const int  VERBOSE = 1;
    355   if (VERBOSE>0) printf("%s begin\n",prefix);
    356 
    357   int col;
    358   int numcols = Cbc_getNumCols(model);
    359 
    360   // allocate model->information_ if null
    361   // this is freed in Cbc_deleteModel() if not null
    362   if (!model->information_)
    363     model->information_ = (char *) malloc(numcols*sizeof(char));
    364 
    365   for (col=0; col<numcols; col++)
    366     if (model->model_->solver()->isContinuous(col))
    367       model->information_[col] = 0;
    368     else
    369       model->information_[col] = 1;
    370 
    371   char * result = model->information_;
    372 
    373   if (VERBOSE>0) printf("%s return %p\n",prefix,result);
    374   return result;
     358    const char prefix[] = "Cbc_C_Interface::Cbc_integerInformation(): ";
     359//  const int  VERBOSE = 1;
     360    if (VERBOSE > 0) printf("%s begin\n", prefix);
     361
     362    int col;
     363    int numcols = Cbc_getNumCols(model);
     364
     365    // allocate model->information_ if null
     366    // this is freed in Cbc_deleteModel() if not null
     367    if (!model->information_)
     368        model->information_ = (char *) malloc(numcols * sizeof(char));
     369
     370    for (col = 0; col < numcols; col++)
     371        if (model->model_->solver()->isContinuous(col))
     372            model->information_[col] = 0;
     373        else
     374            model->information_[col] = 1;
     375
     376    char * result = model->information_;
     377
     378    if (VERBOSE > 0) printf("%s return %p\n", prefix, result);
     379    return result;
    375380}
    376381/* Copy in integer information */
    377 COINLIBAPI void COINLINKAGE 
     382COINLIBAPI void COINLINKAGE
    378383Cbc_copyInIntegerInformation(Cbc_Model * model, const char * information)
    379384{
    380   const char prefix[] = "Cbc_C_Interface::Cbc_copyInIntegerInformation(): ";
    381 //  const int  VERBOSE = 1;
    382   if (VERBOSE>0) printf("%s begin\n",prefix);
    383 
    384   int col;
    385   int numcols = Cbc_getNumCols(model);
    386   for (col=0; col<numcols; col++)
    387     if (information[col])
    388       model->model_->solver()->setInteger(col);
    389     else
    390       model->model_->solver()->setContinuous(col);
    391  
    392   if (VERBOSE>0) printf("%s return\n",prefix);
     385    const char prefix[] = "Cbc_C_Interface::Cbc_copyInIntegerInformation(): ";
     386//  const int  VERBOSE = 1;
     387    if (VERBOSE > 0) printf("%s begin\n", prefix);
     388
     389    int col;
     390    int numcols = Cbc_getNumCols(model);
     391    for (col = 0; col < numcols; col++)
     392        if (information[col])
     393            model->model_->solver()->setInteger(col);
     394        else
     395            model->model_->solver()->setContinuous(col);
     396
     397    if (VERBOSE > 0) printf("%s return\n", prefix);
    393398}
    394399/* Drop integer informations */
    395 COINLIBAPI void COINLINKAGE 
     400COINLIBAPI void COINLINKAGE
    396401Cbc_deleteIntegerInformation(Cbc_Model * /*model*/)
    397402{
    398   const char prefix[] = "Cbc_C_Interface::Cbc_deleteIntegerInformation(): ";
    399 //  const int  VERBOSE = 1;
    400   if (VERBOSE>0) printf("%s begin\n",prefix);
    401 
    402 //  available through 
     403    const char prefix[] = "Cbc_C_Interface::Cbc_deleteIntegerInformation(): ";
     404//  const int  VERBOSE = 1;
     405    if (VERBOSE > 0) printf("%s begin\n", prefix);
     406
     407//  available through
    403408//    OsiClpSolverInterface::setContinuous
    404409//tbd  model->model_->deleteIntegerInformation();
    405   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    406 
    407   if (VERBOSE>0) printf("%s return\n",prefix);
     410    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     411
     412    if (VERBOSE > 0) printf("%s return\n", prefix);
    408413}
    409414/* Resizes rim part of model  */
    410 COINLIBAPI void COINLINKAGE 
    411 Cbc_resize (Cbc_Model * /*model*/, int /*newNumberRows*/, 
    412             int /*newNumberColumns*/)
    413 {
    414   const char prefix[] = "Cbc_C_Interface::Cbc_resize(): ";
    415 //  const int  VERBOSE = 1;
    416   if (VERBOSE>0) printf("%s begin\n",prefix);
     415COINLIBAPI void COINLINKAGE
     416Cbc_resize (Cbc_Model * /*model*/, int /*newNumberRows*/,
     417            int /*newNumberColumns*/)
     418{
     419    const char prefix[] = "Cbc_C_Interface::Cbc_resize(): ";
     420//  const int  VERBOSE = 1;
     421    if (VERBOSE > 0) printf("%s begin\n", prefix);
    417422
    418423// cannot find this in Cbc, Osi, or OsiClp
    419424//tbd  model->model_->solver()->resize(newNumberRows,newNumberColumns);
    420   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    421 
    422   if (VERBOSE>0) printf("%s return\n",prefix);
     425    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     426
     427    if (VERBOSE > 0) printf("%s return\n", prefix);
    423428}
    424429/* Deletes rows */
    425 COINLIBAPI void COINLINKAGE 
     430COINLIBAPI void COINLINKAGE
    426431Cbc_deleteRows(Cbc_Model * model, int number, const int * which)
    427432{
    428   const char prefix[] = "Cbc_C_Interface::Cbc_deleteRows(): ";
    429 //  const int  VERBOSE = 1;
    430   if (VERBOSE>0) printf("%s begin\n",prefix);
    431 
    432   OsiSolverInterface * solver = model->model_->solver();
    433   solver->deleteRows(number,which);
    434 
    435   if (VERBOSE>0) printf("%s return\n",prefix);
     433    const char prefix[] = "Cbc_C_Interface::Cbc_deleteRows(): ";
     434//  const int  VERBOSE = 1;
     435    if (VERBOSE > 0) printf("%s begin\n", prefix);
     436
     437    OsiSolverInterface * solver = model->model_->solver();
     438    solver->deleteRows(number, which);
     439
     440    if (VERBOSE > 0) printf("%s return\n", prefix);
    436441}
    437442/* Add rows */
    438 COINLIBAPI void COINLINKAGE 
    439 Cbc_addRows(Cbc_Model * /*model*/, const int /*number*/, 
    440             const double * /*rowLower*/,
    441             const double * /*rowUpper*/,
    442             const int * /*rowStarts*/, const int * /*columns*/,
    443             const double * /*elements*/)
    444 {
    445   const char prefix[] = "Cbc_C_Interface::Cbc_addRows(): ";
    446 //  const int  VERBOSE = 1;
    447   if (VERBOSE>0) printf("%s begin\n",prefix);
     443COINLIBAPI void COINLINKAGE
     444Cbc_addRows(Cbc_Model * /*model*/, const int /*number*/,
     445            const double * /*rowLower*/,
     446            const double * /*rowUpper*/,
     447            const int * /*rowStarts*/, const int * /*columns*/,
     448            const double * /*elements*/)
     449{
     450    const char prefix[] = "Cbc_C_Interface::Cbc_addRows(): ";
     451//  const int  VERBOSE = 1;
     452    if (VERBOSE > 0) printf("%s begin\n", prefix);
    448453
    449454// available through OsiClp
    450455//tbd  model->model_->addRows(number,rowLower,rowUpper,rowStarts,columns,elements);
    451   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    452 
    453   if (VERBOSE>0) printf("%s return\n",prefix);
     456    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     457
     458    if (VERBOSE > 0) printf("%s return\n", prefix);
    454459}
    455460
    456461/* Deletes columns */
    457 COINLIBAPI void COINLINKAGE 
     462COINLIBAPI void COINLINKAGE
    458463Cbc_deleteColumns(Cbc_Model * model, int number, const int * which)
    459464{
    460   const char prefix[] = "Cbc_C_Interface::Cbc_deleteColumns(): ";
    461 //  const int  VERBOSE = 1;
    462   if (VERBOSE>0) printf("%s begin\n",prefix);
    463 
    464   OsiSolverInterface * solver = model->model_->solver();
    465   solver->deleteCols(number,which);
    466 
    467   if (VERBOSE>0) printf("%s return\n",prefix);
     465    const char prefix[] = "Cbc_C_Interface::Cbc_deleteColumns(): ";
     466//  const int  VERBOSE = 1;
     467    if (VERBOSE > 0) printf("%s begin\n", prefix);
     468
     469    OsiSolverInterface * solver = model->model_->solver();
     470    solver->deleteCols(number, which);
     471
     472    if (VERBOSE > 0) printf("%s return\n", prefix);
    468473}
    469474/* Add columns */
    470 COINLIBAPI void COINLINKAGE 
    471 Cbc_addColumns(Cbc_Model * /*model*/, int /*number*/, 
    472                const double * /*columnLower*/,
    473                const double * /*columnUpper*/,
    474                const double * /*objective*/,
    475                const int * /*columnStarts*/, const int * /*rows*/,
    476                const double * /*elements*/)
    477 {
    478   const char prefix[] = "Cbc_C_Interface::Cbc_addColumns(): ";
    479 //  const int  VERBOSE = 1;
    480   if (VERBOSE>0) printf("%s begin\n",prefix);
     475COINLIBAPI void COINLINKAGE
     476Cbc_addColumns(Cbc_Model * /*model*/, int /*number*/,
     477               const double * /*columnLower*/,
     478               const double * /*columnUpper*/,
     479               const double * /*objective*/,
     480               const int * /*columnStarts*/, const int * /*rows*/,
     481               const double * /*elements*/)
     482{
     483    const char prefix[] = "Cbc_C_Interface::Cbc_addColumns(): ";
     484//  const int  VERBOSE = 1;
     485    if (VERBOSE > 0) printf("%s begin\n", prefix);
    481486
    482487// available through OsiClp
    483488//tbd  model->model_->addColumns(number,columnLower,columnUpper,objective,
    484489//tbd                       columnStarts,rows,elements);
    485   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    486 
    487   if (VERBOSE>0) printf("%s return\n",prefix);
     490    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     491
     492    if (VERBOSE > 0) printf("%s return\n", prefix);
    488493}
    489494/* Drops names - makes lengthnames 0 and names empty */
    490 COINLIBAPI void COINLINKAGE 
     495COINLIBAPI void COINLINKAGE
    491496Cbc_dropNames(Cbc_Model * /*model*/)
    492497{
    493   const char prefix[] = "Cbc_C_Interface::Cbc_dropNames(): ";
    494 //  const int  VERBOSE = 1;
    495   if (VERBOSE>0) printf("%s begin\n",prefix);
    496  
     498    const char prefix[] = "Cbc_C_Interface::Cbc_dropNames(): ";
     499//  const int  VERBOSE = 1;
     500    if (VERBOSE > 0) printf("%s begin\n", prefix);
     501
    497502// cannot find names in Cbc, Osi, or OsiClp
    498503//tbd  model->model_->dropNames();
    499   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    500 
    501   if (VERBOSE>0) printf("%s return\n",prefix);
     504    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     505
     506    if (VERBOSE > 0) printf("%s return\n", prefix);
    502507}
    503508/* Copies in names */
    504 COINLIBAPI void COINLINKAGE 
     509COINLIBAPI void COINLINKAGE
    505510Cbc_copyNames(Cbc_Model * /*model*/, const char * const * /*rowNamesIn*/,
    506               const char * const * /*columnNamesIn*/)
    507 {
    508   const char prefix[] = "Cbc_C_Interface::Cbc_copyNames(): ";
    509 //  const int  VERBOSE = 1;
    510   if (VERBOSE>0) printf("%s begin\n",prefix);
     511              const char * const * /*columnNamesIn*/)
     512{
     513    const char prefix[] = "Cbc_C_Interface::Cbc_copyNames(): ";
     514//  const int  VERBOSE = 1;
     515    if (VERBOSE > 0) printf("%s begin\n", prefix);
    511516
    512517// cannot find names in Cbc, Osi, or OsiClp
    513 /*clean
    514   int iRow;
    515   std::vector<std::string> rowNames;
    516   int numberRows = model->model_->getNumRows();
    517   rowNames.reserve(numberRows);
    518   for (iRow=0;iRow<numberRows;iRow++) {
    519     rowNames.push_back(rowNamesIn[iRow]);
    520   }
    521  
    522   int iColumn;
    523   std::vector<std::string> columnNames;
    524   int numberColumns = model->model_->getNumCols();
    525   columnNames.reserve(numberColumns);
    526   for (iColumn=0;iColumn<numberColumns;iColumn++) {
    527     columnNames.push_back(columnNamesIn[iColumn]);
    528   }
    529   model->model_->copyNames(rowNames,columnNames);
    530 */
    531 
    532   if (VERBOSE>0) printf("%s return\n",prefix);
     518    /*clean
     519      int iRow;
     520      std::vector<std::string> rowNames;
     521      int numberRows = model->model_->getNumRows();
     522      rowNames.reserve(numberRows);
     523      for (iRow=0;iRow<numberRows;iRow++) {
     524        rowNames.push_back(rowNamesIn[iRow]);
     525      }
     526
     527      int iColumn;
     528      std::vector<std::string> columnNames;
     529      int numberColumns = model->model_->getNumCols();
     530      columnNames.reserve(numberColumns);
     531      for (iColumn=0;iColumn<numberColumns;iColumn++) {
     532        columnNames.push_back(columnNamesIn[iColumn]);
     533      }
     534      model->model_->copyNames(rowNames,columnNames);
     535    */
     536
     537    if (VERBOSE > 0) printf("%s return\n", prefix);
    533538}
    534539
    535540/* Number of rows */
    536 COINLIBAPI int COINLINKAGE 
     541COINLIBAPI int COINLINKAGE
    537542Cbc_numberRows(Cbc_Model * model)
    538543{
    539   const char prefix[] = "Cbc_C_Interface::Cbc_numberRows(): ";
    540 //  const int  VERBOSE = 1;
    541   if (VERBOSE>0) printf("%s begin\n",prefix);
    542 
    543   int result = 0;
    544   result = model->model_->getNumRows();
    545 
    546   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    547   return result;
     544    const char prefix[] = "Cbc_C_Interface::Cbc_numberRows(): ";
     545//  const int  VERBOSE = 1;
     546    if (VERBOSE > 0) printf("%s begin\n", prefix);
     547
     548    int result = 0;
     549    result = model->model_->getNumRows();
     550
     551    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     552    return result;
    548553}
    549554/* Number of columns */
    550 COINLIBAPI int COINLINKAGE 
     555COINLIBAPI int COINLINKAGE
    551556Cbc_numberColumns(Cbc_Model * model)
    552557{
    553   const char prefix[] = "Cbc_C_Interface::Cbc_numberColumns(): ";
    554 //  const int  VERBOSE = 1;
    555   if (VERBOSE>0) printf("%s begin\n",prefix);
    556 
    557   int result = 0;
    558   result = model->model_->getNumCols();
    559 
    560   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    561   return result;
     558    const char prefix[] = "Cbc_C_Interface::Cbc_numberColumns(): ";
     559//  const int  VERBOSE = 1;
     560    if (VERBOSE > 0) printf("%s begin\n", prefix);
     561
     562    int result = 0;
     563    result = model->model_->getNumCols();
     564
     565    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     566    return result;
    562567}
    563568/* Primal tolerance to use */
    564 COINLIBAPI double COINLINKAGE 
     569COINLIBAPI double COINLINKAGE
    565570Cbc_primalTolerance(Cbc_Model * model)
    566571{
    567   const char prefix[] = "Cbc_C_Interface::Cbc_primalTolerance(): ";
    568 //  const int  VERBOSE = 1;
    569   if (VERBOSE>0) printf("%s begin\n",prefix);
    570 
    571   double result = 0.0;
    572   model->model_->solver()->getDblParam(OsiPrimalTolerance,result) ;
    573 
    574   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    575   return result;
    576 }
    577 COINLIBAPI void COINLINKAGE 
    578 Cbc_setPrimalTolerance(Cbc_Model * model,  double value) 
    579 {
    580   const char prefix[] = "Cbc_C_Interface::Cbc_setPrimalTolerance(): ";
    581 //  const int  VERBOSE = 1;
    582   if (VERBOSE>0) printf("%s begin\n",prefix);
    583 
    584   model->model_->solver()->setDblParam(OsiPrimalTolerance,value) ;
    585 
    586   if (VERBOSE>0) printf("%s return\n",prefix);
     572    const char prefix[] = "Cbc_C_Interface::Cbc_primalTolerance(): ";
     573//  const int  VERBOSE = 1;
     574    if (VERBOSE > 0) printf("%s begin\n", prefix);
     575
     576    double result = 0.0;
     577    model->model_->solver()->getDblParam(OsiPrimalTolerance, result) ;
     578
     579    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     580    return result;
     581}
     582COINLIBAPI void COINLINKAGE
     583Cbc_setPrimalTolerance(Cbc_Model * model,  double value)
     584{
     585    const char prefix[] = "Cbc_C_Interface::Cbc_setPrimalTolerance(): ";
     586//  const int  VERBOSE = 1;
     587    if (VERBOSE > 0) printf("%s begin\n", prefix);
     588
     589    model->model_->solver()->setDblParam(OsiPrimalTolerance, value) ;
     590
     591    if (VERBOSE > 0) printf("%s return\n", prefix);
    587592}
    588593/* Dual tolerance to use */
    589 COINLIBAPI double COINLINKAGE 
     594COINLIBAPI double COINLINKAGE
    590595Cbc_dualTolerance(Cbc_Model * model)
    591596{
    592   const char prefix[] = "Cbc_C_Interface::Cbc_dualTolerance(): ";
    593 //  const int  VERBOSE = 1;
    594   if (VERBOSE>0) printf("%s begin\n",prefix);
    595 
    596   double result = 0.0;
    597   model->model_->solver()->getDblParam(OsiDualTolerance,result) ;
    598 
    599   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    600   return result;
    601 }
    602 COINLIBAPI void COINLINKAGE 
    603 Cbc_setDualTolerance(Cbc_Model * model,  double value) 
    604 {
    605   const char prefix[] = "Cbc_C_Interface::Cbc_setDualTolerance(): ";
    606 //  const int  VERBOSE = 1;
    607   if (VERBOSE>0) printf("%s begin\n",prefix);
    608 
    609   model->model_->solver()->setDblParam(OsiDualTolerance,value) ;
    610 
    611   if (VERBOSE>0) printf("%s return\n",prefix);
     597    const char prefix[] = "Cbc_C_Interface::Cbc_dualTolerance(): ";
     598//  const int  VERBOSE = 1;
     599    if (VERBOSE > 0) printf("%s begin\n", prefix);
     600
     601    double result = 0.0;
     602    model->model_->solver()->getDblParam(OsiDualTolerance, result) ;
     603
     604    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     605    return result;
     606}
     607COINLIBAPI void COINLINKAGE
     608Cbc_setDualTolerance(Cbc_Model * model,  double value)
     609{
     610    const char prefix[] = "Cbc_C_Interface::Cbc_setDualTolerance(): ";
     611//  const int  VERBOSE = 1;
     612    if (VERBOSE > 0) printf("%s begin\n", prefix);
     613
     614    model->model_->solver()->setDblParam(OsiDualTolerance, value) ;
     615
     616    if (VERBOSE > 0) printf("%s return\n", prefix);
    612617}
    613618/* Integer tolerance to use */
    614 COINLIBAPI double COINLINKAGE 
     619COINLIBAPI double COINLINKAGE
    615620Cbc_integerTolerance(Cbc_Model * model)
    616621{
    617   const char prefix[] = "Cbc_C_Interface::Cbc_primalTolerance(): ";
    618 //  const int  VERBOSE = 1;
    619   if (VERBOSE>0) printf("%s begin\n",prefix);
    620 
    621   double result = 0.0;
    622   result = model->model_->getDblParam(CbcModel::CbcIntegerTolerance) ;
    623 
    624   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    625   return result;
    626 }
    627 COINLIBAPI void COINLINKAGE 
    628 Cbc_setIntegerTolerance(Cbc_Model * model,  double value) 
    629 {
    630   const char prefix[] = "Cbc_C_Interface::Cbc_setPrimalTolerance(): ";
    631 //  const int  VERBOSE = 1;
    632   if (VERBOSE>0) printf("%s begin\n",prefix);
    633 
    634   model->model_->setDblParam(CbcModel::CbcIntegerTolerance,value) ;
    635 
    636   if (VERBOSE>0) printf("%s return\n",prefix);
     622    const char prefix[] = "Cbc_C_Interface::Cbc_primalTolerance(): ";
     623//  const int  VERBOSE = 1;
     624    if (VERBOSE > 0) printf("%s begin\n", prefix);
     625
     626    double result = 0.0;
     627    result = model->model_->getDblParam(CbcModel::CbcIntegerTolerance) ;
     628
     629    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     630    return result;
     631}
     632COINLIBAPI void COINLINKAGE
     633Cbc_setIntegerTolerance(Cbc_Model * model,  double value)
     634{
     635    const char prefix[] = "Cbc_C_Interface::Cbc_setPrimalTolerance(): ";
     636//  const int  VERBOSE = 1;
     637    if (VERBOSE > 0) printf("%s begin\n", prefix);
     638
     639    model->model_->setDblParam(CbcModel::CbcIntegerTolerance, value) ;
     640
     641    if (VERBOSE > 0) printf("%s return\n", prefix);
    637642}
    638643/* Dual objective limit */
    639 COINLIBAPI double COINLINKAGE 
     644COINLIBAPI double COINLINKAGE
    640645Cbc_dualObjectiveLimit(Cbc_Model * model)
    641646{
    642   const char prefix[] = "Cbc_C_Interface::Cbc_dualObjectiveLimit(): ";
    643 //  const int  VERBOSE = 1;
    644   if (VERBOSE>0) printf("%s begin\n",prefix);
    645 
    646   double result = 0.0;
    647   model->model_->solver()->getDblParam(OsiDualObjectiveLimit,result) ;
    648 
    649   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    650   return result;
    651 }
    652 COINLIBAPI void COINLINKAGE 
     647    const char prefix[] = "Cbc_C_Interface::Cbc_dualObjectiveLimit(): ";
     648//  const int  VERBOSE = 1;
     649    if (VERBOSE > 0) printf("%s begin\n", prefix);
     650
     651    double result = 0.0;
     652    model->model_->solver()->getDblParam(OsiDualObjectiveLimit, result) ;
     653
     654    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     655    return result;
     656}
     657COINLIBAPI void COINLINKAGE
    653658Cbc_setDualObjectiveLimit(Cbc_Model * model, double value)
    654659{
    655   const char prefix[] = "Cbc_C_Interface::Cbc_setDualObjectiveLimit(): ";
    656 //  const int  VERBOSE = 1;
    657   if (VERBOSE>0) printf("%s begin\n",prefix);
    658 
    659   model->model_->solver()->setDblParam(OsiDualObjectiveLimit,value) ;
    660 
    661   if (VERBOSE>0) printf("%s return\n",prefix);
     660    const char prefix[] = "Cbc_C_Interface::Cbc_setDualObjectiveLimit(): ";
     661//  const int  VERBOSE = 1;
     662    if (VERBOSE > 0) printf("%s begin\n", prefix);
     663
     664    model->model_->solver()->setDblParam(OsiDualObjectiveLimit, value) ;
     665
     666    if (VERBOSE > 0) printf("%s return\n", prefix);
    662667}
    663668/* Objective offset */
    664 COINLIBAPI double COINLINKAGE 
     669COINLIBAPI double COINLINKAGE
    665670Cbc_objectiveOffset(Cbc_Model * /*model*/)
    666671{
    667   const char prefix[] = "Cbc_C_Interface::Cbc_objectiveOffset(): ";
    668 //  const int  VERBOSE = 1;
    669   if (VERBOSE>0) printf("%s begin\n",prefix);
    670 
    671   double result = 0.0;
     672    const char prefix[] = "Cbc_C_Interface::Cbc_objectiveOffset(): ";
     673//  const int  VERBOSE = 1;
     674    if (VERBOSE > 0) printf("%s begin\n", prefix);
     675
     676    double result = 0.0;
    672677// cannot find names in Cbc, Osi, or OsiClp
    673678//tbd  return model->model_->objectiveOffset();
    674   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    675 
    676   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    677   return result;
    678 }
    679 COINLIBAPI void COINLINKAGE 
     679    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     680
     681    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     682    return result;
     683}
     684COINLIBAPI void COINLINKAGE
    680685Cbc_setObjectiveOffset(Cbc_Model * /*model*/, double /*value*/)
    681686{
    682   const char prefix[] = "Cbc_C_Interface::Cbc_setObjectiveOffset(): ";
    683 //  const int  VERBOSE = 1;
    684   if (VERBOSE>0) printf("%s begin\n",prefix);
     687    const char prefix[] = "Cbc_C_Interface::Cbc_setObjectiveOffset(): ";
     688//  const int  VERBOSE = 1;
     689    if (VERBOSE > 0) printf("%s begin\n", prefix);
    685690
    686691// cannot find names in Cbc, Osi, or OsiClp
    687692//tbd  model->model_->solver()->setObjectiveOffset(value);
    688   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    689 
    690   if (VERBOSE>0) printf("%s return\n",prefix);
     693    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     694
     695    if (VERBOSE > 0) printf("%s return\n", prefix);
    691696}
    692697/* Fills in array with problem name  */
    693 COINLIBAPI void COINLINKAGE 
     698COINLIBAPI void COINLINKAGE
    694699Cbc_problemName(Cbc_Model * model, int maxNumberCharacters, char * array)
    695700{
    696   const char prefix[] = "Cbc_C_Interface::Cbc_problemName(): ";
    697 //  const int  VERBOSE = 1;
    698   if (VERBOSE>0) printf("%s begin\n",prefix);
    699 
    700   std::string name;
    701   model->model_->solver()->getStrParam(OsiProbName,name);
    702   maxNumberCharacters = CoinMin(maxNumberCharacters,(int)strlen(name.c_str()));
    703   strncpy(array,name.c_str(),maxNumberCharacters-1);
    704   array[maxNumberCharacters-1]='\0';
    705 
    706   if (VERBOSE>0) printf("%s return\n",prefix);
     701    const char prefix[] = "Cbc_C_Interface::Cbc_problemName(): ";
     702//  const int  VERBOSE = 1;
     703    if (VERBOSE > 0) printf("%s begin\n", prefix);
     704
     705    std::string name;
     706    model->model_->solver()->getStrParam(OsiProbName, name);
     707    maxNumberCharacters = CoinMin(maxNumberCharacters, (int)strlen(name.c_str()));
     708    strncpy(array, name.c_str(), maxNumberCharacters - 1);
     709    array[maxNumberCharacters-1] = '\0';
     710
     711    if (VERBOSE > 0) printf("%s return\n", prefix);
    707712}
    708713/* Sets problem name.  Must have \0 at end.  */
    709 COINLIBAPI int COINLINKAGE 
     714COINLIBAPI int COINLINKAGE
    710715Cbc_setProblemName(Cbc_Model * model, int /*maxNumberCharacters*/, char * array)
    711716{
    712   const char prefix[] = "Cbc_C_Interface::Cbc_setProblemName(): ";
    713 //  const int  VERBOSE = 1;
    714   if (VERBOSE>0) printf("%s begin\n",prefix);
    715 
    716   bool result = false;
    717   result = model->model_->solver()->setStrParam(OsiProbName, array);
    718 
    719   if (VERBOSE>0) printf("%s return\n",prefix);
    720   return (result) ? 1 : 0;
     717    const char prefix[] = "Cbc_C_Interface::Cbc_setProblemName(): ";
     718//  const int  VERBOSE = 1;
     719    if (VERBOSE > 0) printf("%s begin\n", prefix);
     720
     721    bool result = false;
     722    result = model->model_->solver()->setStrParam(OsiProbName, array);
     723
     724    if (VERBOSE > 0) printf("%s return\n", prefix);
     725    return (result) ? 1 : 0;
    721726}
    722727/* Number of iterations */
    723 COINLIBAPI int COINLINKAGE 
     728COINLIBAPI int COINLINKAGE
    724729Cbc_numberIterations(Cbc_Model * model)
    725730{
    726   const char prefix[] = "Cbc_C_Interface::Cbc_numberIterations(): ";
    727 //  const int  VERBOSE = 1;
    728   if (VERBOSE>0) printf("%s begin\n",prefix);
    729 
    730   int result = 0;
    731   result = model->model_->getIterationCount();
    732 
    733   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    734   return result;
    735 }
    736 COINLIBAPI void COINLINKAGE 
     731    const char prefix[] = "Cbc_C_Interface::Cbc_numberIterations(): ";
     732//  const int  VERBOSE = 1;
     733    if (VERBOSE > 0) printf("%s begin\n", prefix);
     734
     735    int result = 0;
     736    result = model->model_->getIterationCount();
     737
     738    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     739    return result;
     740}
     741COINLIBAPI void COINLINKAGE
    737742Cbc_setNumberIterations(Cbc_Model * /*model*/, int /*numberIterations*/)
    738743{
    739   const char prefix[] = "Cbc_C_Interface::Cbc_setNumberIterations(): ";
    740 //  const int  VERBOSE = 1;
    741   if (VERBOSE>0) printf("%s begin\n",prefix);
     744    const char prefix[] = "Cbc_C_Interface::Cbc_setNumberIterations(): ";
     745//  const int  VERBOSE = 1;
     746    if (VERBOSE > 0) printf("%s begin\n", prefix);
    742747
    743748// cannot find this in Cbc, Osi, or OsiClp
    744749//tbd  model->model_->setNumberIterations(numberIterations);
    745   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    746 
    747   if (VERBOSE>0) printf("%s return\n",prefix);
    748   return;
     750    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     751
     752    if (VERBOSE > 0) printf("%s return\n", prefix);
     753    return;
    749754}
    750755/* Maximum number of iterations */
     
    752757Cbc_maximumIterations(Cbc_Model * /*model*/)
    753758{
    754   const char prefix[] = "Cbc_C_Interface::Cbc_maximumIterations(): ";
    755 //  const int  VERBOSE = 1;
    756   if (VERBOSE>0) printf("%s begin\n",prefix);
    757 
    758   int result = 0;
     759    const char prefix[] = "Cbc_C_Interface::Cbc_maximumIterations(): ";
     760//  const int  VERBOSE = 1;
     761    if (VERBOSE > 0) printf("%s begin\n", prefix);
     762
     763    int result = 0;
    759764// cannot find this in Cbc, Osi, or OsiClp
    760765//tbd  result = model->model_->solver()->maximumIterations();
    761   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    762 
    763   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    764   return result;
    765 }
    766 COINLIBAPI void COINLINKAGE 
     766    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     767
     768    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     769    return result;
     770}
     771COINLIBAPI void COINLINKAGE
    767772Cbc_setMaximumIterations(Cbc_Model * /*model*/, int /*value*/)
    768773{
    769   const char prefix[] = "Cbc_C_Interface::Cbc_setMaximumIterations(): ";
    770 //  const int  VERBOSE = 1;
    771   if (VERBOSE>0) printf("%s begin\n",prefix);
     774    const char prefix[] = "Cbc_C_Interface::Cbc_setMaximumIterations(): ";
     775//  const int  VERBOSE = 1;
     776    if (VERBOSE > 0) printf("%s begin\n", prefix);
    772777
    773778// cannot find this in Cbc, Osi, or OsiClp
    774779//tbd  model->model_->setMaximumIterations(value);
    775   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    776 
    777   if (VERBOSE>0) printf("%s return\n",prefix);
     780    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     781
     782    if (VERBOSE > 0) printf("%s return\n", prefix);
    778783}
    779784/* Maximum number of nodes */
     
    781786Cbc_maxNumNode(Cbc_Model * model)
    782787{
    783   const char prefix[] = "Cbc_C_Interface::Cbc_maxNumNode(): ";
    784 //  const int  VERBOSE = 1;
    785   if (VERBOSE>0) printf("%s begin\n",prefix);
    786 
    787   int result = 0;
    788   result = model->model_->getIntParam(CbcModel::CbcMaxNumNode);
    789 
    790   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    791   return result;
    792 }
    793 COINLIBAPI void COINLINKAGE 
     788    const char prefix[] = "Cbc_C_Interface::Cbc_maxNumNode(): ";
     789//  const int  VERBOSE = 1;
     790    if (VERBOSE > 0) printf("%s begin\n", prefix);
     791
     792    int result = 0;
     793    result = model->model_->getIntParam(CbcModel::CbcMaxNumNode);
     794
     795    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     796    return result;
     797}
     798COINLIBAPI void COINLINKAGE
    794799Cbc_setMaxNumNode(Cbc_Model * model, int value)
    795800{
    796   const char prefix[] = "Cbc_C_Interface::Cbc_setMaxNumNode(): ";
    797 //  const int  VERBOSE = 1;
    798   if (VERBOSE>0) printf("%s begin\n",prefix);
    799 
    800   model->model_->setIntParam(CbcModel::CbcMaxNumNode, value);
    801 
    802   if (VERBOSE>0) printf("%s return\n",prefix);
     801    const char prefix[] = "Cbc_C_Interface::Cbc_setMaxNumNode(): ";
     802//  const int  VERBOSE = 1;
     803    if (VERBOSE > 0) printf("%s begin\n", prefix);
     804
     805    model->model_->setIntParam(CbcModel::CbcMaxNumNode, value);
     806
     807    if (VERBOSE > 0) printf("%s return\n", prefix);
    803808}
    804809/* Maximum number of solutions */
     
    806811Cbc_maxNumSol(Cbc_Model * model)
    807812{
    808   const char prefix[] = "Cbc_C_Interface::maxNumSol(): ";
    809 //  const int  VERBOSE = 1;
    810   if (VERBOSE>0) printf("%s begin\n",prefix);
    811 
    812   int result = 0;
    813   result = model->model_->getIntParam(CbcModel::CbcMaxNumSol);
    814 
    815   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    816   return result;
    817 }
    818 COINLIBAPI void COINLINKAGE 
     813    const char prefix[] = "Cbc_C_Interface::maxNumSol(): ";
     814//  const int  VERBOSE = 1;
     815    if (VERBOSE > 0) printf("%s begin\n", prefix);
     816
     817    int result = 0;
     818    result = model->model_->getIntParam(CbcModel::CbcMaxNumSol);
     819
     820    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     821    return result;
     822}
     823COINLIBAPI void COINLINKAGE
    819824Cbc_setMaxNumSol(Cbc_Model * model, int value)
    820825{
    821   const char prefix[] = "Cbc_C_Interface::Cbc_setMaxNumSol(): ";
    822 //  const int  VERBOSE = 1;
    823   if (VERBOSE>0) printf("%s begin\n",prefix);
    824 
    825   model->model_->setIntParam(CbcModel::CbcMaxNumSol, value);
    826 
    827   if (VERBOSE>0) printf("%s return\n",prefix);
     826    const char prefix[] = "Cbc_C_Interface::Cbc_setMaxNumSol(): ";
     827//  const int  VERBOSE = 1;
     828    if (VERBOSE > 0) printf("%s begin\n", prefix);
     829
     830    model->model_->setIntParam(CbcModel::CbcMaxNumSol, value);
     831
     832    if (VERBOSE > 0) printf("%s return\n", prefix);
    828833}
    829834/* Maximum time in seconds (from when set called) */
    830 COINLIBAPI double COINLINKAGE 
     835COINLIBAPI double COINLINKAGE
    831836Cbc_maximumSeconds(Cbc_Model * model)
    832837{
    833   const char prefix[] = "Cbc_C_Interface::Cbc_maximumSeconds(): ";
    834 //  const int  VERBOSE = 1;
    835   if (VERBOSE>0) printf("%s begin\n",prefix);
    836 
    837   double result = 0.0;
    838   result = model->model_->getDblParam(CbcModel::CbcMaximumSeconds);
    839 
    840   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    841   return result;
    842 }
    843 COINLIBAPI void COINLINKAGE 
     838    const char prefix[] = "Cbc_C_Interface::Cbc_maximumSeconds(): ";
     839//  const int  VERBOSE = 1;
     840    if (VERBOSE > 0) printf("%s begin\n", prefix);
     841
     842    double result = 0.0;
     843    result = model->model_->getDblParam(CbcModel::CbcMaximumSeconds);
     844
     845    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     846    return result;
     847}
     848COINLIBAPI void COINLINKAGE
    844849Cbc_setMaximumSeconds(Cbc_Model * model, double value)
    845850{
    846   const char prefix[] = "Cbc_C_Interface::Cbc_setMaximumSeconds(): ";
    847 //  const int  VERBOSE = 1;
    848   if (VERBOSE>0) printf("%s begin\n",prefix);
    849 
    850   model->model_->setDblParam(CbcModel::CbcMaximumSeconds, value);
    851 
    852   if (VERBOSE>0) printf("%s return\n",prefix);
     851    const char prefix[] = "Cbc_C_Interface::Cbc_setMaximumSeconds(): ";
     852//  const int  VERBOSE = 1;
     853    if (VERBOSE > 0) printf("%s begin\n", prefix);
     854
     855    model->model_->setDblParam(CbcModel::CbcMaximumSeconds, value);
     856
     857    if (VERBOSE > 0) printf("%s return\n", prefix);
    853858}
    854859/* Returns true if hit maximum iteratio`ns (or time) */
    855 COINLIBAPI int COINLINKAGE 
     860COINLIBAPI int COINLINKAGE
    856861Cbc_hitMaximumIterations(Cbc_Model * /*model*/)
    857862{
    858   const char prefix[] = "Cbc_C_Interface::Cbc_hitMaximumIterations(): ";
    859 //  const int  VERBOSE = 1;
    860   if (VERBOSE>0) printf("%s begin\n",prefix);
    861 
    862   int result = 0;
     863    const char prefix[] = "Cbc_C_Interface::Cbc_hitMaximumIterations(): ";
     864//  const int  VERBOSE = 1;
     865    if (VERBOSE > 0) printf("%s begin\n", prefix);
     866
     867    int result = 0;
    863868// cannot find names in Cbc, Osi, or OsiClp
    864869//tbd  result = model->model_->solver()->hitMaximumIterations() ? 1 : 0;
    865   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    866 
    867   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    868   return result;
     870    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     871
     872    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     873    return result;
    869874}
    870875/* Status of problem:
     
    875880   4 - stopped due to errors
    876881*/
    877 COINLIBAPI int COINLINKAGE 
     882COINLIBAPI int COINLINKAGE
    878883Cbc_status(Cbc_Model * model)
    879884{
    880   const char prefix[] = "Cbc_C_Interface::Cbc_status(): ";
    881 //  const int  VERBOSE = 1;
    882   if (VERBOSE>0) printf("%s begin\n",prefix);
    883 
    884   int result = 0;
    885   result = model->model_->status();
    886 
    887   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    888   return result;
     885    const char prefix[] = "Cbc_C_Interface::Cbc_status(): ";
     886//  const int  VERBOSE = 1;
     887    if (VERBOSE > 0) printf("%s begin\n", prefix);
     888
     889    int result = 0;
     890    result = model->model_->status();
     891
     892    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     893    return result;
    889894}
    890895/* Set problem status */
    891 COINLIBAPI void COINLINKAGE 
     896COINLIBAPI void COINLINKAGE
    892897Cbc_setProblemStatus(Cbc_Model * /*model*/, int /*problemStatus*/)
    893898{
    894   const char prefix[] = "Cbc_C_Interface::Cbc_setProblemStatus(): ";
    895 //  const int  VERBOSE = 1;
    896   if (VERBOSE>0) printf("%s begin\n",prefix);
     899    const char prefix[] = "Cbc_C_Interface::Cbc_setProblemStatus(): ";
     900//  const int  VERBOSE = 1;
     901    if (VERBOSE > 0) printf("%s begin\n", prefix);
    897902
    898903// cannot find this in Cbc, Osi, or OsiClp
    899904//tbd  model->model_->setProblemStatus(problemStatus);
    900   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    901 
    902   if (VERBOSE>0) printf("%s return\n",prefix);
     905    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     906
     907    if (VERBOSE > 0) printf("%s return\n", prefix);
    903908}
    904909/* Secondary status of problem - may get extended
     
    909914   4 - scaled problem optimal - unscaled has both dual and primal infeasibilities
    910915*/
    911 COINLIBAPI int COINLINKAGE 
     916COINLIBAPI int COINLINKAGE
    912917Cbc_secondaryStatus(Cbc_Model * model)
    913918{
    914   const char prefix[] = "Cbc_C_Interface::Cbc_secondaryStatus(): ";
    915 //  const int  VERBOSE = 1;
    916   if (VERBOSE>0) printf("%s begin\n",prefix);
    917 
    918   int result = 0;
     919    const char prefix[] = "Cbc_C_Interface::Cbc_secondaryStatus(): ";
     920//  const int  VERBOSE = 1;
     921    if (VERBOSE > 0) printf("%s begin\n", prefix);
     922
     923    int result = 0;
    919924// cannot find this in Cbc, Osi, or OsiClp
    920   result = model->model_->secondaryStatus();
    921   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    922 
    923   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    924   return result;
    925 }
    926 COINLIBAPI void COINLINKAGE 
     925    result = model->model_->secondaryStatus();
     926    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     927
     928    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     929    return result;
     930}
     931COINLIBAPI void COINLINKAGE
    927932Cbc_setSecondaryStatus(Cbc_Model * /*model*/, int /*status*/)
    928933{
    929   const char prefix[] = "Cbc_C_Interface::Cbc_setSecondaryStatus(): ";
    930 //  const int  VERBOSE = 1;
    931   if (VERBOSE>0) printf("%s begin\n",prefix);
     934    const char prefix[] = "Cbc_C_Interface::Cbc_setSecondaryStatus(): ";
     935//  const int  VERBOSE = 1;
     936    if (VERBOSE > 0) printf("%s begin\n", prefix);
    932937
    933938// cannot find this in Cbc, Osi, or OsiClp
    934939//tbd  model->model_->setSecondaryStatus(status);
    935   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    936 
    937   if (VERBOSE>0) printf("%s return\n",prefix);
     940    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     941
     942    if (VERBOSE > 0) printf("%s return\n", prefix);
    938943}
    939944/* Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore */
    940 COINLIBAPI double COINLINKAGE 
     945COINLIBAPI double COINLINKAGE
    941946Cbc_optimizationDirection(Cbc_Model * model)
    942947{
    943   const char prefix[] = "Cbc_C_Interface::Cbc_optimizationDirection(): ";
    944 //  const int  VERBOSE = 1;
    945   if (VERBOSE>0) printf("%s begin\n",prefix);
    946 
    947   double result = 0.0;
    948   result = model->model_->getObjSense();
    949 
    950   if (VERBOSE>0) printf("%s return %g\n",prefix, result);
    951   return result;
    952 }
    953 COINLIBAPI void COINLINKAGE 
     948    const char prefix[] = "Cbc_C_Interface::Cbc_optimizationDirection(): ";
     949//  const int  VERBOSE = 1;
     950    if (VERBOSE > 0) printf("%s begin\n", prefix);
     951
     952    double result = 0.0;
     953    result = model->model_->getObjSense();
     954
     955    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     956    return result;
     957}
     958COINLIBAPI void COINLINKAGE
    954959Cbc_setOptimizationDirection(Cbc_Model * model, double value)
    955960{
    956   const char prefix[] = "Cbc_C_Interface::Cbc_setOptimizationDirection(): ";
    957 //  const int  VERBOSE = 1;
    958   if (VERBOSE>0) printf("%s begin, value = %g\n",prefix,value);
    959 
    960   model->model_->setObjSense(value);
     961    const char prefix[] = "Cbc_C_Interface::Cbc_setOptimizationDirection(): ";
     962//  const int  VERBOSE = 1;
     963    if (VERBOSE > 0) printf("%s begin, value = %g\n", prefix, value);
     964
     965    model->model_->setObjSense(value);
    961966//  model->model_->solver()->setObjSense(value);
    962  
    963   if (VERBOSE>0) printf("%s return\n",prefix);
     967
     968    if (VERBOSE > 0) printf("%s return\n", prefix);
    964969}
    965970/* Primal row solution */
    966 COINLIBAPI double * COINLINKAGE 
     971COINLIBAPI double * COINLINKAGE
    967972Cbc_primalRowSolution(Cbc_Model * /*model*/)
    968973{
    969   const char prefix[] = "Cbc_C_Interface::Cbc_primalRowSolution(): ";
    970 //  const int  VERBOSE = 1;
    971   if (VERBOSE>0) printf("%s begin\n",prefix);
    972 
    973   double * result = NULL;
    974  
     974    const char prefix[] = "Cbc_C_Interface::Cbc_primalRowSolution(): ";
     975//  const int  VERBOSE = 1;
     976    if (VERBOSE > 0) printf("%s begin\n", prefix);
     977
     978    double * result = NULL;
     979
    975980// cannot find this in Cbc, Osi, or OsiClp
    976981// may have to make it somehow
    977982//tbd  return model->model_->primalRowSolution();
    978   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    979 
    980   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    981   return result;
     983    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     984
     985    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     986    return result;
    982987}
    983988/* Primal column solution */
    984 COINLIBAPI double * COINLINKAGE 
     989COINLIBAPI double * COINLINKAGE
    985990Cbc_primalColumnSolution(Cbc_Model * /*model*/)
    986991{
    987   const char prefix[] = "Cbc_C_Interface::Cbc_primalColumnSolution(): ";
    988 //  const int  VERBOSE = 1;
    989   if (VERBOSE>0) printf("%s begin\n",prefix);
    990 
    991   double * result = NULL;
     992    const char prefix[] = "Cbc_C_Interface::Cbc_primalColumnSolution(): ";
     993//  const int  VERBOSE = 1;
     994    if (VERBOSE > 0) printf("%s begin\n", prefix);
     995
     996    double * result = NULL;
    992997// cannot find this in Cbc, Osi, or OsiClp
    993998// may have to make it somehow
    994999//  result = model->model_->getColSolution();
    995   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    996 
    997   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    998   return result;
     1000    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1001
     1002    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1003    return result;
    9991004}
    10001005/* Dual row solution */
    1001 COINLIBAPI double * COINLINKAGE 
     1006COINLIBAPI double * COINLINKAGE
    10021007Cbc_dualRowSolution(Cbc_Model * /*model*/)
    10031008{
    1004   const char prefix[] = "Cbc_C_Interface::Cbc_dualRowSolution(): ";
    1005 //  const int  VERBOSE = 1;
    1006   if (VERBOSE>0) printf("%s begin\n",prefix);
    1007 
    1008   double * result = NULL;
     1009    const char prefix[] = "Cbc_C_Interface::Cbc_dualRowSolution(): ";
     1010//  const int  VERBOSE = 1;
     1011    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1012
     1013    double * result = NULL;
    10091014// cannot find this in Cbc, Osi, or OsiClp
    10101015// may have to make it somehow
    10111016//tbd  return model->model_->dualRowSolution();
    1012   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1013 
    1014   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    1015   return NULL;
     1017    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1018
     1019    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1020    return NULL;
    10161021}
    10171022/* Reduced costs */
    1018 COINLIBAPI double * COINLINKAGE 
     1023COINLIBAPI double * COINLINKAGE
    10191024Cbc_dualColumnSolution(Cbc_Model * /*model*/)
    10201025{
    1021   const char prefix[] = "Cbc_C_Interface::Cbc_dualColumnSolution(): ";
    1022 //  const int  VERBOSE = 1;
    1023   if (VERBOSE>0) printf("%s begin\n",prefix);
    1024 
    1025   double * result = NULL;
     1026    const char prefix[] = "Cbc_C_Interface::Cbc_dualColumnSolution(): ";
     1027//  const int  VERBOSE = 1;
     1028    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1029
     1030    double * result = NULL;
    10261031// cannot find this in Cbc, Osi, or OsiClp
    10271032// may have to make it somehow
    10281033//tbd  return model->model_->dualColumnSolution();
    1029   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1030 
    1031   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    1032   return NULL;
     1034    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1035
     1036    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1037    return NULL;
    10331038}
    10341039/* Row lower */
    1035 COINLIBAPI double * COINLINKAGE 
     1040COINLIBAPI double * COINLINKAGE
    10361041Cbc_rowLower(Cbc_Model * /*model*/)
    10371042{
    1038   const char prefix[] = "Cbc_C_Interface::Cbc_rowLower(): ";
    1039 //  const int  VERBOSE = 1;
    1040   if (VERBOSE>0) printf("%s begin\n",prefix);
    1041 
    1042   double * result = NULL;
     1043    const char prefix[] = "Cbc_C_Interface::Cbc_rowLower(): ";
     1044//  const int  VERBOSE = 1;
     1045    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1046
     1047    double * result = NULL;
    10431048// cannot find this in Cbc, Osi, or OsiClp
    10441049// may have to make it somehow
    10451050//tbd  return model->model_->rowLower();
    1046   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1047 
    1048   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    1049   return NULL;
     1051    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1052
     1053    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1054    return NULL;
    10501055}
    10511056/* Row upper  */
    1052 COINLIBAPI double * COINLINKAGE 
     1057COINLIBAPI double * COINLINKAGE
    10531058Cbc_rowUpper(Cbc_Model * /*model*/)
    10541059{
    1055   const char prefix[] = "Cbc_C_Interface::Cbc_rowUpper(): ";
    1056 //  const int  VERBOSE = 1;
    1057   if (VERBOSE>0) printf("%s begin\n",prefix);
    1058 
    1059   double * result = NULL;
     1060    const char prefix[] = "Cbc_C_Interface::Cbc_rowUpper(): ";
     1061//  const int  VERBOSE = 1;
     1062    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1063
     1064    double * result = NULL;
    10601065// cannot find this in Cbc, Osi, or OsiClp
    10611066// may have to make it somehow
    10621067//tbd  return model->model_->rowUpper();
    1063   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1064 
    1065   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    1066   return NULL;
     1068    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1069
     1070    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1071    return NULL;
    10671072}
    10681073/* Objective Coefficients */
    1069 COINLIBAPI double * COINLINKAGE 
     1074COINLIBAPI double * COINLINKAGE
    10701075Cbc_objective(Cbc_Model * /*model*/)
    10711076{
    1072   const char prefix[] = "Cbc_C_Interface::Cbc_objective(): ";
    1073 //  const int  VERBOSE = 1;
    1074   if (VERBOSE>0) printf("%s begin\n",prefix);
    1075 
    1076   double * result = NULL;
     1077    const char prefix[] = "Cbc_C_Interface::Cbc_objective(): ";
     1078//  const int  VERBOSE = 1;
     1079    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1080
     1081    double * result = NULL;
    10771082// cannot find this in Cbc, Osi, or OsiClp
    10781083// may have to make it somehow
    10791084//  result = model->model_->objective();
    1080   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1081 
    1082   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    1083   return NULL;
     1085    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1086
     1087    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1088    return NULL;
    10841089}
    10851090/* Column Lower */
    1086 COINLIBAPI double * COINLINKAGE 
     1091COINLIBAPI double * COINLINKAGE
    10871092Cbc_columnLower(Cbc_Model * /*model*/)
    10881093{
    1089   const char prefix[] = "Cbc_C_Interface::Cbc_columnLower(): ";
    1090 //  const int  VERBOSE = 1;
    1091   if (VERBOSE>0) printf("%s begin\n",prefix);
    1092 
    1093   double * result = NULL;
     1094    const char prefix[] = "Cbc_C_Interface::Cbc_columnLower(): ";
     1095//  const int  VERBOSE = 1;
     1096    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1097
     1098    double * result = NULL;
    10941099// cannot find this in Cbc, Osi, or OsiClp
    10951100// may have to make it somehow
    10961101//tbd  return model->model_->columnLower();
    1097   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1098 
    1099   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    1100   return NULL;
     1102    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1103
     1104    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1105    return NULL;
    11011106}
    11021107/* Column Upper */
    1103 COINLIBAPI double * COINLINKAGE 
     1108COINLIBAPI double * COINLINKAGE
    11041109Cbc_columnUpper(Cbc_Model * /*model*/)
    11051110{
    1106   const char prefix[] = "Cbc_C_Interface::Cbc_columnUpper(): ";
    1107 //  const int  VERBOSE = 1;
    1108   if (VERBOSE>0) printf("%s begin\n",prefix);
    1109 
    1110   double * result = NULL;
     1111    const char prefix[] = "Cbc_C_Interface::Cbc_columnUpper(): ";
     1112//  const int  VERBOSE = 1;
     1113    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1114
     1115    double * result = NULL;
    11111116// cannot find this in Cbc, Osi, or OsiClp
    11121117// may have to make it somehow
    11131118//tbd  return model->model_->columnUpper();
    1114   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1115 
    1116   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    1117   return NULL;
     1119    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1120
     1121    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1122    return NULL;
    11181123}
    11191124/* Number of elements in matrix */
    1120 COINLIBAPI int COINLINKAGE 
     1125COINLIBAPI int COINLINKAGE
    11211126Cbc_getNumElements(Cbc_Model * model)
    11221127{
    1123   const char prefix[] = "Cbc_C_Interface::Cbc_getNumElements(): ";
    1124 //  const int  VERBOSE = 1;
    1125   if (VERBOSE>0) printf("%s begin\n",prefix);
    1126 
    1127   int result = 0;
    1128   result = model->model_->getNumElements();
    1129 
    1130   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1131   return result;
    1132 }
    1133 
    1134 // Column starts in matrix 
    1135 COINLIBAPI const CoinBigIndex * COINLINKAGE 
     1128    const char prefix[] = "Cbc_C_Interface::Cbc_getNumElements(): ";
     1129//  const int  VERBOSE = 1;
     1130    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1131
     1132    int result = 0;
     1133    result = model->model_->getNumElements();
     1134
     1135    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1136    return result;
     1137}
     1138
     1139// Column starts in matrix
     1140COINLIBAPI const CoinBigIndex * COINLINKAGE
    11361141Cbc_getVectorStarts(Cbc_Model * model)
    11371142{
    1138   const CoinPackedMatrix * matrix = NULL;
    1139   matrix = model->model_->solver()->getMatrixByCol();
    1140   return (matrix == NULL) ? NULL : matrix->getVectorStarts();
    1141 }
    1142 // Row indices in matrix 
    1143 COINLIBAPI const int * COINLINKAGE 
     1143    const CoinPackedMatrix * matrix = NULL;
     1144    matrix = model->model_->solver()->getMatrixByCol();
     1145    return (matrix == NULL) ? NULL : matrix->getVectorStarts();
     1146}
     1147// Row indices in matrix
     1148COINLIBAPI const int * COINLINKAGE
    11441149Cbc_getIndices(Cbc_Model * model)
    11451150{
    1146   const char prefix[] = "Cbc_C_Interface::Cbc_getIndices(): ";
    1147 //  const int  VERBOSE = 1;
    1148   if (VERBOSE>0) printf("%s begin\n",prefix);
    1149 
    1150   const int * result = NULL;
    1151   const CoinPackedMatrix * matrix = NULL;
    1152   matrix = model->model_->solver()->getMatrixByCol();
    1153   result = (matrix == NULL) ? NULL : matrix->getIndices();
    1154 
    1155   if (VERBOSE>0)
    1156     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    1157   return result;
    1158 } 
    1159 
    1160 // Column vector lengths in matrix 
    1161 COINLIBAPI const int * COINLINKAGE 
     1151    const char prefix[] = "Cbc_C_Interface::Cbc_getIndices(): ";
     1152//  const int  VERBOSE = 1;
     1153    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1154
     1155    const int * result = NULL;
     1156    const CoinPackedMatrix * matrix = NULL;
     1157    matrix = model->model_->solver()->getMatrixByCol();
     1158    result = (matrix == NULL) ? NULL : matrix->getIndices();
     1159
     1160    if (VERBOSE > 0)
     1161        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     1162    return result;
     1163}
     1164
     1165// Column vector lengths in matrix
     1166COINLIBAPI const int * COINLINKAGE
    11621167Cbc_getVectorLengths(Cbc_Model * model)
    11631168{
    1164   const char prefix[] = "Cbc_C_Interface::Cbc_getVectorLengths(): ";
    1165 //  const int  VERBOSE = 1;
    1166   if (VERBOSE>0) printf("%s begin\n",prefix);
    1167 
    1168   const int * result = NULL;
    1169   const CoinPackedMatrix * matrix = NULL;
    1170   matrix = model->model_->solver()->getMatrixByCol();
    1171   result = (matrix == NULL) ? NULL : matrix->getVectorLengths();
    1172 
    1173   if (VERBOSE>0)
    1174     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    1175   return result;
    1176 } 
    1177  
    1178 // Element values in matrix 
    1179 COINLIBAPI const double * COINLINKAGE 
     1169    const char prefix[] = "Cbc_C_Interface::Cbc_getVectorLengths(): ";
     1170//  const int  VERBOSE = 1;
     1171    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1172
     1173    const int * result = NULL;
     1174    const CoinPackedMatrix * matrix = NULL;
     1175    matrix = model->model_->solver()->getMatrixByCol();
     1176    result = (matrix == NULL) ? NULL : matrix->getVectorLengths();
     1177
     1178    if (VERBOSE > 0)
     1179        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     1180    return result;
     1181}
     1182
     1183// Element values in matrix
     1184COINLIBAPI const double * COINLINKAGE
    11801185Cbc_getElements(Cbc_Model * model)
    11811186{
    1182   const char prefix[] = "Cbc_C_Interface::Cbc_getElements(): ";
    1183 //  const int  VERBOSE = 1;
    1184   if (VERBOSE>0) printf("%s begin\n",prefix);
    1185 
    1186   const double * result = NULL;
    1187   const CoinPackedMatrix * matrix = NULL;
    1188   matrix = model->model_->solver()->getMatrixByCol();
    1189   result = (matrix == NULL) ? NULL : matrix->getElements();
    1190 
    1191   if (VERBOSE>0)
    1192     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    1193   return result;
     1187    const char prefix[] = "Cbc_C_Interface::Cbc_getElements(): ";
     1188//  const int  VERBOSE = 1;
     1189    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1190
     1191    const double * result = NULL;
     1192    const CoinPackedMatrix * matrix = NULL;
     1193    matrix = model->model_->solver()->getMatrixByCol();
     1194    result = (matrix == NULL) ? NULL : matrix->getElements();
     1195
     1196    if (VERBOSE > 0)
     1197        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     1198    return result;
    11941199}
    11951200// ======================================================================
    11961201
    11971202/* Objective value */
    1198 COINLIBAPI double COINLINKAGE 
     1203COINLIBAPI double COINLINKAGE
    11991204Cbc_objectiveValue(Cbc_Model * model)
    12001205{
    1201   const char prefix[] = "Cbc_C_Interface::Cbc_objectiveValue(): ";
    1202 //  const int  VERBOSE = 1;
    1203   if (VERBOSE>0) printf("%s begin\n",prefix);
    1204 
    1205   double result = 0.0;
    1206   result = model->model_->getObjValue();
    1207 
    1208   if (VERBOSE>0) printf("%s return %g\n",prefix, result);
    1209   return result;
     1206    const char prefix[] = "Cbc_C_Interface::Cbc_objectiveValue(): ";
     1207//  const int  VERBOSE = 1;
     1208    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1209
     1210    double result = 0.0;
     1211    result = model->model_->getObjValue();
     1212
     1213    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     1214    return result;
    12101215}
    12111216/* Infeasibility/unbounded ray (NULL returned if none/wrong)
    12121217   Up to user to use delete [] on these arrays.  */
    1213 COINLIBAPI double * COINLINKAGE 
     1218COINLIBAPI double * COINLINKAGE
    12141219Cbc_infeasibilityRay(Cbc_Model * /*model*/)
    12151220{
    1216   const char prefix[] = "Cbc_C_Interface::Cbc_infeasibilityRay(): ";
    1217 //  const int  VERBOSE = 1;
    1218   if (VERBOSE>0) printf("%s begin\n",prefix);
    1219 
    1220   double * result = NULL;
    1221   // lots of rays (probably too many) are available in
    1222   // OsiClpSolverInterface::getDualRays()
    1223   //
     1221    const char prefix[] = "Cbc_C_Interface::Cbc_infeasibilityRay(): ";
     1222//  const int  VERBOSE = 1;
     1223    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1224
     1225    double * result = NULL;
     1226    // lots of rays (probably too many) are available in
     1227    // OsiClpSolverInterface::getDualRays()
     1228    //
    12241229//tbd  result = model->model_->infeasibilityRay();
    1225   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1226 
    1227   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    1228   return result;
    1229 }
    1230 COINLIBAPI double * COINLINKAGE 
     1230    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1231
     1232    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1233    return result;
     1234}
     1235COINLIBAPI double * COINLINKAGE
    12311236Cbc_unboundedRay(Cbc_Model * /*model*/)
    12321237{
    1233   const char prefix[] = "Cbc_C_Interface::Cbc_unboundedRay(): ";
    1234 //  const int  VERBOSE = 1;
    1235   if (VERBOSE>0) printf("%s begin\n",prefix);
    1236 
    1237   double * result = NULL;
    1238   // lots of rays (probably too many) are available in
    1239   // OsiClpSolverInterface::getPrimalRays()
    1240   //
     1238    const char prefix[] = "Cbc_C_Interface::Cbc_unboundedRay(): ";
     1239//  const int  VERBOSE = 1;
     1240    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1241
     1242    double * result = NULL;
     1243    // lots of rays (probably too many) are available in
     1244    // OsiClpSolverInterface::getPrimalRays()
     1245    //
    12411246//tbd  result = model->model_->unboundedRay();
    1242   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1243 
    1244   if (VERBOSE>0) printf("%s return %p\n",prefix, static_cast<void*>(result));
    1245   return result;
     1247    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1248
     1249    if (VERBOSE > 0) printf("%s return %p\n", prefix, static_cast<void*>(result));
     1250    return result;
    12461251}
    12471252/* See if status array exists (partly for OsiClp) */
    1248 COINLIBAPI int COINLINKAGE 
     1253COINLIBAPI int COINLINKAGE
    12491254Cbc_statusExists(Cbc_Model * /*model*/)
    12501255{
    1251   const char prefix[] = "Cbc_C_Interface::Cbc_statusExists(): ";
    1252 //  const int  VERBOSE = 1;
    1253   if (VERBOSE>0) printf("%s begin\n",prefix);
    1254 
    1255   int result = 0;
     1256    const char prefix[] = "Cbc_C_Interface::Cbc_statusExists(): ";
     1257//  const int  VERBOSE = 1;
     1258    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1259
     1260    int result = 0;
    12561261//tbd  result = model->model_->statusExists() ? 1 : 0;
    1257   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1258 
    1259   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1260   return result;
     1262    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1263
     1264    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1265    return result;
    12611266}
    12621267/* Return address of status array (char[numberRows+numberColumns]) */
    1263 COINLIBAPI void  COINLINKAGE 
     1268COINLIBAPI void  COINLINKAGE
    12641269Cbc_getBasisStatus(Cbc_Model * /*model*/, int * /*cstat*/, int * /*rstat*/)
    12651270{
    1266   const char prefix[] = "Cbc_C_Interface::Cbc_getBasisStatus(): ";
    1267 //  const int  VERBOSE = 1;
    1268   if (VERBOSE>0) printf("%s begin\n",prefix);
     1271    const char prefix[] = "Cbc_C_Interface::Cbc_getBasisStatus(): ";
     1272//  const int  VERBOSE = 1;
     1273    if (VERBOSE > 0) printf("%s begin\n", prefix);
    12691274
    12701275// have to figure this out
    12711276//tbd  model->model_->solver()->getBasisStatus(cstat, rstat);
    1272   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1273 
    1274   if (VERBOSE>0) printf("%s return\n",prefix);
    1275   return;
     1277    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1278
     1279    if (VERBOSE > 0) printf("%s return\n", prefix);
     1280    return;
    12761281}
    12771282/* Copy in status vector */
    1278 COINLIBAPI void COINLINKAGE 
     1283COINLIBAPI void COINLINKAGE
    12791284Cbc_setBasisStatus(Cbc_Model * /*model*/,  int * /*cstat*/, int * /*rstat*/)
    12801285{
    1281   const char prefix[] = "Cbc_C_Interface::Cbc_setBasisStatus(): ";
    1282 //  const int  VERBOSE = 1;
    1283   if (VERBOSE>0) printf("%s begin\n",prefix);
     1286    const char prefix[] = "Cbc_C_Interface::Cbc_setBasisStatus(): ";
     1287//  const int  VERBOSE = 1;
     1288    if (VERBOSE > 0) printf("%s begin\n", prefix);
    12841289
    12851290//  model->model_->solver()->setBasisStatus(cstat, rstat);
    1286   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1287 
    1288   if (VERBOSE>0) printf("%s return\n",prefix);
     1291    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1292
     1293    if (VERBOSE > 0) printf("%s return\n", prefix);
    12891294}
    12901295
    12911296/* User pointer for whatever reason */
    1292 COINLIBAPI void COINLINKAGE 
     1297COINLIBAPI void COINLINKAGE
    12931298Cbc_setUserPointer (Cbc_Model * /*model*/, void * /*pointer*/)
    12941299{
    1295   const char prefix[] = "Cbc_C_Interface::Cbc_setUserPointer(): ";
    1296 //  const int  VERBOSE = 1;
    1297   if (VERBOSE>0) printf("%s begin\n",prefix);
    1298 
    1299   // not sure what this is for
    1300   //
     1300    const char prefix[] = "Cbc_C_Interface::Cbc_setUserPointer(): ";
     1301//  const int  VERBOSE = 1;
     1302    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1303
     1304    // not sure what this is for
     1305    //
    13011306//tbd  model->model_->setUserPointer(pointer);
    1302   if (VERBOSE>0) printf("%s WARNING: NOT IMPLEMENTED\n",prefix);
    1303 
    1304   if (VERBOSE>0) printf("%s return\n",prefix);
    1305 }
    1306 COINLIBAPI void * COINLINKAGE 
     1307    if (VERBOSE > 0) printf("%s WARNING: NOT IMPLEMENTED\n", prefix);
     1308
     1309    if (VERBOSE > 0) printf("%s return\n", prefix);
     1310}
     1311COINLIBAPI void * COINLINKAGE
    13071312Cbc_getUserPointer (Cbc_Model * /*model*/)
    13081313{
    1309   const char prefix[] = "Cbc_C_Interface::Cbc_getUserPointer(): ";
    1310 //  const int  VERBOSE = 1;
    1311   if (VERBOSE>0) printf("%s begin\n",prefix);
    1312 
    1313   void * result = NULL;
    1314   // not sure what this is for
    1315   //
     1314    const char prefix[] = "Cbc_C_Interface::Cbc_getUserPointer(): ";
     1315//  const int  VERBOSE = 1;
     1316    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1317
     1318    void * result = NULL;
     1319    // not sure what this is for
     1320    //
    13161321//tbd result = model->model_->getUserPointer();
    1317   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1318 
    1319   if (VERBOSE>0) printf("%s return %p\n",prefix,result);
    1320   return result;
     1322    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1323
     1324    if (VERBOSE > 0) printf("%s return %p\n", prefix, result);
     1325    return result;
    13211326}
    13221327/* Pass in Callback function */
    1323 COINLIBAPI void COINLINKAGE 
    1324 Cbc_registerCallBack(Cbc_Model * model, 
    1325          cbc_callback userCallBack)
    1326 {
    1327   const char prefix[] = "Cbc_C_Interface::Cbc_registerCallBack(): ";
    1328 //  const int  VERBOSE = 1;
    1329   if (VERBOSE>0) printf("%s begin\n",prefix);
    1330 
    1331   // reuse existing log level
    1332   int oldLogLevel = model->model_->messageHandler()->logLevel();
    1333   // Will be copy of users one
    1334   delete model->handler_;
    1335   model->handler_ = new Cbc_MessageHandler(*(model->model_->messageHandler()));
    1336   model->handler_->setCallBack(userCallBack);
    1337   model->handler_->setModel(model);
    1338   model->model_->passInMessageHandler(model->handler_);
    1339   model->model_->messageHandler()->setLogLevel(oldLogLevel);
    1340 
    1341   if (VERBOSE>0) printf("%s return\n",prefix);
     1328COINLIBAPI void COINLINKAGE
     1329Cbc_registerCallBack(Cbc_Model * model,
     1330                     cbc_callback userCallBack)
     1331{
     1332    const char prefix[] = "Cbc_C_Interface::Cbc_registerCallBack(): ";
     1333//  const int  VERBOSE = 1;
     1334    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1335
     1336    // reuse existing log level
     1337    int oldLogLevel = model->model_->messageHandler()->logLevel();
     1338    // Will be copy of users one
     1339    delete model->handler_;
     1340    model->handler_ = new Cbc_MessageHandler(*(model->model_->messageHandler()));
     1341    model->handler_->setCallBack(userCallBack);
     1342    model->handler_->setModel(model);
     1343    model->model_->passInMessageHandler(model->handler_);
     1344    model->model_->messageHandler()->setLogLevel(oldLogLevel);
     1345
     1346    if (VERBOSE > 0) printf("%s return\n", prefix);
    13421347}
    13431348/* Unset Callback function */
    1344 COINLIBAPI void COINLINKAGE 
     1349COINLIBAPI void COINLINKAGE
    13451350Cbc_clearCallBack(Cbc_Model * model)
    13461351{
    1347   const char prefix[] = "Cbc_C_Interface::Cbc_clearCallBack(): ";
    1348 //  const int  VERBOSE = 1;
    1349   if (VERBOSE>0) printf("%s begin\n",prefix);
    1350  
    1351   delete model->handler_;
    1352   model->handler_=NULL;
    1353 
    1354   if (VERBOSE>0) printf("%s return\n",prefix);
     1352    const char prefix[] = "Cbc_C_Interface::Cbc_clearCallBack(): ";
     1353//  const int  VERBOSE = 1;
     1354    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1355
     1356    delete model->handler_;
     1357    model->handler_ = NULL;
     1358
     1359    if (VERBOSE > 0) printf("%s return\n", prefix);
    13551360}
    13561361/* Amount of print out:
     
    13621367   above that 8,16,32 etc just for selective debug
    13631368*/
    1364 COINLIBAPI void COINLINKAGE 
     1369COINLIBAPI void COINLINKAGE
    13651370Cbc_setLogLevel(Cbc_Model * model, int value)
    13661371{
    1367   const char prefix[] = "Cbc_C_Interface::Cbc_setLogLevel(): ";
    1368 //  const int  VERBOSE = 1;
    1369   if (VERBOSE>0) printf("%s begin\n",prefix);
    1370   if (VERBOSE>1) printf("%s value = %i\n",prefix, value);
    1371  
    1372   model->model_->messageHandler()->setLogLevel(value);
    1373 
    1374   if (VERBOSE>0) printf("%s return\n",prefix);
    1375 }
    1376 COINLIBAPI int COINLINKAGE 
     1372    const char prefix[] = "Cbc_C_Interface::Cbc_setLogLevel(): ";
     1373//  const int  VERBOSE = 1;
     1374    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1375    if (VERBOSE > 1) printf("%s value = %i\n", prefix, value);
     1376
     1377    model->model_->messageHandler()->setLogLevel(value);
     1378
     1379    if (VERBOSE > 0) printf("%s return\n", prefix);
     1380}
     1381COINLIBAPI int COINLINKAGE
    13771382Cbc_logLevel(Cbc_Model * model)
    13781383{
    1379   const char prefix[] = "Cbc_C_Interface::Cbc_logLevel(): ";
    1380 //  const int  VERBOSE = 1;
    1381   if (VERBOSE>0) printf("%s begin\n",prefix);
    1382  
    1383   int result = 0;
    1384   result = model->model_->messageHandler()->logLevel();
    1385 
    1386   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1387   return result;
     1384    const char prefix[] = "Cbc_C_Interface::Cbc_logLevel(): ";
     1385//  const int  VERBOSE = 1;
     1386    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1387
     1388    int result = 0;
     1389    result = model->model_->messageHandler()->logLevel();
     1390
     1391    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1392    return result;
    13881393}
    13891394/* length of names (0 means no names0 */
    1390 COINLIBAPI int COINLINKAGE 
     1395COINLIBAPI int COINLINKAGE
    13911396Cbc_lengthNames(Cbc_Model * /*model*/)
    13921397{
    1393   const char prefix[] = "Cbc_C_Interface::Cbc_lengthNames(): ";
    1394 //  const int  VERBOSE = 1;
    1395   if (VERBOSE>0) printf("%s begin\n",prefix);
    1396  
    1397   int result = 0;
     1398    const char prefix[] = "Cbc_C_Interface::Cbc_lengthNames(): ";
     1399//  const int  VERBOSE = 1;
     1400    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1401
     1402    int result = 0;
    13981403// cannot find names in Cbc, Osi, or OsiClp
    13991404//tbd  result = model->model_->lengthNames();
    1400   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1401 
    1402   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1403   return result;
     1405    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1406
     1407    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1408    return result;
    14041409}
    14051410/* Fill in array (at least lengthNames+1 long) with a row name */
    1406 COINLIBAPI void COINLINKAGE 
     1411COINLIBAPI void COINLINKAGE
    14071412Cbc_rowName(Cbc_Model * /*model*/, int iRow, char * name)
    14081413{
    1409   const char prefix[] = "Cbc_C_Interface::Cbc_rowName(): ";
    1410 //  const int  VERBOSE = 1;
    1411   if (VERBOSE>0) printf("%s begin\n",prefix);
    1412  
    1413   sprintf(name,"ROW%5i",iRow);
     1414    const char prefix[] = "Cbc_C_Interface::Cbc_rowName(): ";
     1415//  const int  VERBOSE = 1;
     1416    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1417
     1418    sprintf(name, "ROW%5i", iRow);
    14141419// cannot find names in Cbc, Osi, or OsiClp
    14151420//tbd  std::string rowName=model->model_->rowName(iRow);
    14161421//tbd  strcpy(name,rowName.c_str());
    14171422
    1418   if (VERBOSE>0) printf("%s return\n",prefix);
     1423    if (VERBOSE > 0) printf("%s return\n", prefix);
    14191424}
    14201425/* Fill in array (at least lengthNames+1 long) with a column name */
    14211426// cannot find names in Cbc, Osi, or OsiClp
    1422 COINLIBAPI void COINLINKAGE 
     1427COINLIBAPI void COINLINKAGE
    14231428Cbc_columnName(Cbc_Model * /*model*/, int iColumn, char * name)
    14241429{
    1425   const char prefix[] = "Cbc_C_Interface::Cbc_columnName(): ";
    1426 //  const int  VERBOSE = 1;
    1427   if (VERBOSE>0) printf("%s begin\n",prefix);
    1428  
    1429   sprintf(name,"COL%5i",iColumn);
     1430    const char prefix[] = "Cbc_C_Interface::Cbc_columnName(): ";
     1431//  const int  VERBOSE = 1;
     1432    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1433
     1434    sprintf(name, "COL%5i", iColumn);
    14301435//tbd  std::string columnName= model->model_->columnName(iColumn);
    14311436//tbd  strcpy(name,columnName.c_str());
    14321437
    1433   if (VERBOSE>0) printf("%s return\n",prefix);
     1438    if (VERBOSE > 0) printf("%s return\n", prefix);
    14341439}
    14351440
     
    14371442   See  CbcSolve.hpp for options
    14381443*/
    1439 COINLIBAPI int COINLINKAGE 
     1444COINLIBAPI int COINLINKAGE
    14401445Cbc_initialSolve(Cbc_Model * model)
    14411446{
    1442   const char prefix[] = "Cbc_C_Interface::Cbc_initialSolve(): ";
    1443 //  const int  VERBOSE = 1;
    1444   if (VERBOSE>0) printf("%s begin\n",prefix);
    1445  
    1446   int result = 0;
    1447   model->model_->initialSolve();
    1448   result = model->model_->status();
    1449 
    1450   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1451   return result;
     1447    const char prefix[] = "Cbc_C_Interface::Cbc_initialSolve(): ";
     1448//  const int  VERBOSE = 1;
     1449    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1450
     1451    int result = 0;
     1452    model->model_->initialSolve();
     1453    result = model->model_->status();
     1454
     1455    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1456    return result;
    14521457}
    14531458/* General solve algorithm which can do presolve.
    14541459   See  CbcModel.hpp for options
    14551460*/
    1456 COINLIBAPI int COINLINKAGE 
     1461COINLIBAPI int COINLINKAGE
    14571462Cbc_branchAndBound(Cbc_Model * model)
    14581463{
    1459   const char prefix[] = "Cbc_C_Interface::Cbc_branchAndBound(): ";
     1464    const char prefix[] = "Cbc_C_Interface::Cbc_branchAndBound(): ";
    14601465//  const int  VERBOSE = 3;
    1461   if (VERBOSE>0) printf("%s begin\n",prefix);
    1462  
    1463   int result = 0;
    1464   if (VERBOSE>2) Cbc_printModel(model,prefix);
    1465   try {
    1466     model->model_->branchAndBound();
    1467     model->model_->solver()->resolve();
    1468   } catch (CoinError e) {
    1469     printf("%s ERROR: %s::%s, %s\n", prefix,
    1470       e.className().c_str(), e.methodName().c_str(), e.message().c_str());
    1471   }
    1472   result = model->model_->status();
    1473 
    1474   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1475   return result;
     1466    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1467
     1468    int result = 0;
     1469    if (VERBOSE > 2) Cbc_printModel(model, prefix);
     1470    try {
     1471        model->model_->branchAndBound();
     1472        model->model_->solver()->resolve();
     1473    } catch (CoinError e) {
     1474        printf("%s ERROR: %s::%s, %s\n", prefix,
     1475               e.className().c_str(), e.methodName().c_str(), e.message().c_str());
     1476    }
     1477    result = model->model_->status();
     1478
     1479    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1480    return result;
    14761481}
    14771482/* Sets or unsets scaling, 0 -off, 1 equilibrium, 2 geometric, 3, auto, 4 dynamic(later) */
    1478 COINLIBAPI void COINLINKAGE 
     1483COINLIBAPI void COINLINKAGE
    14791484Cbc_scaling(Cbc_Model * model, int mode)
    14801485{
    1481   const char prefix[] = "Cbc_C_Interface::Cbc_scaling(): ";
    1482 //  const int  VERBOSE = 1;
    1483   if (VERBOSE>0) printf("%s begin\n",prefix);
    1484  
    1485   OsiSolverInterface * solver = model->model_->solver();
    1486   bool modeBool = (mode == 0);
    1487   solver->setHintParam(OsiDoScale, modeBool);
    1488 
    1489   if (VERBOSE>0) printf("%s return\n",prefix);
     1486    const char prefix[] = "Cbc_C_Interface::Cbc_scaling(): ";
     1487//  const int  VERBOSE = 1;
     1488    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1489
     1490    OsiSolverInterface * solver = model->model_->solver();
     1491    bool modeBool = (mode == 0);
     1492    solver->setHintParam(OsiDoScale, modeBool);
     1493
     1494    if (VERBOSE > 0) printf("%s return\n", prefix);
    14901495}
    14911496/* Gets scalingFlag */
    1492 COINLIBAPI int COINLINKAGE 
     1497COINLIBAPI int COINLINKAGE
    14931498Cbc_scalingFlag(Cbc_Model * /*model*/)
    14941499{
    1495   const char prefix[] = "Cbc_C_Interface::Cbc_scalingFlag(): ";
    1496 //  const int  VERBOSE = 1;
    1497   if (VERBOSE>0) printf("%s begin\n",prefix);
    1498  
    1499   int result = 0;
     1500    const char prefix[] = "Cbc_C_Interface::Cbc_scalingFlag(): ";
     1501//  const int  VERBOSE = 1;
     1502    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1503
     1504    int result = 0;
    15001505// try to use OsiSolverInterface::getHintParam(OsiDoScale, ???)
    15011506//tbd  result = model->model_->scalingFlag();
    1502   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1503 
    1504   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1505   return result;
     1507    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1508
     1509    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1510    return result;
    15061511}
    15071512/* Crash - at present just aimed at dual, returns
     
    15111516   1 if primal preferred and all slack basis preferred
    15121517   2 if primal preferred and crash basis created.
    1513    
     1518
    15141519   if gap between bounds <="gap" variables can be flipped
    1515    
     1520
    15161521   If "pivot" is
    15171522   0 No pivoting (so will just be choice of algorithm)
     
    15191524   2 Mini iterations
    15201525*/
    1521 COINLIBAPI int COINLINKAGE 
    1522 Cbc_crash(Cbc_Model * /*model*/, double /*gap*/,int /*pivot*/)
    1523 {
    1524   const char prefix[] = "Cbc_C_Interface::Cbc_crash(): ";
    1525 //  const int  VERBOSE = 1;
    1526   if (VERBOSE>0) printf("%s begin\n",prefix);
    1527  
    1528   int result = 0;
     1526COINLIBAPI int COINLINKAGE
     1527Cbc_crash(Cbc_Model * /*model*/, double /*gap*/, int /*pivot*/)
     1528{
     1529    const char prefix[] = "Cbc_C_Interface::Cbc_crash(): ";
     1530//  const int  VERBOSE = 1;
     1531    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1532
     1533    int result = 0;
    15291534// cannot find names in Cbc, Osi, or OsiClp
    15301535//tbd  result = model->model_->crash(gap,pivot);
    1531   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1532 
    1533   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1534   return result;
     1536    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1537
     1538    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1539    return result;
    15351540}
    15361541/* If problem is primal feasible */
    1537 COINLIBAPI int COINLINKAGE 
     1542COINLIBAPI int COINLINKAGE
    15381543Cbc_primalFeasible(Cbc_Model * model)
    15391544{
    1540   const char prefix[] = "Cbc_C_Interface::Cbc_primalFeasible(): ";
    1541 //  const int  VERBOSE = 1;
    1542   if (VERBOSE>0) printf("%s begin\n",prefix);
    1543  
    1544   int result = 0;
    1545   OsiSolverInterface * solver = model->model_->solver();
    1546   result = solver->isProvenPrimalInfeasible() ? 0 : 1;
    1547 
    1548   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1549   return result;
     1545    const char prefix[] = "Cbc_C_Interface::Cbc_primalFeasible(): ";
     1546//  const int  VERBOSE = 1;
     1547    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1548
     1549    int result = 0;
     1550    OsiSolverInterface * solver = model->model_->solver();
     1551    result = solver->isProvenPrimalInfeasible() ? 0 : 1;
     1552
     1553    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1554    return result;
    15501555}
    15511556/* If problem is dual feasible */
    1552 COINLIBAPI int COINLINKAGE 
     1557COINLIBAPI int COINLINKAGE
    15531558Cbc_dualFeasible(Cbc_Model * model)
    15541559{
    1555   const char prefix[] = "Cbc_C_Interface::Cbc_dualFeasible(): ";
    1556 //  const int  VERBOSE = 1;
    1557   if (VERBOSE>0) printf("%s begin\n",prefix);
    1558  
    1559   int result = 0;
    1560   OsiSolverInterface * solver = model->model_->solver();
    1561   result = solver->isProvenDualInfeasible() ? 0 : 1;
    1562 
    1563   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1564   return result;
     1560    const char prefix[] = "Cbc_C_Interface::Cbc_dualFeasible(): ";
     1561//  const int  VERBOSE = 1;
     1562    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1563
     1564    int result = 0;
     1565    OsiSolverInterface * solver = model->model_->solver();
     1566    result = solver->isProvenDualInfeasible() ? 0 : 1;
     1567
     1568    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1569    return result;
    15651570}
    15661571/* Dual bound */
    1567 COINLIBAPI double COINLINKAGE 
     1572COINLIBAPI double COINLINKAGE
    15681573Cbc_dualBound(Cbc_Model * /*model*/)
    15691574{
    1570   const char prefix[] = "Cbc_C_Interface::Cbc_dualBound(): ";
    1571 //  const int  VERBOSE = 1;
    1572   if (VERBOSE>0) printf("%s begin\n",prefix);
    1573  
    1574   double result = 0;
     1575    const char prefix[] = "Cbc_C_Interface::Cbc_dualBound(): ";
     1576//  const int  VERBOSE = 1;
     1577    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1578
     1579    double result = 0;
    15751580// cannot find in Cbc, Osi, or OsiClp
    15761581//tbd  result = model->model_->dualBound();
    1577   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1578 
    1579   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    1580   return result;
    1581 }
    1582 COINLIBAPI void COINLINKAGE 
     1582    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1583
     1584    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     1585    return result;
     1586}
     1587COINLIBAPI void COINLINKAGE
    15831588Cbc_setDualBound(Cbc_Model * /*model*/, double /*value*/)
    15841589{
    1585   const char prefix[] = "Cbc_C_Interface::Cbc_setDualBound(): ";
    1586 //  const int  VERBOSE = 1;
    1587   if (VERBOSE>0) printf("%s begin\n",prefix);
    1588  
     1590    const char prefix[] = "Cbc_C_Interface::Cbc_setDualBound(): ";
     1591//  const int  VERBOSE = 1;
     1592    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1593
    15891594// cannot find names in Cbc, Osi, or OsiClp
    15901595//tbd  model->model_->setDualBound(value);
    1591   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1592 
    1593   if (VERBOSE>0) printf("%s return\n",prefix);
     1596    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1597
     1598    if (VERBOSE > 0) printf("%s return\n", prefix);
    15941599}
    15951600/* Infeasibility cost */
    1596 COINLIBAPI double COINLINKAGE 
     1601COINLIBAPI double COINLINKAGE
    15971602Cbc_infeasibilityCost(Cbc_Model * /*model*/)
    15981603{
    1599   const char prefix[] = "Cbc_C_Interface::Cbc_infeasibilityCost(): ";
    1600 //  const int  VERBOSE = 1;
    1601   if (VERBOSE>0) printf("%s begin\n",prefix);
    1602  
    1603   double result = 0;
     1604    const char prefix[] = "Cbc_C_Interface::Cbc_infeasibilityCost(): ";
     1605//  const int  VERBOSE = 1;
     1606    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1607
     1608    double result = 0;
    16041609// cannot find names in Cbc, Osi, or OsiClp
    16051610//tbd  result = model->model_->solver()->infeasibilityCost();
    1606   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1607 
    1608   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    1609   return result;
    1610 }
    1611 COINLIBAPI void COINLINKAGE 
     1611    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1612
     1613    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     1614    return result;
     1615}
     1616COINLIBAPI void COINLINKAGE
    16121617Cbc_setInfeasibilityCost(Cbc_Model * /*model*/, double /*value*/)
    16131618{
    1614   const char prefix[] = "Cbc_C_Interface::Cbc_setInfeasibilityCost(): ";
    1615 //  const int  VERBOSE = 1;
    1616   if (VERBOSE>0) printf("%s begin\n",prefix);
    1617  
     1619    const char prefix[] = "Cbc_C_Interface::Cbc_setInfeasibilityCost(): ";
     1620//  const int  VERBOSE = 1;
     1621    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1622
    16181623// cannot find names in Cbc, Osi, or OsiClp
    16191624//tbd  model->model_->setInfeasibilityCost(value);
    1620   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1621 
    1622   if (VERBOSE>0) printf("%s return\n",prefix);
     1625    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1626
     1627    if (VERBOSE > 0) printf("%s return\n", prefix);
    16231628}
    16241629/* Perturbation:
     
    16301635   others are for playing
    16311636*/
    1632 COINLIBAPI int COINLINKAGE 
     1637COINLIBAPI int COINLINKAGE
    16331638Cbc_perturbation(Cbc_Model * /*model*/)
    16341639{
    1635   const char prefix[] = "Cbc_C_Interface::Cbc_perturbation(): ";
    1636 //  const int  VERBOSE = 1;
    1637   if (VERBOSE>0) printf("%s begin\n",prefix);
    1638  
    1639   int result = 0;
     1640    const char prefix[] = "Cbc_C_Interface::Cbc_perturbation(): ";
     1641//  const int  VERBOSE = 1;
     1642    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1643
     1644    int result = 0;
    16401645// cannot find names in Cbc, Osi, or OsiClp
    16411646//tbd  result = model->model_->perturbation();
    1642   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1643 
    1644   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1645   return result;
    1646 }
    1647 COINLIBAPI void COINLINKAGE 
     1647    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1648
     1649    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1650    return result;
     1651}
     1652COINLIBAPI void COINLINKAGE
    16481653Cbc_setPerturbation(Cbc_Model * /*model*/, int /*value*/)
    16491654{
    1650   const char prefix[] = "Cbc_C_Interface::Cbc_setPerturbation(): ";
    1651 //  const int  VERBOSE = 1;
    1652   if (VERBOSE>0) printf("%s begin\n",prefix);
    1653  
     1655    const char prefix[] = "Cbc_C_Interface::Cbc_setPerturbation(): ";
     1656//  const int  VERBOSE = 1;
     1657    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1658
    16541659// cannot find names in Cbc, Osi, or OsiClp
    16551660//tbd  model->model_->setPerturbation(value);
    1656   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1657 
    1658   if (VERBOSE>0) printf("%s return\n",prefix);
     1661    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1662
     1663    if (VERBOSE > 0) printf("%s return\n", prefix);
    16591664}
    16601665/* Current (or last) algorithm */
    1661 COINLIBAPI int COINLINKAGE 
     1666COINLIBAPI int COINLINKAGE
    16621667Cbc_algorithm(Cbc_Model * /*model*/)
    16631668{
    1664   const char prefix[] = "Cbc_C_Interface::Cbc_setPerturbation(): ";
    1665 //  const int  VERBOSE = 1;
    1666   if (VERBOSE>0) printf("%s begin\n",prefix);
    1667  
    1668   int result = 0;
     1669    const char prefix[] = "Cbc_C_Interface::Cbc_setPerturbation(): ";
     1670//  const int  VERBOSE = 1;
     1671    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1672
     1673    int result = 0;
    16691674// cannot find names in Cbc, Osi, or OsiClp
    16701675//tbd  result = model->model_->algorithm();
    1671   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1672 
    1673   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1674   return result;
     1676    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1677
     1678    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1679    return result;
    16751680}
    16761681/* Set algorithm */
    1677 COINLIBAPI void COINLINKAGE 
     1682COINLIBAPI void COINLINKAGE
    16781683Cbc_setAlgorithm(Cbc_Model * /*model*/, int /*value*/)
    16791684{
    1680   const char prefix[] = "Cbc_C_Interface::Cbc_setAlgorithm(): ";
    1681 //  const int  VERBOSE = 1;
    1682   if (VERBOSE>0) printf("%s begin\n",prefix);
    1683  
     1685    const char prefix[] = "Cbc_C_Interface::Cbc_setAlgorithm(): ";
     1686//  const int  VERBOSE = 1;
     1687    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1688
    16841689// cannot find names in Cbc, Osi, or OsiClp
    16851690//tbd  model->model_->setAlgorithm(value);
    1686   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1687 
    1688   if (VERBOSE>0) printf("%s return\n",prefix);
     1691    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1692
     1693    if (VERBOSE > 0) printf("%s return\n", prefix);
    16891694}
    16901695/* Sum of dual infeasibilities */
    1691 COINLIBAPI double COINLINKAGE 
     1696COINLIBAPI double COINLINKAGE
    16921697Cbc_sumDualInfeasibilities(Cbc_Model * /*model*/)
    16931698{
    1694   const char prefix[] = "Cbc_C_Interface::Cbc_sumDualInfeasibilities(): ";
    1695 //  const int  VERBOSE = 1;
    1696   if (VERBOSE>0) printf("%s begin\n",prefix);
    1697  
    1698   double result = 0;
     1699    const char prefix[] = "Cbc_C_Interface::Cbc_sumDualInfeasibilities(): ";
     1700//  const int  VERBOSE = 1;
     1701    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1702
     1703    double result = 0;
    16991704// cannot find names in Cbc, Osi, or OsiClp
    17001705//tbd  result = model->model_->sumDualInfeasibilities();
    1701   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1702 
    1703   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    1704   return result;
     1706    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1707
     1708    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     1709    return result;
    17051710}
    17061711/* Number of dual infeasibilities */
    1707 COINLIBAPI int COINLINKAGE 
     1712COINLIBAPI int COINLINKAGE
    17081713Cbc_numberDualInfeasibilities(Cbc_Model * /*model*/)
    17091714{
    1710   const char prefix[] = "Cbc_C_Interface::Cbc_numberDualInfeasibilities(): ";
    1711 //  const int  VERBOSE = 1;
    1712   if (VERBOSE>0) printf("%s begin\n",prefix);
    1713  
    1714   int result = 0;
     1715    const char prefix[] = "Cbc_C_Interface::Cbc_numberDualInfeasibilities(): ";
     1716//  const int  VERBOSE = 1;
     1717    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1718
     1719    int result = 0;
    17151720// cannot find names in Cbc, Osi, or OsiClp
    17161721//tbd  result = model->model_->numberDualInfeasibilities();
    1717   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1718 
    1719   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1720   return result;
     1722    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1723
     1724    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1725    return result;
    17211726}
    17221727/* Sum of primal infeasibilities */
    1723 COINLIBAPI double COINLINKAGE 
     1728COINLIBAPI double COINLINKAGE
    17241729Cbc_sumPrimalInfeasibilities(Cbc_Model * /*model*/)
    17251730{
    1726   const char prefix[] = "Cbc_C_Interface::Cbc_sumPrimalInfeasibilities(): ";
    1727 //  const int  VERBOSE = 1;
    1728   if (VERBOSE>0) printf("%s begin\n",prefix);
    1729  
    1730   double result = 0;
     1731    const char prefix[] = "Cbc_C_Interface::Cbc_sumPrimalInfeasibilities(): ";
     1732//  const int  VERBOSE = 1;
     1733    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1734
     1735    double result = 0;
    17311736// cannot find names in Cbc, Osi, or OsiClp
    17321737//tbd result = model->model_->sumPrimalInfeasibilities();
    1733   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1734 
    1735   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    1736   return result;
     1738    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1739
     1740    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     1741    return result;
    17371742}
    17381743/* Number of primal infeasibilities */
    1739 COINLIBAPI int COINLINKAGE 
     1744COINLIBAPI int COINLINKAGE
    17401745Cbc_numberPrimalInfeasibilities(Cbc_Model * /*model*/)
    17411746{
    1742   const char prefix[] = "Cbc_C_Interface::Cbc_numberPrimalInfeasibilities(): ";
    1743 //  const int  VERBOSE = 1;
    1744   if (VERBOSE>0) printf("%s begin\n",prefix);
    1745  
    1746   int result = 0;
     1747    const char prefix[] = "Cbc_C_Interface::Cbc_numberPrimalInfeasibilities(): ";
     1748//  const int  VERBOSE = 1;
     1749    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1750
     1751    int result = 0;
    17471752//tbd  result = model->model_->getContinuousInfeasibilities();
    1748   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1749 
    1750   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1751   return result;
     1753    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1754
     1755    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1756    return result;
    17521757}
    17531758/* Save model to file, returns 0 if success.  This is designed for
    17541759   use outside algorithms so does not save iterating arrays etc.
    1755    It does not save any messaging information. 
     1760   It does not save any messaging information.
    17561761   Does not save scaling values.
    17571762   It does not know about all types of virtual functions.
    17581763*/
    1759 COINLIBAPI int COINLINKAGE 
     1764COINLIBAPI int COINLINKAGE
    17601765Cbc_saveModel(Cbc_Model * /*model*/, const char * /*fileName*/)
    17611766{
    1762   const char prefix[] = "Cbc_C_Interface::Cbc_saveModel(): ";
    1763 //  const int  VERBOSE = 1;
    1764   if (VERBOSE>0) printf("%s begin\n",prefix);
    1765  
    1766   int result = 0;
    1767 // there is a writeMPS method in Osi 
     1767    const char prefix[] = "Cbc_C_Interface::Cbc_saveModel(): ";
     1768//  const int  VERBOSE = 1;
     1769    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1770
     1771    int result = 0;
     1772// there is a writeMPS method in Osi
    17681773//tbd  result = model->model_->saveModel(fileName);
    1769   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1770 
    1771   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1772   return result;
     1774    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1775
     1776    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1777    return result;
    17731778}
    17741779/* Restore model from file, returns 0 if success,
    17751780   deletes current model */
    1776 COINLIBAPI int COINLINKAGE 
     1781COINLIBAPI int COINLINKAGE
    17771782Cbc_restoreModel(Cbc_Model * /*model*/, const char * /*fileName*/)
    17781783{
    1779   const char prefix[] = "Cbc_C_Interface::Cbc_restoreModel(): ";
    1780 //  const int  VERBOSE = 1;
    1781   if (VERBOSE>0) printf("%s begin\n",prefix);
    1782  
    1783   int result = 0;
     1784    const char prefix[] = "Cbc_C_Interface::Cbc_restoreModel(): ";
     1785//  const int  VERBOSE = 1;
     1786    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1787
     1788    int result = 0;
    17841789// there is a readMPS method in Osi
    17851790//tbd  result = model->model_->restoreModel(fileName);
    1786   if (VERBOSE>0) printf("%s WARNING:  NOT IMPLEMENTED\n",prefix);
    1787 
    1788   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1789   return result;
    1790 }
    1791  
     1791    if (VERBOSE > 0) printf("%s WARNING:  NOT IMPLEMENTED\n", prefix);
     1792
     1793    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1794    return result;
     1795}
     1796
    17921797/** Call this to really test if a valid solution can be feasible
    17931798    Solution is number columns in size.
     
    17951800    Returns objective value (worse than cutoff if not feasible)
    17961801*/
    1797 COINLIBAPI void COINLINKAGE 
     1802COINLIBAPI void COINLINKAGE
    17981803Cbc_checkSolution(Cbc_Model * /*model*/)
    17991804{
    1800   const char prefix[] = "Cbc_C_Interface::Cbc_checkSolution(): ";
    1801 //  const int  VERBOSE = 1;
    1802   if (VERBOSE>0) printf("%s begin\n",prefix);
    1803  
    1804   // see CbcModel::checkSolution(double cutoff, const double * solution,
    1805   //           bool fixVariables);
     1805    const char prefix[] = "Cbc_C_Interface::Cbc_checkSolution(): ";
     1806//  const int  VERBOSE = 1;
     1807    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1808
     1809    // see CbcModel::checkSolution(double cutoff, const double * solution,
     1810    //         bool fixVariables);
    18061811//  model->model_->checkSolution();
    18071812
    1808   if (VERBOSE>0) printf("%s return\n",prefix);
    1809   return;
     1813    if (VERBOSE > 0) printf("%s return\n", prefix);
     1814    return;
    18101815}
    18111816/* Number of rows */
    1812 COINLIBAPI int COINLINKAGE 
     1817COINLIBAPI int COINLINKAGE
    18131818Cbc_getNumRows(Cbc_Model * model)
    18141819{
    1815   const char prefix[] = "Cbc_C_Interface::Cbc_getNumRows(): ";
    1816 //  const int  VERBOSE = 1;
    1817   if (VERBOSE>0) printf("%s begin\n",prefix);
    1818  
    1819   int result = 0;
    1820   result = model->model_->getNumRows();
    1821 
    1822   if (VERBOSE>0) printf("%s return %d\n",prefix, result);
    1823   return result;
     1820    const char prefix[] = "Cbc_C_Interface::Cbc_getNumRows(): ";
     1821//  const int  VERBOSE = 1;
     1822    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1823
     1824    int result = 0;
     1825    result = model->model_->getNumRows();
     1826
     1827    if (VERBOSE > 0) printf("%s return %d\n", prefix, result);
     1828    return result;
    18241829}
    18251830/* Number of columns */
    1826 COINLIBAPI int COINLINKAGE 
     1831COINLIBAPI int COINLINKAGE
    18271832Cbc_getNumCols(Cbc_Model * model)
    18281833{
    1829   const char prefix[] = "Cbc_C_Interface::Cbc_getNumCols(): ";
    1830 //  const int  VERBOSE = 1;
    1831   if (VERBOSE>0) printf("%s begin\n",prefix);
    1832  
    1833   int result = 0;
    1834   result = model->model_->getNumCols();
    1835 
    1836   if (VERBOSE>0) printf("%s return %d\n",prefix, result);
    1837   return result;
     1834    const char prefix[] = "Cbc_C_Interface::Cbc_getNumCols(): ";
     1835//  const int  VERBOSE = 1;
     1836    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1837
     1838    int result = 0;
     1839    result = model->model_->getNumCols();
     1840
     1841    if (VERBOSE > 0) printf("%s return %d\n", prefix, result);
     1842    return result;
    18381843}
    18391844/* Number of iterations */
    1840 COINLIBAPI int COINLINKAGE 
     1845COINLIBAPI int COINLINKAGE
    18411846Cbc_getIterationCount(Cbc_Model * model)
    18421847{
    1843   const char prefix[] = "Cbc_C_Interface::Cbc_getIterationCount(): ";
    1844 //  const int  VERBOSE = 1;
    1845   if (VERBOSE>0) printf("%s begin\n",prefix);
    1846  
    1847   int result = 0;
    1848   result = model->model_->getIterationCount();
    1849 
    1850   if (VERBOSE>0) printf("%s return %d\n",prefix, result);
    1851   return result;
     1848    const char prefix[] = "Cbc_C_Interface::Cbc_getIterationCount(): ";
     1849//  const int  VERBOSE = 1;
     1850    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1851
     1852    int result = 0;
     1853    result = model->model_->getIterationCount();
     1854
     1855    if (VERBOSE > 0) printf("%s return %d\n", prefix, result);
     1856    return result;
    18521857}
    18531858/* Are there a numerical difficulties? */
    1854 COINLIBAPI int COINLINKAGE 
     1859COINLIBAPI int COINLINKAGE
    18551860Cbc_isAbandoned(Cbc_Model * model)
    18561861{
    1857   const char prefix[] = "Cbc_C_Interface::Cbc_isAbandoned(): ";
    1858 //  const int  VERBOSE = 1;
    1859   if (VERBOSE>0) printf("%s begin\n",prefix);
    1860  
    1861   int result = 0;
    1862   result = model->model_->isAbandoned() ? 1 : 0;
    1863 
    1864   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1865   return result;
     1862    const char prefix[] = "Cbc_C_Interface::Cbc_isAbandoned(): ";
     1863//  const int  VERBOSE = 1;
     1864    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1865
     1866    int result = 0;
     1867    result = model->model_->isAbandoned() ? 1 : 0;
     1868
     1869    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1870    return result;
    18661871}
    18671872/* Is optimality proven? */
    1868 COINLIBAPI int COINLINKAGE 
     1873COINLIBAPI int COINLINKAGE
    18691874Cbc_isProvenOptimal(Cbc_Model * model)
    18701875{
    1871   const char prefix[] = "Cbc_C_Interface::Cbc_isProvenOptimal(): ";
    1872 //  const int  VERBOSE = 1;
    1873   if (VERBOSE>0) printf("%s begin\n",prefix);
    1874  
    1875   int result = 0;
    1876   result = model->model_->isProvenOptimal() ? 1 : 0;
    1877 
    1878   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1879   return result;
     1876    const char prefix[] = "Cbc_C_Interface::Cbc_isProvenOptimal(): ";
     1877//  const int  VERBOSE = 1;
     1878    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1879
     1880    int result = 0;
     1881    result = model->model_->isProvenOptimal() ? 1 : 0;
     1882
     1883    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1884    return result;
    18801885}
    18811886/* Is primal infeasiblity proven? */
    1882 COINLIBAPI int COINLINKAGE 
     1887COINLIBAPI int COINLINKAGE
    18831888Cbc_isProvenPrimalInfeasible(Cbc_Model * model)
    18841889{
    1885   const char prefix[] = "Cbc_C_Interface::Cbc_isProvenPrimalInfeasible(): ";
    1886 //  const int  VERBOSE = 1;
    1887   if (VERBOSE>0) printf("%s begin\n",prefix);
    1888  
    1889   int result = 0;
    1890   OsiSolverInterface * solver = model->model_->solver();
    1891   result = solver->isProvenPrimalInfeasible() ? 1 : 0;
    1892 
    1893   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1894   return result;
     1890    const char prefix[] = "Cbc_C_Interface::Cbc_isProvenPrimalInfeasible(): ";
     1891//  const int  VERBOSE = 1;
     1892    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1893
     1894    int result = 0;
     1895    OsiSolverInterface * solver = model->model_->solver();
     1896    result = solver->isProvenPrimalInfeasible() ? 1 : 0;
     1897
     1898    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1899    return result;
    18951900}
    18961901/* Is dual infeasiblity proven? */
    1897 COINLIBAPI int COINLINKAGE 
     1902COINLIBAPI int COINLINKAGE
    18981903Cbc_isProvenDualInfeasible(Cbc_Model * model)
    18991904{
    1900   const char prefix[] = "Cbc_C_Interface::Cbc_isProvenDualInfeasible(): ";
    1901 //  const int  VERBOSE = 1;
    1902   if (VERBOSE>0) printf("%s begin\n",prefix);
    1903  
    1904   int result = 0;
    1905   OsiSolverInterface * solver = model->model_->solver();
    1906   result = solver->isProvenDualInfeasible() ? 1 : 0;
    1907 
    1908   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1909   return result;
     1905    const char prefix[] = "Cbc_C_Interface::Cbc_isProvenDualInfeasible(): ";
     1906//  const int  VERBOSE = 1;
     1907    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1908
     1909    int result = 0;
     1910    OsiSolverInterface * solver = model->model_->solver();
     1911    result = solver->isProvenDualInfeasible() ? 1 : 0;
     1912
     1913    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1914    return result;
    19101915}
    19111916/* Is the given primal objective limit reached? */
    1912 COINLIBAPI int COINLINKAGE 
    1913 Cbc_isPrimalObjectiveLimitReached(Cbc_Model * model) 
    1914 {
    1915   const char prefix[] = "Cbc_C_Interface::Cbc_isPrimalObjectiveLimitReached(): ";
    1916 //  const int  VERBOSE = 1;
    1917   if (VERBOSE>0) printf("%s begin\n",prefix);
    1918  
    1919   int result = 0;
    1920   OsiSolverInterface * solver = model->model_->solver();
    1921   result = solver->isPrimalObjectiveLimitReached() ? 1 : 0;
    1922 
    1923   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1924   return result;
     1917COINLIBAPI int COINLINKAGE
     1918Cbc_isPrimalObjectiveLimitReached(Cbc_Model * model)
     1919{
     1920    const char prefix[] = "Cbc_C_Interface::Cbc_isPrimalObjectiveLimitReached(): ";
     1921//  const int  VERBOSE = 1;
     1922    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1923
     1924    int result = 0;
     1925    OsiSolverInterface * solver = model->model_->solver();
     1926    result = solver->isPrimalObjectiveLimitReached() ? 1 : 0;
     1927
     1928    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1929    return result;
    19251930}
    19261931/* Is the given dual objective limit reached? */
    1927 COINLIBAPI int COINLINKAGE 
    1928 Cbc_isDualObjectiveLimitReached(Cbc_Model * model) 
    1929 {
    1930   const char prefix[] = "Cbc_C_Interface::Cbc_isDualObjectiveLimitReached(): ";
    1931 //  const int  VERBOSE = 1;
    1932   if (VERBOSE>0) printf("%s begin\n",prefix);
    1933  
    1934   int result = 0;
    1935   OsiSolverInterface * solver = model->model_->solver();
    1936   result = solver->isDualObjectiveLimitReached() ? 1 : 0;
    1937 
    1938   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1939   return result;
     1932COINLIBAPI int COINLINKAGE
     1933Cbc_isDualObjectiveLimitReached(Cbc_Model * model)
     1934{
     1935    const char prefix[] = "Cbc_C_Interface::Cbc_isDualObjectiveLimitReached(): ";
     1936//  const int  VERBOSE = 1;
     1937    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1938
     1939    int result = 0;
     1940    OsiSolverInterface * solver = model->model_->solver();
     1941    result = solver->isDualObjectiveLimitReached() ? 1 : 0;
     1942
     1943    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1944    return result;
    19401945}
    19411946/* Iteration limit reached? */
    1942 COINLIBAPI int COINLINKAGE 
     1947COINLIBAPI int COINLINKAGE
    19431948Cbc_isIterationLimitReached(Cbc_Model * model)
    19441949{
    1945   const char prefix[] = "Cbc_C_Interface::Cbc_isIterationLimitReached(): ";
    1946 //  const int  VERBOSE = 1;
    1947   if (VERBOSE>0) printf("%s begin\n",prefix);
    1948  
    1949   int result = 0;
    1950   OsiSolverInterface * solver = model->model_->solver();
    1951   result = solver->isIterationLimitReached() ? 1 : 0;
    1952 
    1953   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    1954   return result;
     1950    const char prefix[] = "Cbc_C_Interface::Cbc_isIterationLimitReached(): ";
     1951//  const int  VERBOSE = 1;
     1952    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1953
     1954    int result = 0;
     1955    OsiSolverInterface * solver = model->model_->solver();
     1956    result = solver->isIterationLimitReached() ? 1 : 0;
     1957
     1958    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     1959    return result;
    19551960}
    19561961/* Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore */
    1957 COINLIBAPI double COINLINKAGE 
     1962COINLIBAPI double COINLINKAGE
    19581963Cbc_getObjSense(Cbc_Model * model)
    19591964{
    1960   const char prefix[] = "Cbc_C_Interface::Cbc_getObjSense(): ";
    1961 //  const int  VERBOSE = 1;
    1962   if (VERBOSE>0) printf("%s begin\n",prefix);
    1963  
    1964   double result = 0;
    1965   result = model->model_->getObjSense();
    1966 
    1967   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    1968   return result;
     1965    const char prefix[] = "Cbc_C_Interface::Cbc_getObjSense(): ";
     1966//  const int  VERBOSE = 1;
     1967    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1968
     1969    double result = 0;
     1970    result = model->model_->getObjSense();
     1971
     1972    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     1973    return result;
    19691974}
    19701975/* Primal row solution */
    1971 COINLIBAPI const double * COINLINKAGE 
     1976COINLIBAPI const double * COINLINKAGE
    19721977Cbc_getRowActivity(Cbc_Model * model)
    19731978{
    1974   const char prefix[] = "Cbc_C_Interface::Cbc_getRowActivity(): ";
    1975 //  const int  VERBOSE = 1;
    1976   if (VERBOSE>0) printf("%s begin\n",prefix);
    1977  
    1978   const double * result = NULL;
    1979   result = model->model_->getRowActivity();
    1980 
    1981   if (VERBOSE>0)
    1982     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    1983   return result;
     1979    const char prefix[] = "Cbc_C_Interface::Cbc_getRowActivity(): ";
     1980//  const int  VERBOSE = 1;
     1981    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1982
     1983    const double * result = NULL;
     1984    result = model->model_->getRowActivity();
     1985
     1986    if (VERBOSE > 0)
     1987        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     1988    return result;
    19841989}
    19851990/* Primal column solution */
    1986 COINLIBAPI const double * COINLINKAGE 
     1991COINLIBAPI const double * COINLINKAGE
    19871992Cbc_getColSolution(Cbc_Model * model)
    19881993{
    1989   const char prefix[] = "Cbc_C_Interface::Cbc_getColSolution(): ";
    1990 //  const int  VERBOSE = 1;
    1991   if (VERBOSE>0) printf("%s begin\n",prefix);
    1992  
    1993   const double * result = NULL;
    1994   result = model->model_->getColSolution();
    1995 
    1996   if (VERBOSE>0)
    1997     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    1998   return result;
    1999 }
    2000 COINLIBAPI void COINLINKAGE 
     1994    const char prefix[] = "Cbc_C_Interface::Cbc_getColSolution(): ";
     1995//  const int  VERBOSE = 1;
     1996    if (VERBOSE > 0) printf("%s begin\n", prefix);
     1997
     1998    const double * result = NULL;
     1999    result = model->model_->getColSolution();
     2000
     2001    if (VERBOSE > 0)
     2002        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     2003    return result;
     2004}
     2005COINLIBAPI void COINLINKAGE
    20012006Cbc_setColSolution(Cbc_Model * model, const double * input)
    20022007{
    2003   const char prefix[] = "Cbc_C_Interface::Cbc_setColSolution(): ";
    2004 //  const int  VERBOSE = 1;
    2005   if (VERBOSE>0) printf("%s begin\n",prefix);
    2006  
    2007   OsiSolverInterface * solver = model->model_->solver();
    2008   solver->setColSolution(input);
    2009 
    2010   if (VERBOSE>0) printf("%s return\n",prefix);
    2011   return;
     2008    const char prefix[] = "Cbc_C_Interface::Cbc_setColSolution(): ";
     2009//  const int  VERBOSE = 1;
     2010    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2011
     2012    OsiSolverInterface * solver = model->model_->solver();
     2013    solver->setColSolution(input);
     2014
     2015    if (VERBOSE > 0) printf("%s return\n", prefix);
     2016    return;
    20122017}
    20132018/* Dual row solution */
    2014 COINLIBAPI const double * COINLINKAGE 
     2019COINLIBAPI const double * COINLINKAGE
    20152020Cbc_getRowPrice(Cbc_Model * model)
    20162021{
    2017   const char prefix[] = "Cbc_C_Interface::Cbc_getRowPrice(): ";
    2018 //  const int  VERBOSE = 1;
    2019   if (VERBOSE>0) printf("%s begin\n",prefix);
    2020  
    2021   const double * result = NULL;
    2022   result = model->model_->getRowPrice();
    2023 
    2024   if (VERBOSE>0)
    2025     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    2026   return result;
     2022    const char prefix[] = "Cbc_C_Interface::Cbc_getRowPrice(): ";
     2023//  const int  VERBOSE = 1;
     2024    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2025
     2026    const double * result = NULL;
     2027    result = model->model_->getRowPrice();
     2028
     2029    if (VERBOSE > 0)
     2030        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     2031    return result;
    20272032}
    20282033/* Reduced costs */
    2029 COINLIBAPI const double * COINLINKAGE 
     2034COINLIBAPI const double * COINLINKAGE
    20302035Cbc_getReducedCost(Cbc_Model * model)
    20312036{
    2032   const char prefix[] = "Cbc_C_Interface::Cbc_getReducedCost(): ";
    2033 //  const int  VERBOSE = 1;
    2034   if (VERBOSE>0) printf("%s begin\n",prefix);
    2035  
    2036   const double * result = NULL;
    2037   result = model->model_->getReducedCost();
    2038 
    2039   if (VERBOSE>0)
    2040     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    2041   return result;
     2037    const char prefix[] = "Cbc_C_Interface::Cbc_getReducedCost(): ";
     2038//  const int  VERBOSE = 1;
     2039    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2040
     2041    const double * result = NULL;
     2042    result = model->model_->getReducedCost();
     2043
     2044    if (VERBOSE > 0)
     2045        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     2046    return result;
    20422047}
    20432048/* Row lower */
    2044 COINLIBAPI const double * COINLINKAGE 
     2049COINLIBAPI const double * COINLINKAGE
    20452050Cbc_getRowLower(Cbc_Model * model)
    20462051{
    2047   const char prefix[] = "Cbc_C_Interface::Cbc_getRowLower(): ";
    2048 //  const int  VERBOSE = 1;
    2049   if (VERBOSE>0) printf("%s begin\n",prefix);
    2050  
    2051   const double * result = NULL;
    2052   result = model->model_->getRowLower();
    2053 
    2054   if (VERBOSE>0)
    2055     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    2056   return result;
     2052    const char prefix[] = "Cbc_C_Interface::Cbc_getRowLower(): ";
     2053//  const int  VERBOSE = 1;
     2054    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2055
     2056    const double * result = NULL;
     2057    result = model->model_->getRowLower();
     2058
     2059    if (VERBOSE > 0)
     2060        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     2061    return result;
    20572062}
    20582063/* Row upper  */
    2059 COINLIBAPI const double * COINLINKAGE 
     2064COINLIBAPI const double * COINLINKAGE
    20602065Cbc_getRowUpper(Cbc_Model * model)
    20612066{
    2062   const char prefix[] = "Cbc_C_Interface::Cbc_getRowUpper(): ";
    2063 //  const int  VERBOSE = 1;
    2064   if (VERBOSE>0) printf("%s begin\n",prefix);
    2065  
    2066   const double * result = NULL;
    2067   result = model->model_->getRowUpper();
    2068 
    2069   if (VERBOSE>0)
    2070     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    2071   return result;
     2067    const char prefix[] = "Cbc_C_Interface::Cbc_getRowUpper(): ";
     2068//  const int  VERBOSE = 1;
     2069    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2070
     2071    const double * result = NULL;
     2072    result = model->model_->getRowUpper();
     2073
     2074    if (VERBOSE > 0)
     2075        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     2076    return result;
    20722077}
    20732078/* Objective Coefficients */
    2074 COINLIBAPI const double * COINLINKAGE 
     2079COINLIBAPI const double * COINLINKAGE
    20752080Cbc_getObjCoefficients(Cbc_Model * model)
    20762081{
    2077   const char prefix[] = "Cbc_C_Interface::Cbc_getObjCoefficients(): ";
    2078 //  const int  VERBOSE = 1;
    2079   if (VERBOSE>0) printf("%s begin\n",prefix);
    2080  
    2081   const double * result = NULL;
    2082   result = model->model_->getObjCoefficients();
    2083 
    2084   if (VERBOSE>0)
    2085     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    2086   return result;
     2082    const char prefix[] = "Cbc_C_Interface::Cbc_getObjCoefficients(): ";
     2083//  const int  VERBOSE = 1;
     2084    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2085
     2086    const double * result = NULL;
     2087    result = model->model_->getObjCoefficients();
     2088
     2089    if (VERBOSE > 0)
     2090        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     2091    return result;
    20872092}
    20882093/* Column Lower */
    2089 COINLIBAPI const double * COINLINKAGE 
     2094COINLIBAPI const double * COINLINKAGE
    20902095Cbc_getColLower(Cbc_Model * model)
    20912096{
    2092   const char prefix[] = "Cbc_C_Interface::Cbc_getColLower(): ";
    2093 //  const int  VERBOSE = 1;
    2094   if (VERBOSE>0) printf("%s begin\n",prefix);
    2095  
    2096   const double * result = NULL;
    2097   result = model->model_->getColLower();
    2098 
    2099   if (VERBOSE>0)
    2100     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    2101   return result;
     2097    const char prefix[] = "Cbc_C_Interface::Cbc_getColLower(): ";
     2098//  const int  VERBOSE = 1;
     2099    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2100
     2101    const double * result = NULL;
     2102    result = model->model_->getColLower();
     2103
     2104    if (VERBOSE > 0)
     2105        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     2106    return result;
    21022107}
    21032108/* Column Upper */
    2104 COINLIBAPI const double * COINLINKAGE 
     2109COINLIBAPI const double * COINLINKAGE
    21052110Cbc_getColUpper(Cbc_Model * model)
    21062111{
    2107   const char prefix[] = "Cbc_C_Interface::Cbc_getColUpper(): ";
    2108 //  const int  VERBOSE = 1;
    2109   if (VERBOSE>0) printf("%s begin\n",prefix);
    2110  
    2111   const double * result = NULL;
    2112   result = model->model_->getColUpper();
    2113 
    2114   if (VERBOSE>0)
    2115     printf("%s return %p\n",prefix, static_cast<const void*>(result));
    2116   return result;
     2112    const char prefix[] = "Cbc_C_Interface::Cbc_getColUpper(): ";
     2113//  const int  VERBOSE = 1;
     2114    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2115
     2116    const double * result = NULL;
     2117    result = model->model_->getColUpper();
     2118
     2119    if (VERBOSE > 0)
     2120        printf("%s return %p\n", prefix, static_cast<const void*>(result));
     2121    return result;
    21172122}
    21182123/* Objective value */
    2119 COINLIBAPI double COINLINKAGE 
     2124COINLIBAPI double COINLINKAGE
    21202125Cbc_getObjValue(Cbc_Model * model)
    21212126{
    2122   const char prefix[] = "Cbc_C_Interface::Cbc_getObjValue(): ";
    2123 //  const int  VERBOSE = 1;
    2124   if (VERBOSE>0) printf("%s begin\n",prefix);
    2125  
    2126   double result = 0;
    2127   result = model->model_->getObjValue();
    2128 
    2129   if (VERBOSE>0)
    2130     printf("%s return %g\n",prefix, result);
    2131   return result;
     2127    const char prefix[] = "Cbc_C_Interface::Cbc_getObjValue(): ";
     2128//  const int  VERBOSE = 1;
     2129    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2130
     2131    double result = 0;
     2132    result = model->model_->getObjValue();
     2133
     2134    if (VERBOSE > 0)
     2135        printf("%s return %g\n", prefix, result);
     2136    return result;
    21322137}
    21332138/* Print model */
    2134 COINLIBAPI void COINLINKAGE 
     2139COINLIBAPI void COINLINKAGE
    21352140Cbc_printModel(Cbc_Model * model, const char * argPrefix)
    21362141{
    2137   const char prefix[] = "Cbc_C_Interface::Cbc_printModel(): ";
    2138   const int  VERBOSE = 4;
    2139   if (VERBOSE>0) printf("%s begin\n",prefix);
    2140  
    2141   CbcModel *cbc_model = model->model_;
    2142   int numrows    = cbc_model->getNumRows();
    2143   int numcols    = cbc_model->getNumCols();
    2144   int numelem    = cbc_model->getNumElements();
    2145   const CoinPackedMatrix * matrix = cbc_model->solver()->getMatrixByCol();
    2146   const CoinBigIndex     * start  = matrix->getVectorStarts();
    2147   const int              * index  = matrix->getIndices();
    2148   const double           * value  = matrix->getElements();
    2149   const double           * collb  = cbc_model->getColLower();
    2150   const double           * colub  = cbc_model->getColUpper();
    2151   const double           * obj    = cbc_model->getObjCoefficients();
    2152   const double           * rowlb  = cbc_model->getRowLower();
    2153   const double           * rowub  = cbc_model->getRowUpper();
    2154 
    2155   printf("%s numcols = %i, numrows = %i, numelem = %i\n",
    2156     argPrefix, numcols, numrows, numelem);
    2157   printf("%s model = %p, start = %p, index = %p, value = %p\n",
    2158     argPrefix, static_cast<void*>(model), static_cast<const void*>(start),
    2159         static_cast<const void*>(index), static_cast<const void*>(value));
    2160   matrix->dumpMatrix(NULL);
    2161   {
    2162     int i;
    2163     for (i=0; i<=numcols; i++)
    2164       printf("%s start[%i] = %i\n", argPrefix, i, start[i]);
    2165     for (i=0; i< numelem; i++)
    2166       printf("%s index[%i] = %i, value[%i] = %g\n",
    2167         argPrefix, i, index[i], i, value[i]);
    2168   }
    2169  
    2170   printf("%s collb = %p, colub = %p, obj = %p, rowlb = %p, rowub = %p\n",
    2171     argPrefix, static_cast<const void*>(collb),
    2172         static_cast<const void*>(colub), static_cast<const void*>(obj),
    2173         static_cast<const void*>(rowlb), static_cast<const void*>(rowub));
    2174   printf("%s optimization direction = %g\n",argPrefix, Cbc_optimizationDirection(model));
    2175   printf("  (1 - minimize, -1 - maximize, 0 - ignore)\n");
    2176   {
    2177     int i;
    2178     for (i=0; i<numcols; i++)
    2179       printf("%s collb[%i] = %g, colub[%i] = %g, obj[%i] = %g\n",
    2180         argPrefix, i, collb[i], i, colub[i], i, obj[i]);
    2181     for (i=0; i< numrows; i++)
    2182       printf("%s rowlb[%i] = %g, rowub[%i] = %g\n",
    2183         argPrefix, i, rowlb[i], i, rowub[i]);
    2184   }
    2185 
    2186   if (VERBOSE>0) printf("%s return\n",prefix);
     2142    const char prefix[] = "Cbc_C_Interface::Cbc_printModel(): ";
     2143    const int  VERBOSE = 4;
     2144    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2145
     2146    CbcModel *cbc_model = model->model_;
     2147    int numrows    = cbc_model->getNumRows();
     2148    int numcols    = cbc_model->getNumCols();
     2149    int numelem    = cbc_model->getNumElements();
     2150    const CoinPackedMatrix * matrix = cbc_model->solver()->getMatrixByCol();
     2151    const CoinBigIndex     * start  = matrix->getVectorStarts();
     2152    const int              * index  = matrix->getIndices();
     2153    const double           * value  = matrix->getElements();
     2154    const double           * collb  = cbc_model->getColLower();
     2155    const double           * colub  = cbc_model->getColUpper();
     2156    const double           * obj    = cbc_model->getObjCoefficients();
     2157    const double           * rowlb  = cbc_model->getRowLower();
     2158    const double           * rowub  = cbc_model->getRowUpper();
     2159
     2160    printf("%s numcols = %i, numrows = %i, numelem = %i\n",
     2161           argPrefix, numcols, numrows, numelem);
     2162    printf("%s model = %p, start = %p, index = %p, value = %p\n",
     2163           argPrefix, static_cast<void*>(model), static_cast<const void*>(start),
     2164          static_cast<const void*>(index), static_cast<const void*>(value));
     2165    matrix->dumpMatrix(NULL);
     2166    {
     2167        int i;
     2168        for (i = 0; i <= numcols; i++)
     2169            printf("%s start[%i] = %i\n", argPrefix, i, start[i]);
     2170        for (i = 0; i < numelem; i++)
     2171            printf("%s index[%i] = %i, value[%i] = %g\n",
     2172                   argPrefix, i, index[i], i, value[i]);
     2173    }
     2174
     2175    printf("%s collb = %p, colub = %p, obj = %p, rowlb = %p, rowub = %p\n",
     2176           argPrefix, static_cast<const void*>(collb),
     2177          static_cast<const void*>(colub), static_cast<const void*>(obj),
     2178          static_cast<const void*>(rowlb), static_cast<const void*>(rowub));
     2179    printf("%s optimization direction = %g\n", argPrefix, Cbc_optimizationDirection(model));
     2180    printf("  (1 - minimize, -1 - maximize, 0 - ignore)\n");
     2181    {
     2182        int i;
     2183        for (i = 0; i < numcols; i++)
     2184            printf("%s collb[%i] = %g, colub[%i] = %g, obj[%i] = %g\n",
     2185                   argPrefix, i, collb[i], i, colub[i], i, obj[i]);
     2186        for (i = 0; i < numrows; i++)
     2187            printf("%s rowlb[%i] = %g, rowub[%i] = %g\n",
     2188                   argPrefix, i, rowlb[i], i, rowub[i]);
     2189    }
     2190
     2191    if (VERBOSE > 0) printf("%s return\n", prefix);
    21872192}  // Cbc_printModel()
    21882193
    2189 COINLIBAPI int COINLINKAGE 
     2194COINLIBAPI int COINLINKAGE
    21902195Cbc_isInteger(Cbc_Model * model, int i)
    21912196{
    2192   const char prefix[] = "Cbc_C_Interface::Cbc_isInteger(): ";
    2193 //  const int  VERBOSE = 1;
    2194   if (VERBOSE>0) printf("%s begin\n",prefix);
    2195  
    2196   bool result = false;
    2197   result = model->model_->isInteger(i);
    2198 
    2199   if (VERBOSE>0) printf("%s return %i\n",prefix, result);
    2200   return (result) ? 1 : 0;
    2201 }
    2202 
    2203 COINLIBAPI double COINLINKAGE 
     2197    const char prefix[] = "Cbc_C_Interface::Cbc_isInteger(): ";
     2198//  const int  VERBOSE = 1;
     2199    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2200
     2201    bool result = false;
     2202    result = model->model_->isInteger(i);
     2203
     2204    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     2205    return (result) ? 1 : 0;
     2206}
     2207
     2208COINLIBAPI double COINLINKAGE
    22042209Cbc_cpuTime(Cbc_Model * /*model*/)
    22052210{
    2206   const char prefix[] = "Cbc_C_Interface::Cbc_cpuTime(): ";
    2207 //  const int  VERBOSE = 1;
    2208   if (VERBOSE>0) printf("%s begin\n",prefix);
    2209  
    2210   double result = 0;
    2211   result = CoinCpuTime() ;
    2212 
    2213   if (VERBOSE>0) printf("%s return %g\n",prefix,result);
    2214   return result;
     2211    const char prefix[] = "Cbc_C_Interface::Cbc_cpuTime(): ";
     2212//  const int  VERBOSE = 1;
     2213    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2214
     2215    double result = 0;
     2216    result = CoinCpuTime() ;
     2217
     2218    if (VERBOSE > 0) printf("%s return %g\n", prefix, result);
     2219    return result;
    22152220}
    22162221/** Number of nodes explored in B&B tree */
    2217 COINLIBAPI int COINLINKAGE 
     2222COINLIBAPI int COINLINKAGE
    22182223Cbc_getNodeCount(Cbc_Model * model)
    22192224{
    2220   const char prefix[] = "Cbc_C_Interface::Cbc_getNodeCount(): ";
    2221 //  const int  VERBOSE = 1;
    2222   if (VERBOSE>0) printf("%s begin\n",prefix);
    2223  
    2224   int result = 0;
    2225   result = model->model_->getNodeCount() ;
    2226 
    2227   if (VERBOSE>0) printf("%s return %i\n",prefix,result);
    2228   return result;
     2225    const char prefix[] = "Cbc_C_Interface::Cbc_getNodeCount(): ";
     2226//  const int  VERBOSE = 1;
     2227    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2228
     2229    int result = 0;
     2230    result = model->model_->getNodeCount() ;
     2231
     2232    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     2233    return result;
    22292234}
    22302235/** Return a copy of this model */
    2231 COINLIBAPI Cbc_Model * COINLINKAGE 
     2236COINLIBAPI Cbc_Model * COINLINKAGE
    22322237Cbc_clone(Cbc_Model * model)
    22332238{
    2234   const char prefix[] = "Cbc_C_Interface::Cbc_clone(): ";
    2235 //  const int  VERBOSE = 1;
    2236   if (VERBOSE>0) printf("%s begin\n",prefix);
    2237  
    2238   Cbc_Model * result = new Cbc_Model;
    2239   result->model_     = new CbcModel(*(model->model_));
    2240   result->solver_    = dynamic_cast< OsiClpSolverInterface*> (result->model_->solver());
    2241   result->handler_   = NULL;
    2242 
    2243   if (VERBOSE>0) printf("%s return\n",prefix);
    2244   return model;
     2239    const char prefix[] = "Cbc_C_Interface::Cbc_clone(): ";
     2240//  const int  VERBOSE = 1;
     2241    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2242
     2243    Cbc_Model * result = new Cbc_Model;
     2244    result->model_     = new CbcModel(*(model->model_));
     2245    result->solver_    = dynamic_cast< OsiClpSolverInterface*> (result->model_->solver());
     2246    result->handler_   = NULL;
     2247
     2248    if (VERBOSE > 0) printf("%s return\n", prefix);
     2249    return model;
    22452250}
    22462251/** Set this the variable to be continuous */
    2247 COINLIBAPI Cbc_Model * COINLINKAGE 
     2252COINLIBAPI Cbc_Model * COINLINKAGE
    22482253Cbc_setContinuous(Cbc_Model * model, int iColumn)
    22492254{
    2250   const char prefix[] = "Cbc_C_Interface::Cbc_setContinuous(): ";
    2251 //  const int  VERBOSE = 1;
    2252   if (VERBOSE>0) printf("%s begin\n",prefix);
    2253  
    2254   model->model_->solver()->setContinuous(iColumn);
    2255 
    2256   if (VERBOSE>0) printf("%s return\n",prefix);
    2257   return model;
     2255    const char prefix[] = "Cbc_C_Interface::Cbc_setContinuous(): ";
     2256//  const int  VERBOSE = 1;
     2257    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2258
     2259    model->model_->solver()->setContinuous(iColumn);
     2260
     2261    if (VERBOSE > 0) printf("%s return\n", prefix);
     2262    return model;
    22582263}
    22592264/* Add an SOS constraint to the model */
    2260 COINLIBAPI void  COINLINKAGE 
     2265COINLIBAPI void  COINLINKAGE
    22612266Cbc_addSOS_Dense(Cbc_Model * model, int numObjects, const int * len,
    2262            const int ** which, const double * weights, const int type)
    2263 {
    2264   const char prefix[] = "Cbc_C_Interface::Cbc_addSOS_Dense(): ";
     2267                 const int ** which, const double * weights, const int type)
     2268{
     2269    const char prefix[] = "Cbc_C_Interface::Cbc_addSOS_Dense(): ";
    22652270//  const int  VERBOSE = 2;
    2266   if (VERBOSE>0) printf("%sbegin\n",prefix);
    2267  
    2268   assert(1>0);// this is probably broken
    2269   int i,j,l;
    2270   const int *w;
    2271   // I think this is a different model due to overriding = operator
    2272   CbcModel m = *(model->model_);
    2273  
    2274   CbcObject ** objects = new CbcObject * [numObjects];
    2275 
    2276   if (VERBOSE>1) printf("%s numObjects = %i\n",prefix,numObjects);
    2277   for (i=0;i<numObjects;i++) {
    2278     if (VERBOSE>1) {
    2279       printf("%s len[%i] = %i, identifier = %i, type = %i\n",
    2280         prefix,i,len[i], i, type);
    2281       fflush(stdout);
    2282       for (j=0;j<len[i];j++) {
    2283         if (VERBOSE>2 || j==0 || j==(len[i]-1)) {
    2284           printf("%s which[%i][%i] = %d, weights[%i] = %g\n",
    2285             prefix, i,j, which[i][j], j, weights[j]);
    2286           fflush(stdout);
     2271    if (VERBOSE > 0) printf("%sbegin\n", prefix);
     2272
     2273    assert(1 > 0);// this is probably broken
     2274    int i, j, l;
     2275    const int *w;
     2276    // I think this is a different model due to overriding = operator
     2277    CbcModel m = *(model->model_);
     2278
     2279    CbcObject ** objects = new CbcObject * [numObjects];
     2280
     2281    if (VERBOSE > 1) printf("%s numObjects = %i\n", prefix, numObjects);
     2282    for (i = 0; i < numObjects; i++) {
     2283        if (VERBOSE > 1) {
     2284            printf("%s len[%i] = %i, identifier = %i, type = %i\n",
     2285                   prefix, i, len[i], i, type);
     2286            fflush(stdout);
     2287            for (j = 0; j < len[i]; j++) {
     2288                if (VERBOSE > 2 || j == 0 || j == (len[i] - 1)) {
     2289                    printf("%s which[%i][%i] = %d, weights[%i] = %g\n",
     2290                           prefix, i, j, which[i][j], j, weights[j]);
     2291                    fflush(stdout);
     2292                }
     2293            }
    22872294        }
    2288       }
     2295
     2296        // Make a CbcSOS and assign it to objects
     2297        if (VERBOSE > 1) printf("%s len[%i] = %i\n", prefix, i, len[i]);
     2298        l = len[i];
     2299        w = which[i];
     2300        if (VERBOSE > 1) printf("%s new CbcSOS()\n", prefix);
     2301        // ***
     2302        objects[i] = new CbcSOS(model->model_, (int)(len[i]),
     2303                                (const int*)which[i], (const double*)weights, (int)i, (int)type);
     2304        // ***
     2305        if (objects[i] == NULL) {
     2306            printf("%s ERROR: objects[%i] == NULL\n", prefix, i);
     2307            fflush(stdout);
     2308            assert(objects[i] != NULL);
     2309        }
    22892310    }
    2290    
    2291     // Make a CbcSOS and assign it to objects
    2292     if (VERBOSE>1) printf("%s len[%i] = %i\n",prefix, i, len[i]);
    2293     l = len[i];
    2294     w = which[i];
    2295     if (VERBOSE>1) printf("%s new CbcSOS()\n",prefix);
    2296     // ***
    2297     objects[i] = new CbcSOS(model->model_, (int)(len[i]),
    2298       (const int*)which[i], (const double*)weights, (int)i, (int)type);
    2299     // ***
    2300     if (objects[i] == NULL) {
    2301       printf("%s ERROR: objects[%i] == NULL\n",prefix,i); fflush(stdout);
    2302       assert(objects[i] != NULL);
     2311    if (VERBOSE > 1) printf("%s calling addObjects()\n", prefix);
     2312    fflush(stdout);
     2313    model->model_->addObjects(numObjects, objects);
     2314    if (VERBOSE > 1) printf("%s finished addObjects()\n", prefix);
     2315
     2316    for (i = 0; i < numObjects; i++) delete objects[i];
     2317    delete [] objects;
     2318
     2319    if (VERBOSE > 0) printf("%sreturn\n", prefix);
     2320    return;
     2321}
     2322/** Add SOS constraints to the model using row-order matrix */
     2323COINLIBAPI void  COINLINKAGE
     2324Cbc_addSOS_Sparse(Cbc_Model * model, const int * rowStarts,
     2325                  const int * rowIndices, const double * weights, const int type)
     2326{
     2327    const char prefix[] = "Cbc_C_Interface::Cbc_addSOS_Sparse(): ";
     2328//  const int  VERBOSE = 1;
     2329    if (VERBOSE > 0) printf("%sbegin\n", prefix);
     2330
     2331    int numRows = Cbc_numberRows(model);
     2332    if (VERBOSE > 0) printf("%s numRows = %i\n", prefix, numRows);
     2333
     2334    // The passed sparse matrix must have the same number of rows as the model
     2335    assert(numRows == Cbc_numberRows(model));
     2336
     2337    int row, i;
     2338    const int *colIndex;
     2339    const double *colWeight;
     2340
     2341    // loop on rows and count number of objects according to numWeights>0
     2342    int numObjects = 0;
     2343    for (row = 0; row < numRows; row++) {
     2344        if (VERBOSE > 2) {
     2345            printf("%s row = %i\n", prefix, row);
     2346            printf("%s rowStarts[%i] = %i\n", prefix, row, rowStarts[row]);
     2347            printf("%s rowStarts[%i+1] = %i\n", prefix, row, rowStarts[row+1]);
     2348            fflush(stdout);
     2349        }
     2350        const int numWeights = rowStarts[row+1] - rowStarts[row];
     2351        if (VERBOSE > 2) printf("%s  numWeights = %i\n", prefix, numWeights);
     2352        if (numWeights > 0) numObjects++;
    23032353    }
    2304   }
    2305   if (VERBOSE>1) printf("%s calling addObjects()\n",prefix);
    2306   fflush(stdout);
    2307   model->model_->addObjects(numObjects, objects);
    2308   if (VERBOSE>1) printf("%s finished addObjects()\n",prefix);
    2309  
    2310   for (i=0;i<numObjects;i++) delete objects[i];
    2311   delete [] objects;
    2312 
    2313   if (VERBOSE>0) printf("%sreturn\n",prefix);
    2314   return;
    2315 }
    2316 /** Add SOS constraints to the model using row-order matrix */
    2317 COINLIBAPI void  COINLINKAGE
    2318 Cbc_addSOS_Sparse(Cbc_Model * model, const int * rowStarts,
    2319            const int * rowIndices, const double * weights, const int type)
    2320 {
    2321   const char prefix[] = "Cbc_C_Interface::Cbc_addSOS_Sparse(): ";
    2322 //  const int  VERBOSE = 1;
    2323   if (VERBOSE>0) printf("%sbegin\n",prefix);
    2324  
    2325   int numRows = Cbc_numberRows(model);
    2326   if (VERBOSE>0) printf("%s numRows = %i\n",prefix,numRows);
    2327  
    2328   // The passed sparse matrix must have the same number of rows as the model
    2329   assert(numRows==Cbc_numberRows(model));
    2330  
    2331   int row, i;
    2332   const int *colIndex;
    2333   const double *colWeight;
    2334  
    2335   // loop on rows and count number of objects according to numWeights>0
    2336   int numObjects = 0;
    2337   for (row=0; row<numRows; row++) {
    2338     if (VERBOSE>2) {
    2339       printf("%s row = %i\n",prefix,row);
    2340       printf("%s rowStarts[%i] = %i\n",prefix,row,rowStarts[row]);
    2341       printf("%s rowStarts[%i+1] = %i\n",prefix,row,rowStarts[row+1]);
    2342       fflush(stdout);
     2354
     2355    // make objects
     2356    CbcObject ** objects = new CbcObject * [numObjects];
     2357//  if (VERBOSE>1) printf("%s numObjects = %i, objects = %X\n",prefix,numObjects,objects);
     2358
     2359    // loop on rows and make an object when numWeights>0
     2360    int objNum = 0;
     2361    for (row = 0; row < numRows; row++) {
     2362        if (VERBOSE > 2) {
     2363            printf("%s row = %i\n", prefix, row);
     2364            printf("%s rowStarts[%i] = %i\n", prefix, row, rowStarts[row]);
     2365            printf("%s rowStarts[%i+1] = %i\n", prefix, row, rowStarts[row+1]);
     2366        }
     2367        const int numWeights = rowStarts[row+1] - rowStarts[row];
     2368        if (VERBOSE > 2) printf("%s  numWeights = %i\n", prefix, numWeights);
     2369        colIndex    = rowIndices + rowStarts[row];
     2370        colWeight   = weights + rowStarts[row];
     2371        if (numWeights > 0) {
     2372            // Make a CbcSOS and assign it to objects
     2373            if (VERBOSE > 3) {
     2374                for (i = 0; i < numWeights; i++) {
     2375                    printf("%s  colIndex [%i] = %i\n", prefix, i, colIndex[i]);
     2376                    printf("%s  colWeight[%i] = %f\n", prefix, i, colWeight[i]);
     2377                }
     2378                fflush(stdout);
     2379            }
     2380            objects[objNum] = new CbcSOS(model->model_, (int)(numWeights),
     2381                                         (const int*)colIndex, (const double*)colWeight, (int)objNum, (int)type);
     2382//      if (VERBOSE>2) printf("%s objects[%i] = %X\n",prefix,objNum,objects[objNum]);
     2383            if (objects[objNum] == NULL) {
     2384                printf("%s ERROR: objects[%i] == NULL\n", prefix, objNum);
     2385                fflush(stdout);
     2386                assert(objects[objNum] != NULL);
     2387            }
     2388            objNum++;
     2389        }
    23432390    }
    2344     const int numWeights = rowStarts[row+1]-rowStarts[row];
    2345     if (VERBOSE>2) printf("%s  numWeights = %i\n",prefix,numWeights);
    2346     if (numWeights>0) numObjects++;   
    2347   }
    2348  
    2349   // make objects
    2350   CbcObject ** objects = new CbcObject * [numObjects];
    2351 //  if (VERBOSE>1) printf("%s numObjects = %i, objects = %X\n",prefix,numObjects,objects);
    2352 
    2353   // loop on rows and make an object when numWeights>0
    2354   int objNum = 0;
    2355   for (row=0; row<numRows; row++) {
    2356     if (VERBOSE>2) {
    2357       printf("%s row = %i\n",prefix,row);
    2358       printf("%s rowStarts[%i] = %i\n",prefix,row,rowStarts[row]);
    2359       printf("%s rowStarts[%i+1] = %i\n",prefix,row,rowStarts[row+1]);
     2391    if (VERBOSE > 2) {
     2392        printf("%s calling addObjects()\n", prefix);
     2393        /*
     2394            printf("%s numObjects = %i, objects = %X\n",prefix,numObjects,objects);
     2395            for (row=0; row<numObjects; row++)
     2396              printf("%s  objects[%i] = %X\n",prefix,row,objects[row]);
     2397        */
    23602398    }
    2361     const int numWeights = rowStarts[row+1]-rowStarts[row];
    2362     if (VERBOSE>2) printf("%s  numWeights = %i\n",prefix,numWeights);
    2363     colIndex    = rowIndices+rowStarts[row];
    2364     colWeight   = weights+rowStarts[row];
    2365     if (numWeights>0) {
    2366       // Make a CbcSOS and assign it to objects
    2367       if (VERBOSE>3) {
    2368         for (i=0;i<numWeights;i++) {
    2369           printf("%s  colIndex [%i] = %i\n",prefix,i,colIndex[i]);
    2370           printf("%s  colWeight[%i] = %f\n",prefix,i,colWeight[i]);
     2399    fflush(stdout);
     2400    model->model_->addObjects(numObjects, objects);
     2401    if (VERBOSE > 1) printf("%s finished addObjects()\n", prefix);
     2402
     2403    for (objNum = 0; objNum < numObjects; objNum++) delete objects[objNum];
     2404    delete [] objects;
     2405
     2406    if (VERBOSE > 0) printf("%sreturn\n", prefix);
     2407    return;
     2408}
     2409
     2410/** Delete all object information */
     2411COINLIBAPI void  COINLINKAGE
     2412Cbc_deleteObjects(Cbc_Model * model)
     2413{
     2414    const char prefix[] = "Cbc_C_Interface::Cbc_deleteObjects(): ";
     2415//  const int  VERBOSE = 2;
     2416    if (VERBOSE > 0) printf("%s begin\n", prefix);
     2417
     2418    model->model_->deleteObjects();
     2419
     2420    if (VERBOSE > 0) printf("%s return\n", prefix);
     2421    return;
     2422}
     2423
     2424/** Print the solution */
     2425COINLIBAPI void  COINLINKAGE
     2426Cbc_printSolution(Cbc_Model * model)
     2427{
     2428    {
     2429        //
     2430        //  Now to print out row solution.  The methods used return const
     2431        //  pointers - which is of course much more virtuous.
     2432        //
     2433        //  This version just does non-zero columns
     2434        //
     2435
     2436        // * Rows
     2437
     2438        int numberRows = Cbc_getNumRows(model);
     2439        int iRow;
     2440
     2441
     2442        const double * rowPrimal = Cbc_getRowActivity(model);
     2443        // * Alternatively getReducedCost(model)
     2444        const double * rowDual = Cbc_getRowPrice(model);
     2445        // * Alternatively getColLower(model)
     2446        const double * rowLower = Cbc_getRowLower(model);
     2447        // * Alternatively getColUpper(model)
     2448        const double * rowUpper = Cbc_getRowUpper(model);
     2449        printf("--------------------------------------\n");
     2450
     2451        // * If we have not kept names (parameter to readMps) this will be 0
     2452        //    assert(Cbc_lengthNames(model));
     2453
     2454        printf("                       Primal          Dual         Lower         Upper\n");
     2455        for (iRow = 0; iRow < numberRows; iRow++) {
     2456            double value;
     2457            value = rowPrimal[iRow];
     2458            if (value > 1.0e-8 || value < -1.0e-8) {
     2459                char name[20];
     2460                //              Cbc_columnName(model,iColumn,name);
     2461                sprintf(name, "ROW%5i", iRow);
     2462                printf("%6d %8s", iRow, name);
     2463                printf(" %13g", rowPrimal[iRow]);
     2464                printf(" %13g", rowDual[iRow]);
     2465                printf(" %13g", rowLower[iRow]);
     2466                printf(" %13g", rowUpper[iRow]);
     2467                printf("\n");
     2468            }
    23712469        }
    2372         fflush(stdout);
    2373       }
    2374       objects[objNum] = new CbcSOS(model->model_, (int)(numWeights),
    2375         (const int*)colIndex, (const double*)colWeight, (int)objNum, (int)type);
    2376 //      if (VERBOSE>2) printf("%s objects[%i] = %X\n",prefix,objNum,objects[objNum]);
    2377       if (objects[objNum] == NULL) {
    2378         printf("%s ERROR: objects[%i] == NULL\n",prefix,objNum); fflush(stdout);
    2379         assert(objects[objNum] != NULL);
    2380       }
    2381       objNum++;
    2382     }
    2383   }
    2384   if (VERBOSE>2) {
    2385     printf("%s calling addObjects()\n",prefix);
    2386 /*
    2387     printf("%s numObjects = %i, objects = %X\n",prefix,numObjects,objects);
    2388     for (row=0; row<numObjects; row++)
    2389       printf("%s  objects[%i] = %X\n",prefix,row,objects[row]);   
    2390 */   
    2391   }
    2392   fflush(stdout);
    2393   model->model_->addObjects(numObjects, objects);
    2394   if (VERBOSE>1) printf("%s finished addObjects()\n",prefix);
    2395  
    2396   for (objNum=0;objNum<numObjects;objNum++) delete objects[objNum];
    2397   delete [] objects;
    2398 
    2399   if (VERBOSE>0) printf("%sreturn\n",prefix);
    2400   return;
    2401 }
    2402 
    2403 /** Delete all object information */
    2404 COINLIBAPI void  COINLINKAGE
    2405 Cbc_deleteObjects(Cbc_Model * model)
    2406 {
    2407   const char prefix[] = "Cbc_C_Interface::Cbc_deleteObjects(): ";
    2408 //  const int  VERBOSE = 2;
    2409   if (VERBOSE>0) printf("%s begin\n",prefix);
    2410 
    2411   model->model_->deleteObjects();
    2412 
    2413   if (VERBOSE>0) printf("%s return\n",prefix);
    2414   return;
    2415 }
    2416 
    2417 /** Print the solution */
    2418 COINLIBAPI void  COINLINKAGE
    2419 Cbc_printSolution(Cbc_Model * model)
    2420 {
    2421   {
    2422     //
    2423     //  Now to print out row solution.  The methods used return const
    2424     //  pointers - which is of course much more virtuous.
    2425     // 
    2426     //  This version just does non-zero columns
    2427     //
    2428    
    2429     // * Rows
    2430    
    2431     int numberRows = Cbc_getNumRows(model);
    2432     int iRow;
    2433    
    2434    
    2435     const double * rowPrimal = Cbc_getRowActivity(model);
    2436     // * Alternatively getReducedCost(model)
    2437     const double * rowDual = Cbc_getRowPrice(model);
    2438     // * Alternatively getColLower(model)
    2439     const double * rowLower = Cbc_getRowLower(model);
    2440     // * Alternatively getColUpper(model)
    2441     const double * rowUpper = Cbc_getRowUpper(model);
    2442     printf("--------------------------------------\n");
    2443 
    2444     // * If we have not kept names (parameter to readMps) this will be 0
    2445   //    assert(Cbc_lengthNames(model));
    2446    
    2447     printf("                       Primal          Dual         Lower         Upper\n");
    2448     for (iRow=0;iRow<numberRows;iRow++) {
    2449       double value;
    2450       value = rowPrimal[iRow];
    2451       if (value>1.0e-8||value<-1.0e-8) {
    2452         char name[20];
    2453   //            Cbc_columnName(model,iColumn,name);
    2454         sprintf(name,"ROW%5i",iRow);
    2455         printf("%6d %8s",iRow,name);
    2456         printf(" %13g",rowPrimal[iRow]);
    2457         printf(" %13g",rowDual[iRow]);
    2458         printf(" %13g",rowLower[iRow]);
    2459         printf(" %13g",rowUpper[iRow]);
    2460         printf("\n");
    2461       }
     2470        printf("--------------------------------------\n");
    24622471    }
    2463     printf("--------------------------------------\n");
    2464   }
    2465   {
    2466     //
    2467     //  Now to print out column solution.  The methods used return const
    2468     //  pointers - which is of course much more virtuous.
    2469     // 
    2470     //  This version just does non-zero columns
    2471     //
    2472     //
    2473    
    2474     // * Columns
    2475    
    2476     int numberColumns = Cbc_numberColumns(model);
    2477     int iColumn;
    2478    
    2479    
    2480     // * Alternatively getColSolution(model)
    2481     const double * columnPrimal = Cbc_getColSolution(model);
    2482     // * Alternatively getReducedCost(model)
    2483     const double * columnDual = Cbc_getReducedCost(model);
    2484     // * Alternatively getColLower(model)
    2485     const double * columnLower = Cbc_getColLower(model);
    2486     // * Alternatively getColUpper(model)
    2487     const double * columnUpper = Cbc_getColUpper(model);
    2488     // * Alternatively getObjCoefficients(model)
    2489     const double * columnObjective = Cbc_getObjCoefficients(model);
    2490 
    2491     const char * isInteger = Cbc_integerInformation(model);
    2492 
    2493     printf("--------------------------------------\n");
    2494 
    2495     // * If we have not kept names (parameter to readMps) this will be 0
     2472    {
     2473        //
     2474        //  Now to print out column solution.  The methods used return const
     2475        //  pointers - which is of course much more virtuous.
     2476        //
     2477        //  This version just does non-zero columns
     2478        //
     2479        //
     2480
     2481        // * Columns
     2482
     2483        int numberColumns = Cbc_numberColumns(model);
     2484        int iColumn;
     2485
     2486
     2487        // * Alternatively getColSolution(model)
     2488        const double * columnPrimal = Cbc_getColSolution(model);
     2489        // * Alternatively getReducedCost(model)
     2490        const double * columnDual = Cbc_getReducedCost(model);
     2491        // * Alternatively getColLower(model)
     2492        const double * columnLower = Cbc_getColLower(model);
     2493        // * Alternatively getColUpper(model)
     2494        const double * columnUpper = Cbc_getColUpper(model);
     2495        // * Alternatively getObjCoefficients(model)
     2496        const double * columnObjective = Cbc_getObjCoefficients(model);
     2497
     2498        const char * isInteger = Cbc_integerInformation(model);
     2499
     2500        printf("--------------------------------------\n");
     2501
     2502        // * If we have not kept names (parameter to readMps) this will be 0
    24962503//    assert(Cbc_lengthNames(model));
    2497    
    2498     printf("                       Primal          Dual         Lower         Upper          Cost     isInteger\n");
    2499     for (iColumn=0;iColumn<numberColumns;iColumn++) {
    2500       double value;
    2501       value = columnPrimal[iColumn];
    2502       if (value>1.0e-8||value<-1.0e-8) {
    2503         char name[20];
     2504
     2505        printf("                       Primal          Dual         Lower         Upper          Cost     isInteger\n");
     2506        for (iColumn = 0; iColumn < numberColumns; iColumn++) {
     2507            double value;
     2508            value = columnPrimal[iColumn];
     2509            if (value > 1.0e-8 || value < -1.0e-8) {
     2510                char name[20];
    25042511//              Cbc_columnName(model,iColumn,name);
    2505         sprintf(name,"COL%5i",iColumn);
    2506         printf("%6d %8s",iColumn,name);
    2507         printf(" %13g",columnPrimal[iColumn]);
    2508         printf(" %13g",columnDual[iColumn]);
    2509         printf(" %13g",columnLower[iColumn]);
    2510         printf(" %13g",columnUpper[iColumn]);
    2511         printf(" %13g",columnObjective[iColumn]);
    2512         printf(" %13i",isInteger[iColumn]);
    2513         printf("\n");
    2514       }
     2512                sprintf(name, "COL%5i", iColumn);
     2513                printf("%6d %8s", iColumn, name);
     2514                printf(" %13g", columnPrimal[iColumn]);
     2515                printf(" %13g", columnDual[iColumn]);
     2516                printf(" %13g", columnLower[iColumn]);
     2517                printf(" %13g", columnUpper[iColumn]);
     2518                printf(" %13g", columnObjective[iColumn]);
     2519                printf(" %13i", isInteger[iColumn]);
     2520                printf("\n");
     2521            }
     2522        }
     2523        printf("--------------------------------------\n");
    25152524    }
    2516     printf("--------------------------------------\n");
    2517   }
    2518   if (0) Cbc_printModel(model, "cbc::main(): ");
    2519   return;
    2520 }
    2521   /** Dual initial solve */
    2522   COINLIBAPI int COINLINKAGE
    2523   Cbc_initialDualSolve(Cbc_Model * /*model*/)
    2524   {
     2525    if (0) Cbc_printModel(model, "cbc::main(): ");
     2526    return;
     2527}
     2528/** Dual initial solve */
     2529COINLIBAPI int COINLINKAGE
     2530Cbc_initialDualSolve(Cbc_Model * /*model*/)
     2531{
    25252532    return 0;
    2526   }
    2527   /** Primal initial solve */
    2528   COINLIBAPI int COINLINKAGE
    2529   Cbc_initialPrimalSolve(Cbc_Model * /*model*/)
    2530   {
     2533}
     2534/** Primal initial solve */
     2535COINLIBAPI int COINLINKAGE
     2536Cbc_initialPrimalSolve(Cbc_Model * /*model*/)
     2537{
    25312538    return 0;
    2532   }
    2533   /** Dual algorithm - see ClpSimplexDual.hpp for method */
    2534   COINLIBAPI int COINLINKAGE
    2535   Cbc_dual(Cbc_Model * /*model*/, int /*ifValuesPass*/)
    2536   {
     2539}
     2540/** Dual algorithm - see ClpSimplexDual.hpp for method */
     2541COINLIBAPI int COINLINKAGE
     2542Cbc_dual(Cbc_Model * /*model*/, int /*ifValuesPass*/)
     2543{
    25372544    return 0;
    2538   }
    2539   /** Primal algorithm - see ClpSimplexPrimal.hpp for method */
    2540   COINLIBAPI int COINLINKAGE
    2541   Cbc_primal(Cbc_Model * /*model*/, int /*ifValuesPass*/)
    2542   {
     2545}
     2546/** Primal algorithm - see ClpSimplexPrimal.hpp for method */
     2547COINLIBAPI int COINLINKAGE
     2548Cbc_primal(Cbc_Model * /*model*/, int /*ifValuesPass*/)
     2549{
    25432550    return 0;
    2544   }
    2545 #if defined(__MWERKS__) 
     2551}
     2552#if defined(__MWERKS__)
    25462553#pragma export off
    25472554#endif
Note: See TracChangeset for help on using the changeset viewer.