Index: lemon/lp_base.h
===================================================================
--- lemon/lp_base.h	(revision 1445)
+++ lemon/lp_base.h	(revision 1458)
@@ -109,9 +109,11 @@
   public:
 
-    ///\e
+    ///Possible outcomes of an LP solving procedure
     enum SolveExitStatus {
-      ///\e
+      ///This means that the problem has been successfully solved: either
+      ///an optimal solution has been found or infeasibility/unboundedness
+      ///has been proved.
       SOLVED = 0,
-      ///\e
+      ///Any other case (including the case when some user specified limit has been exceeded)
       UNSOLVED = 1
     };
@@ -916,5 +918,9 @@
     ///@{
 
-    ///\e
+    ///\e Solve the LP problem at hand
+    ///
+    ///\return The result of the optimization procedure. Possible values and their meanings can be found in the documentation of \ref SolveExitStatus.
+    ///
+    ///\todo Which method is used to solve the problem
     SolveExitStatus solve() { return _solve(); }
     
@@ -925,5 +931,5 @@
     ///@{
 
-    ///\e
+    ///\e 
     SolutionStatus primalStatus() {
       return _getPrimalStatus();
Index: lemon/lp_cplex.cc
===================================================================
--- lemon/lp_cplex.cc	(revision 1436)
+++ lemon/lp_cplex.cc	(revision 1458)
@@ -26,5 +26,4 @@
     env = CPXopenCPLEX(&status);     
     lp = CPXcreateprob(env, &status, "LP problem");
-    //CPXmsg (cpxresults, "Hello-bello\n");
   }
   
@@ -231,49 +230,81 @@
     
   }
-
+  // The routine returns zero unless an error occurred during the
+  // optimization. Examples of errors include exhausting available
+  // memory (CPXERR_NO_MEMORY) or encountering invalid data in the
+  // CPLEX problem object (CPXERR_NO_PROBLEM). Exceeding a
+  // user-specified CPLEX limit, or proving the model infeasible or
+  // unbounded, are not considered errors. Note that a zero return
+  // value does not necessarily mean that a solution exists. Use query
+  // routines CPXsolninfo, CPXgetstat, and CPXsolution to obtain
+  // further information about the status of the optimization.
   LpCplex::SolveExitStatus LpCplex::_solve()
   {
-    
+    //CPX_PARAM_LPMETHOD 
     status = CPXlpopt (env, lp);
     if (status == 0){
-      return SOLVED;
+      //We want to exclude some cases
+      switch (CPXgetstat (env, lp)){
+      case CPX_OBJ_LIM:
+      case CPX_IT_LIM_FEAS:
+      case CPX_IT_LIM_INFEAS:               
+      case CPX_TIME_LIM_FEAS:
+      case CPX_TIME_LIM_INFEAS:
+	return UNSOLVED;
+      default:
+	return SOLVED; 
+      }
     }
     else{
       return UNSOLVED;
     }
-//     int i=  lpx_simplex(lp);
-//     switch (i) {
-//     case LPX_E_OK: 
-//       return SOLVED;
-//       break;
-//     default:
-//       return UNSOLVED;
-//     }
-  }
-
-  LpCplex::SolutionStatus LpCplex::_getPrimalStatus()
-  {
-//7.5-os cplex statusai
-// #define CPX_OPTIMAL                      1
-// #define CPX_INFEASIBLE                   2
-// #define CPX_UNBOUNDED                    3
-// #define CPX_OBJ_LIM                      4
-// #define CPX_IT_LIM_FEAS                  5
-// #define CPX_IT_LIM_INFEAS                6
-// #define CPX_TIME_LIM_FEAS                7
-// #define CPX_TIME_LIM_INFEAS              8
-// #define CPX_NUM_BEST_FEAS                9
-// #define CPX_NUM_BEST_INFEAS             10
-// #define CPX_OPTIMAL_INFEAS              11
-// #define CPX_ABORT_FEAS                  12
-// #define CPX_ABORT_INFEAS                13
-// #define CPX_ABORT_DUAL_INFEAS           14
-// #define CPX_ABORT_PRIM_INFEAS           15
-// #define CPX_ABORT_PRIM_DUAL_INFEAS      16
-// #define CPX_ABORT_PRIM_DUAL_FEAS        17
-// #define CPX_ABORT_CROSSOVER             18
-// #define CPX_INForUNBD                   19
-// #define CPX_PIVOT                       20
-
+  }
+
+
+//7.5-os cplex statusai (Vigyazat: a 9.0-asei masok!)
+// This table lists the statuses, returned by the CPXgetstat() routine, for solutions to LP problems or mixed integer problems. If no solution exists, the return value is zero.
+
+// For Simplex, Barrier  
+// 1  	CPX_OPTIMAL  
+// 	 Optimal solution found  
+// 2  	CPX_INFEASIBLE  
+// 	 Problem infeasible  
+// 3    CPX_UNBOUNDED  
+// 	 Problem unbounded  
+// 4  	CPX_OBJ_LIM  
+// 	 Objective limit exceeded in Phase II  
+// 5  	CPX_IT_LIM_FEAS  
+// 	 Iteration limit exceeded in Phase II  
+// 6  	CPX_IT_LIM_INFEAS  
+// 	 Iteration limit exceeded in Phase I  
+// 7  	CPX_TIME_LIM_FEAS  
+// 	 Time limit exceeded in Phase II  
+// 8  	CPX_TIME_LIM_INFEAS  
+// 	 Time limit exceeded in Phase I  
+// 9  	CPX_NUM_BEST_FEAS  
+// 	 Problem non-optimal, singularities in Phase II  
+// 10 	CPX_NUM_BEST_INFEAS  
+// 	 Problem non-optimal, singularities in Phase I  
+// 11 	CPX_OPTIMAL_INFEAS  
+// 	 Optimal solution found, unscaled infeasibilities  
+// 12 	CPX_ABORT_FEAS  
+// 	 Aborted in Phase II  
+// 13 	CPX_ABORT_INFEAS  
+// 	 Aborted in Phase I  
+// 14  	CPX_ABORT_DUAL_INFEAS  
+// 	 Aborted in barrier, dual infeasible  
+// 15  	CPX_ABORT_PRIM_INFEAS  
+// 	 Aborted in barrier, primal infeasible  
+// 16  	CPX_ABORT_PRIM_DUAL_INFEAS  
+// 	 Aborted in barrier, primal and dual infeasible  
+// 17  	CPX_ABORT_PRIM_DUAL_FEAS  
+// 	 Aborted in barrier, primal and dual feasible  
+// 18  	CPX_ABORT_CROSSOVER  
+// 	 Aborted in crossover  
+// 19  	CPX_INForUNBD  
+// 	 Infeasible or unbounded  
+// 20   CPX_PIVOT
+//       User pivot used
+//
 //     Ezeket hova tegyem:
 // ??case CPX_ABORT_DUAL_INFEAS           
@@ -282,33 +313,30 @@
 // ??case CPX_PIVOT                       
 
+  LpCplex::SolutionStatus LpCplex::_getPrimalStatus()
+  {
     int stat = CPXgetstat (env, lp);
     switch (stat) {
     case 0:
       return UNDEFINED; //Undefined
-      break;      
     case CPX_OPTIMAL://Optimal
       return OPTIMAL;
-      break;
     case CPX_UNBOUNDED://Unbounded
       return INFINITE;
-      break;
     case CPX_INFEASIBLE://Infeasible 
-    case CPX_IT_LIM_INFEAS:
-    case CPX_TIME_LIM_INFEAS:
-    case CPX_NUM_BEST_INFEAS:             
-    case CPX_OPTIMAL_INFEAS:              
-    case CPX_ABORT_INFEAS:                
-    case CPX_ABORT_PRIM_INFEAS:           
-    case CPX_ABORT_PRIM_DUAL_INFEAS:      
+ //    case CPX_IT_LIM_INFEAS:
+//     case CPX_TIME_LIM_INFEAS:
+//     case CPX_NUM_BEST_INFEAS:             
+//     case CPX_OPTIMAL_INFEAS:              
+//     case CPX_ABORT_INFEAS:                
+//     case CPX_ABORT_PRIM_INFEAS:           
+//     case CPX_ABORT_PRIM_DUAL_INFEAS:      
       return INFEASIBLE;
-      break;
-    case CPX_OBJ_LIM:                    
-    case CPX_IT_LIM_FEAS:             
-    case CPX_TIME_LIM_FEAS:                
-    case CPX_NUM_BEST_FEAS:                
-    case CPX_ABORT_FEAS:                  
-    case CPX_ABORT_PRIM_DUAL_FEAS:        
-      return FEASIBLE;
-      break;
+//     case CPX_OBJ_LIM:                    
+//     case CPX_IT_LIM_FEAS:             
+//     case CPX_TIME_LIM_FEAS:                
+//     case CPX_NUM_BEST_FEAS:                
+//     case CPX_ABORT_FEAS:                  
+//     case CPX_ABORT_PRIM_DUAL_FEAS:        
+//       return FEASIBLE;
     default:
       return UNDEFINED; //Everything else comes here
@@ -316,6 +344,7 @@
     }
 
-
-    //Nem tudom, hanyas cplex verzio statusai
+  }
+
+//9.0-as cplex verzio statusai
 // CPX_STAT_ABORT_DUAL_OBJ_LIM
 // CPX_STAT_ABORT_IT_LIM
@@ -334,24 +363,18 @@
 // CPX_STAT_UNBOUNDED
 
-//     int stat = CPXgetstat (env, lp);
-//     switch (stat) {
-//     case CPX_STAT_OPTIMAL://Optimal
-//       return OPTIMAL;
-//       break;
-//     case CPX_STAT_INFEASIBLE://Infeasible 
-//       return INFEASIBLE;
-//       break;
-//     case CPX_STAT_UNBOUNDED://Unbounded
-//       return INFINITE;
-//       break;
-//     case CPX_STAT_NUM_BEST://Feasible
-//       return FEASIBLE;
-//       break;
-//     default:
-//       return UNDEFINED; //Everything else comes here
-//       //FIXME error
-//     }
-
-  }
+  LpCplex::SolutionStatus LpCplex::_getDualStatus()
+  {
+    int stat = CPXgetstat (env, lp);
+    switch (stat) {
+    case 0:
+      return UNDEFINED; //Undefined
+    case CPX_OPTIMAL://Optimal
+      return OPTIMAL;
+    case CPX_UNBOUNDED:
+     return INFEASIBLE;
+    default:
+      return UNDEFINED; //Everything else comes here
+      //FIXME error
+    }
 
   LpCplex::Value LpCplex::_getPrimal(int i)
Index: lemon/lp_glpk.cc
===================================================================
--- lemon/lp_glpk.cc	(revision 1436)
+++ lemon/lp_glpk.cc	(revision 1458)
@@ -397,9 +397,8 @@
   LpGlpk::SolveExitStatus LpGlpk::_solve()
   {
-    int i=  lpx_simplex(lp);
+    int i =  lpx_simplex(lp);
     switch (i) {
     case LPX_E_OK: 
       return SOLVED;
-      break;
     default:
       return UNSOLVED;
@@ -421,4 +420,52 @@
   {
     int stat=  lpx_get_status(lp);
+    switch (stat) {
+    case LPX_UNDEF://Undefined (no solve has been run yet)
+      return UNDEFINED;
+    case LPX_NOFEAS://There is no feasible solution (primal, I guess)
+    case LPX_INFEAS://Infeasible 
+      return INFEASIBLE;
+    case LPX_UNBND://Unbounded
+      return INFINITE;
+    case LPX_FEAS://Feasible
+      return FEASIBLE;
+    case LPX_OPT://Feasible
+      return OPTIMAL;
+    default:
+      return UNDEFINED; //to avoid gcc warning
+      //FIXME error
+    }
+  }
+
+  LpGlpk::SolutionStatus LpGlpk::_getDualStatus()
+  {
+    int stat=  lpx_get_dual_stat(lp);
+    switch (stat) {
+    case LPX_D_UNDEF://Undefined (no solve has been run yet)
+      return UNDEFINED;
+    case LPX_D_NOFEAS://There is no feasible solution (primal, I guess)
+    case LPX_D_INFEAS://Infeasible 
+      return INFEASIBLE;
+    case LPX_FEAS://Feasible    
+      int stat2=  lpx_get_prim_stat(lp);
+      switch (stat2){
+      case LPX_P_NOFEAS:
+	return INFINITE;
+      case LPX_OPT:
+	return OPTIMAL;
+      default:
+	return FEASIBLE;
+      }
+    default:
+      return UNDEFINED; //to avoid gcc warning
+      //FIXME error
+    }
+  }
+
+  LpGlpk::ProblemTypes LpGlpk::_problemType()
+  {
+    int stat=  lpx_get_status(lp);
+    int statp=  lpx_get_prim_stat(lp);
+    int statd=  lpx_get_dual_stat(lp);
     switch (stat) {
     case LPX_UNDEF://Undefined (no solve has been run yet)
@@ -444,5 +491,4 @@
   }
 
-
   void LpGlpk::_setMax()
   {
