Changeset 2148:ab368e0ab662 in lemon-0.x for lemon/mip_glpk.cc
- Timestamp:
- 07/17/06 13:56:17 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2862
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/mip_glpk.cc
r2144 r2148 30 30 lpx_set_class(lp,LPX_MIP); 31 31 } 32 33 void MipGlpk::_integer(int i, bool enable){ 34 if(enable){ 35 lpx_set_col_kind(lp,i,LPX_IV); 36 }else{ 37 lpx_set_col_kind(lp,i,LPX_CV); 32 33 void MipGlpk::_colType(int i, ColTypes col_type){ 34 switch (col_type){ 35 case INTEGER: 36 lpx_set_col_kind(lp,i,LPX_IV); 37 break; 38 case REAL: 39 lpx_set_col_kind(lp,i,LPX_CV); 40 break; 41 default: 42 //FIXME problem 38 43 } 39 44 } 40 45 41 bool MipGlpk::_integer(int i){ 42 if(LPX_IV == lpx_get_col_kind(lp,i)){ 43 return true; 46 ColTypes MipGlpk::_colType(int i){ 47 switch (lpx_get_col_kind(lp,i)){ 48 case LPX_IV: 49 return INTEGER;//Or binary 50 case LPX_CV: 51 return REAL; 52 default: 53 return REAL;//Error! 44 54 } 45 return false;55 46 56 } 47 57
Note: See TracChangeset
for help on using the changeset viewer.