Changeset 2363


Ignore:
Timestamp:
Feb 14, 2018 6:21:56 AM (7 months ago)
Author:
forrest
Message:

add readLp to C interface

Location:
trunk/Cbc/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/Cbc_C_Interface.cpp

    r2039 r2363  
    355355    if (VERBOSE > 0) printf("%s return\n", prefix);
    356356    return;
     357}
     358/* Read an lp file from the given filename */
     359COINLIBAPI int COINLINKAGE
     360Cbc_readLp(Cbc_Model * model, const char *filename)
     361{
     362    const char prefix[] = "Cbc_C_Interface::Cbc_readLp(): ";
     363//  const int  VERBOSE = 2;
     364    if (VERBOSE > 0) printf("%s begin\n", prefix);
     365    if (VERBOSE > 1) printf("%s filename = '%s'\n", prefix, filename);
     366    int result = 1;
     367    result = model->model_->solver()->readLp(filename);
     368    assert(result == 0);
     369
     370    if (VERBOSE > 0) printf("%s return %i\n", prefix, result);
     371    return result;
    357372}
    358373
  • trunk/Cbc/src/Cbc_C_Interface.h

    r2091 r2363  
    8585    COINLIBAPI void COINLINKAGE
    8686    Cbc_writeMps(Cbc_Model * model, const char *filename)
     87    ;
     88    /** Read an lp file from the given filename */
     89    COINLIBAPI int COINLINKAGE
     90    Cbc_readLp(Cbc_Model * model, const char *filename)
    8791    ;
    8892    /** Provide an initial feasible solution to accelerate branch-and-bound
Note: See TracChangeset for help on using the changeset viewer.