Changeset 2185:e2bf51eab7f7 in lemon-0.x
- Timestamp:
- 08/30/06 18:08:03 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2906
- Location:
- lemon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/lp_base.h
r2148 r2185 122 122 ///\e 123 123 enum SolutionStatus { 124 ///Feasible solution has 'nbeen found (but may exist).124 ///Feasible solution hasn't been found (but may exist). 125 125 126 126 ///\todo NOTFOUND might be a better name. … … 1206 1206 } 1207 1207 1208 /// The status of the MIP problem 1209 SolutionStatus mipStatus() { 1210 return _getMipStatus(); 1211 } 1212 1208 1213 protected: 1209 1214 1210 1215 virtual ColTypes _colType(int col) = 0; 1211 1216 virtual void _colType(int col, ColTypes col_type) = 0; 1217 virtual SolutionStatus _getMipStatus()=0; 1212 1218 1213 1219 }; -
lemon/mip_glpk.cc
r2149 r2185 70 70 } 71 71 } 72 72 73 74 LpGlpk::SolutionStatus MipGlpk::_getMipStatus(){ 75 76 //Meg kell nezni: ha az LP is infinite, akkor ez is, ha az is 77 //infeasible, akkor ez is, de ez lehet maskepp is infeasible. 78 int stat= lpx_mip_status(lp); 79 switch (stat) { 80 case LPX_I_UNDEF://Undefined (no solve has been run yet) 81 return UNDEFINED; 82 case LPX_I_NOFEAS://There is no feasible integral solution (primal, I guess) 83 return INFEASIBLE; 84 // case LPX_UNBND://Unbounded 85 // return INFINITE; 86 case LPX_I_FEAS://Feasible 87 return FEASIBLE; 88 case LPX_I_OPT://Feasible 89 return OPTIMAL; 90 default: 91 return UNDEFINED; //to avoid gcc warning 92 //FIXME error 93 } 94 } 95 73 96 MipGlpk::Value MipGlpk::_getPrimal(int i){ 74 97 return lpx_mip_col_val(lp,i); -
lemon/mip_glpk.h
r2148 r2185 50 50 51 51 virtual LpGlpk::SolveExitStatus _solve(); 52 virtual LpGlpk::SolutionStatus _getMipStatus(); 52 53 virtual ParentLp::Value _getPrimal(int i); 53 54 virtual ParentLp::Value _getPrimalValue();
Note: See TracChangeset
for help on using the changeset viewer.