Changeset 2267:3575f17a6e7f in lemon-0.x
- Timestamp:
- 10/30/06 12:32:19 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3025
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/lp_base.h
r2260 r2267 1175 1175 ///Unfortunately, cplex 7.5 somewhere writes something like 1176 1176 ///#define INTEGER 'I' 1177 LEMON_INTEGER= 11177 INT = 1 1178 1178 ///\todo No support for other types yet. 1179 1179 }; … … 1198 1198 void integer(Col c, bool enable) { 1199 1199 if (enable) 1200 colType(c, LEMON_INTEGER);1200 colType(c,INT); 1201 1201 else 1202 1202 colType(c,REAL); … … 1208 1208 ///\return true if the column has integer type and false if not. 1209 1209 bool integer(Col c){ 1210 return (colType(c)== LEMON_INTEGER);1210 return (colType(c)==INT); 1211 1211 } 1212 1212 -
lemon/mip_cplex.cc
r2253 r2267 47 47 char ctype[1]; 48 48 switch (col_type){ 49 case LEMON_INTEGER:49 case INT: 50 50 ctype[0]=CPX_INTEGER;//'I' 51 51 break; … … 66 66 67 67 case CPX_INTEGER: 68 return LEMON_INTEGER;68 return INT; 69 69 case CPX_CONTINUOUS: 70 70 return REAL; -
lemon/mip_glpk.cc
r2253 r2267 30 30 void MipGlpk::_colType(int i, MipGlpk::ColTypes col_type){ 31 31 switch (col_type){ 32 case LEMON_INTEGER:32 case INT: 33 33 lpx_set_col_kind(lp,i,LPX_IV); 34 34 break; … … 44 44 switch (lpx_get_col_kind(lp,i)){ 45 45 case LPX_IV: 46 return LEMON_INTEGER;//Or binary46 return INT;//Or binary 47 47 case LPX_CV: 48 48 return REAL; -
test/mip_test.cc
r2227 r2267 77 77 78 78 //Restrict x2 to integer 79 mip.colType(x2,MipSolverBase:: LEMON_INTEGER);79 mip.colType(x2,MipSolverBase::INT); 80 80 expected_opt=1.0/2.0; 81 81 solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt); … … 83 83 84 84 //Restrict both to integer 85 mip.colType(x1,MipSolverBase:: LEMON_INTEGER);85 mip.colType(x1,MipSolverBase::INT); 86 86 expected_opt=0; 87 87 solveAndCheck(mip, MipSolverBase::OPTIMAL, expected_opt);
Note: See TracChangeset
for help on using the changeset viewer.