Changeset 2036 for trunk/Cbc/src


Ignore:
Timestamp:
May 25, 2014 9:07:36 PM (5 years ago)
Author:
mlubin
Message:

Disable non-working SOS constraints
Add non-working attempt at problem modification

Location:
trunk/Cbc/src
Files:
2 edited

Legend:

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

    r2033 r2036  
    3232{ \
    3333    return m->model_->prop(); \
     34}
     35
     36#define CbcSetSolverProperty(T,prop) \
     37COINLIBAPI void COINLINKAGE \
     38Cbc_ ## prop (Cbc_Model *m, int index, T val) \
     39{ \
     40    m->model_->solver()->prop(index,val); \
    3441}
    3542
     
    700707
    701708CbcGetProperty(const double*, getRowLower)
     709CbcSetSolverProperty(double, setRowLower)
    702710CbcGetProperty(const double*, getRowUpper)
     711CbcSetSolverProperty(double, setRowUpper)
    703712CbcGetProperty(const double*, getObjCoefficients)
     713CbcSetSolverProperty(double, setObjCoeff)
    704714CbcGetProperty(const double*, getColLower)
     715CbcSetSolverProperty(double, setColLower)
    705716CbcGetProperty(const double*, getColUpper)
     717CbcSetSolverProperty(double, setColUpper)
    706718
    707719CbcGetProperty(double, getObjValue)
     
    824836}
    825837/** Add SOS constraints to the model using row-order matrix */
     838/*
    826839COINLIBAPI void  COINLINKAGE
    827840Cbc_addSOS(Cbc_Model * model, int numRows, const int * rowStarts,
     
    890903    if (VERBOSE > 2) {
    891904        printf("%s calling addObjects()\n", prefix);
    892         /*
    893             printf("%s numObjects = %i, objects = %X\n",prefix,numObjects,objects);
    894             for (row=0; row<numObjects; row++)
    895               printf("%s  objects[%i] = %X\n",prefix,row,objects[row]);
    896         */
     905       
     906        //    printf("%s numObjects = %i, objects = %X\n",prefix,numObjects,objects);
     907        //    for (row=0; row<numObjects; row++)
     908        //      printf("%s  objects[%i] = %X\n",prefix,row,objects[row]);
     909       
    897910    }
    898911    fflush(stdout);
     
    905918    if (VERBOSE > 0) printf("%sreturn\n", prefix);
    906919    return;
    907 }
     920}*/
    908921
    909922/** Print the solution */
  • trunk/Cbc/src/Cbc_C_Interface.h

    r2033 r2036  
    173173    Cbc_getRowLower(Cbc_Model * model)
    174174    ;
     175    /** Set the lower bound of a single constraint */
     176    COINLIBAPI void COINLINKAGE
     177    Cbc_setRowLower(Cbc_Model * model, int index, double value)
     178    ;
    175179    /** Constraint upper bounds */
    176180    COINLIBAPI const double* COINLINKAGE
    177181    Cbc_getRowUpper(Cbc_Model * model)
    178182    ;
     183    /** Set the upper bound of a single constraint */
     184    COINLIBAPI void COINLINKAGE
     185    Cbc_setRowUpper(Cbc_Model * model, int index, double value)
     186    ;
    179187    /** Objective vector */
    180188    COINLIBAPI const double * COINLINKAGE
    181189    Cbc_getObjCoefficients(Cbc_Model * model)
    182190    ;
     191    /** Set the objective coefficient of a single variable */
     192    COINLIBAPI void COINLINKAGE
     193    Cbc_setObjCoeff(Cbc_Model * model, int index, double value)
     194    ;
    183195    /** Variable lower bounds */
    184196    COINLIBAPI const double * COINLINKAGE
    185197    Cbc_getColLower(Cbc_Model * model)
    186198    ;
     199    /** Set the lower bound of a single variable */
     200    COINLIBAPI void COINLINKAGE
     201    Cbc_setColLower(Cbc_Model * model, int index, double value)
     202    ;
    187203    /** Variable upper bounds */
    188204    COINLIBAPI const double * COINLINKAGE
    189205    Cbc_getColUpper(Cbc_Model * model)
     206    ;
     207    /** Set the upper bound of a single variable */
     208    COINLIBAPI void COINLINKAGE
     209    Cbc_setColUpper(Cbc_Model * model, int index, double value)
    190210    ;
    191211    /** Determine whether the ith variable is integer restricted */
     
    201221    Cbc_setInteger(Cbc_Model * model, int iColumn)
    202222    ;
    203     /** Add SOS constraints to the model using row-order matrix */
    204     COINLIBAPI void  COINLINKAGE
     223    /* Add SOS constraints to the model using row-order matrix
     224     * Unable to confirm that this function is working. */
     225    /*COINLIBAPI void  COINLINKAGE
    205226    Cbc_addSOS(Cbc_Model * model, int numRows, const int * rowStarts,
    206227               const int * colIndices, const double * weights, const int type)
    207     ;
     228    ;*/
    208229    /** Print the model */
    209230    COINLIBAPI void COINLINKAGE
Note: See TracChangeset for help on using the changeset viewer.