lemon/mip_glpk.cc
changeset 2315 bd09e00b64bb
parent 2253 1645f6cc9667
child 2366 bfbdded3763a
equal deleted inserted replaced
6:b6e304bdb02a 7:6eac7dd95b1e
    27     lpx_set_class(lp,LPX_MIP);
    27     lpx_set_class(lp,LPX_MIP);
    28   }
    28   }
    29 
    29 
    30   void MipGlpk::_colType(int i, MipGlpk::ColTypes col_type){
    30   void MipGlpk::_colType(int i, MipGlpk::ColTypes col_type){
    31     switch (col_type){
    31     switch (col_type){
    32       case LEMON_INTEGER:
    32       case INT:
    33 	lpx_set_col_kind(lp,i,LPX_IV);
    33 	lpx_set_col_kind(lp,i,LPX_IV);
    34 	break;
    34 	break;
    35       case REAL:
    35       case REAL:
    36 	lpx_set_col_kind(lp,i,LPX_CV);
    36 	lpx_set_col_kind(lp,i,LPX_CV);
    37 	break;
    37 	break;
    41   }
    41   }
    42   
    42   
    43   MipGlpk::ColTypes MipGlpk::_colType(int i){
    43   MipGlpk::ColTypes MipGlpk::_colType(int i){
    44     switch (lpx_get_col_kind(lp,i)){
    44     switch (lpx_get_col_kind(lp,i)){
    45     case LPX_IV:
    45     case LPX_IV:
    46       return LEMON_INTEGER;//Or binary
    46       return INT;//Or binary
    47     case LPX_CV:
    47     case LPX_CV:
    48       return REAL;
    48       return REAL;
    49     default:
    49     default:
    50       return REAL;//Error!
    50       return REAL;//Error!
    51     }
    51     }