Changeset 2427


Ignore:
Timestamp:
Nov 18, 2018 5:16:07 PM (8 months ago)
Author:
unxusr
Message:

complete addCol

Location:
trunk/Cbc/src
Files:
2 edited

Legend:

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

    r2425 r2427  
    787787/** Adds a new column */
    788788COINLIBAPI void COINLINKAGE
    789 Cbc_addCol( Cbc_Model *model, const char *name, double lb, double ub, double obj, char isInteger)
     789Cbc_addCol( Cbc_Model *model, const char *name, double lb,
     790            double ub, double obj, char isInteger,
     791            int nz, int *rows, double *coefs )
    790792{
    791793    OsiSolverInterface * solver = model->model_->solver();
    792794
    793     /* to be used as dummy pointers */
    794     int rows; double coefs;
    795 
    796     solver->addCol( 0, &rows, &coefs, lb, ub, obj, std::string(name) );
     795    solver->addCol( nz, rows, coefs, lb, ub, obj, std::string(name) );
    797796    if (isInteger)
    798797        solver->setInteger(solver->getNumCols()-1 );
  • trunk/Cbc/src/Cbc_C_Interface.h

    r2425 r2427  
    216216    COINLIBAPI void COINLINKAGE
    217217    Cbc_addCol( Cbc_Model *model, const char *name, double lb,
    218             double ub, double obj, char isInteger)
     218            double ub, double obj, char isInteger,
     219            int nz, int *rows, double *coefs )
    219220    ;
    220221    /** Adds a new row */
Note: See TracChangeset for help on using the changeset viewer.