Changeset 2039


Ignore:
Timestamp:
Jun 19, 2014 10:34:45 PM (5 years ago)
Author:
mlubin
Message:

reenable SOS code

Location:
trunk/Cbc
Files:
3 edited

Legend:

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

    r2038 r2039  
    769769}
    770770/** Add SOS constraints to the model using row-order matrix */
    771 /*
     771
    772772COINLIBAPI void  COINLINKAGE
    773773Cbc_addSOS(Cbc_Model * model, int numRows, const int * rowStarts,
     
    851851    if (VERBOSE > 0) printf("%sreturn\n", prefix);
    852852    return;
    853 }*/
     853}
    854854
    855855/** Print the solution */
  • trunk/Cbc/src/Cbc_C_Interface.h

    r2038 r2039  
    207207    Cbc_setInteger(Cbc_Model * model, int iColumn)
    208208    ;
    209     /* Add SOS constraints to the model using row-order matrix
     209    /** Add SOS constraints to the model using row-order matrix
    210210     * Unable to confirm that this function is working. */
    211     /*COINLIBAPI void  COINLINKAGE
     211    COINLIBAPI void  COINLINKAGE
    212212    Cbc_addSOS(Cbc_Model * model, int numRows, const int * rowStarts,
    213213               const int * colIndices, const double * weights, const int type)
    214     ;*/
     214    ;
    215215    /** Print the model */
    216216    COINLIBAPI void COINLINKAGE
  • trunk/Cbc/test/CInterfaceTest.c

    r2037 r2039  
    192192*/
    193193
    194 /*
     194
    195195void testSOS() {
    196196
    197197    Cbc_Model *model = Cbc_newModel();
    198198
    199     / *
     199    /*
    200200       Maximize  5x[1] + 3x[2] + 2x[3] + 7x[4] + 4x[5]
    201201       s.t.       x[1] +  x[2] +  x[3] +  x[4] +  x[5] == 1
    202202       All x binary
    203        * /
     203       */
    204204   
    205205    CoinBigIndex start[] = {0, 0, 0, 0, 0, 0, 0};
     
    250250
    251251}
    252 */
     252
    253253
    254254void testIntegerInfeasible() {
     
    330330    printf("Knapsack test\n");
    331331    testKnapsack();
    332     /*printf("SOS test\n");
    333     testSOS();*/
     332    printf("SOS test\n");
     333    testSOS();
    334334    printf("Infeasible test\n");
    335335    testIntegerInfeasible();
Note: See TracChangeset for help on using the changeset viewer.