lemon/mip_glpk.cc
changeset 2197 921923afd57a
parent 2149 b437bdee6fd0
child 2213 2c094dfa176d
equal deleted inserted replaced
2:58b45d366d4b 3:0d5ce5032b3e
    67         return SOLVED;
    67         return SOLVED;
    68       default:
    68       default:
    69         return UNSOLVED;
    69         return UNSOLVED;
    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   MipGlpk::Value MipGlpk::_getPrimal(int i){
    96   MipGlpk::Value MipGlpk::_getPrimal(int i){
    74     return lpx_mip_col_val(lp,i);
    97     return lpx_mip_col_val(lp,i);
    75   }
    98   }
    76   
    99   
    77   MipGlpk::Value MipGlpk::_getPrimalValue(){
   100   MipGlpk::Value MipGlpk::_getPrimalValue(){