Index: src/work/athos/lp/Makefile
===================================================================
--- src/work/athos/lp/Makefile	(revision 1316)
+++ src/work/athos/lp/Makefile	(revision 1319)
@@ -1,5 +1,5 @@
 CXXFLAGS = -Wall -ggdb --no-inline -I../../.. -I..
 
-all: lp_sample
+all: lp_sample_cplex
 
 clean:
@@ -10,15 +10,18 @@
 
 
-lp_solver_skeleton.o: lp_solver_skeleton.cc lp_solver_skeleton.h lp_base.h \
-		lin_expr.h
+lp_solver_skeleton.o: lp_solver_skeleton.cc lp_solver_skeleton.h lp_base.h 
 	$(CXX) $(CXXFLAGS) -o $@ -c $<
 
-lp_glpk.o: ../../../lemon/lp_glpk.cc ../../../lemon/lp_glpk.h ../../../lemon/lp_base.h lin_expr.h
+lp_glpk.o: ../../../lemon/lp_glpk.cc ../../../lemon/lp_glpk.h ../../../lemon/lp_base.h
 	$(CXX) $(CXXFLAGS) -o $@ -c $<
 
+lp_cplex.o: lp_cplex.cc lp_cplex.h ../../../lemon/lp_base.h
+	$(CXX) $(CXXFLAGS) -I/usr/local/cplex/cplex75/include -o $@ -c $<
 
-lp_sample.o: lp_sample.cc 
+lp_sample.o: lp_sample.cc
 
 lp_sample: lp_sample.o lp_base.o lp_glpk.o 
 	$(CXX) -o $@ $^ -lglpk
 
+lp_sample_cplex: lp_sample_cplex.o lp_base.o lp_glpk.o 
+	$(CXX) $(CXXFLAGS) -I/usr/local/cplex/cplex75/include -o $@ $^ -L/usr/local/cplex/cplex75/lib/i86_linux2_glibc2.2_gcc3.0/static_pic_mt -lcplex -lm -lpthread
Index: src/work/athos/lp/lp_cplex.cc
===================================================================
--- src/work/athos/lp/lp_cplex.cc	(revision 1303)
+++ src/work/athos/lp/lp_cplex.cc	(revision 1319)
@@ -25,5 +25,5 @@
   {
     int i = CPXgetnumcols (env, lp);
-    int lb[1],ub[1];
+    Value lb[1],ub[1];
     lb[0]=-INF;//-CPX_INFBOUND;
     ub[0]=INF;//CPX_INFBOUND;
@@ -34,6 +34,10 @@
   int LpCplex::_addRow() 
   {
+    //We want a ranged row
+    char sense[1];
+    sense[0]='R';
+
     int i = CPXgetnumrows (env, lp);
-    status = CPXnewrows (env, lp, 1, NULL, NULL, NULL, NULL, NULL);
+    status = CPXnewrows (env, lp, 1, NULL, sense, NULL, NULL);
     return i;
   }
@@ -46,4 +50,5 @@
   {
     int rowlist[length+1];
+    int* p=rowlist;
     for (int k=1;k<=length;++k){
       rowlist[k]=i;
@@ -51,7 +56,7 @@
     status = CPXchgcoeflist(env, lp, 
 			    length, 
-			    rowlist++, 
-			    inices++, 
-			    values++);
+			    p++, 
+			    const_cast<int * >(indices++), 
+			    const_cast<Value * >(values++));
   }
   
@@ -62,4 +67,5 @@
   {
     int collist[length+1];
+    int* p=collist;
     for (int k=1;k<=length;++k){
       collist[k]=i;
@@ -67,39 +73,110 @@
     status = CPXchgcoeflist(env, lp, 
 			    length, 
-			    inices++, 
-			    collist++, 
-			    values++);
+			    const_cast<int * >(indices++), 
+			    p++, 
+			    const_cast<Value * >(values++));
   }
   
   void LpCplex::_setColLowerBound(int i, Value value)
   {
+    int indices[1];
+    indices[0]=i;
+    char lu[1];
+    lu[0]='L';
+    Value bd[1];
+    bd[0]=value;
+    status = CPXchgbds (env, lp, 1, indices, lu, bd);
+ 
   }
   
   void LpCplex::_setColUpperBound(int i, Value value)
   {
+    int indices[1];
+    indices[0]=i;
+    char lu[1];
+    lu[0]='U';
+    Value bd[1];
+    bd[0]=value;
+    status = CPXchgbds (env, lp, 1, indices, lu, bd);
   }
   
   void LpCplex::_setRowLowerBound(int i, Value value)
   {
+    status = CPXchgcoef (env, lp, i, -1, value);
+
   }
   
   void LpCplex::_setRowUpperBound(int i, Value value)
   {
+    //TODO Ezt kell meg megirni
+    //    Value lo=CPX
   }
   
   void LpCplex::_setObjCoeff(int i, Value obj_coef)
   {
+    status = CPXchgcoef (env, lp, -1, i, obj_coef);
+   }
+
+  LpCplex::SolveExitStatus LpCplex::_solve()
+  {
+    return SOLVED;
+//     int i=  lpx_simplex(lp);
+//     switch (i) {
+//     case LPX_E_OK: 
+//       return SOLVED;
+//       break;
+//     default:
+//       return UNSOLVED;
+//     }
   }
 
-  LpCplex::SolutionStatus LpCplex::_solve()
-  {
-    return OPTIMAL;
-  }
-
-  LpCplex::Value LpCplex::_getSolution(int i)
+  LpCplex::Value LpCplex::_getPrimal(int i)
   {
     return 0;
   }
   
+  LpCplex::Value LpCplex::_getPrimalValue()
+  {
+    return 0;
+  }
+  
+ 
+  LpCplex::SolutionStatus LpCplex::_getPrimalStatus()
+  {
+    return OPTIMAL;
+//     int stat=  lpx_get_status(lp);
+//     switch (stat) {
+//     case LPX_UNDEF://Undefined (no solve has been run yet)
+//       return UNDEFINED;
+//       break;
+//     case LPX_NOFEAS://There is no feasible solution (primal, I guess)
+//     case LPX_INFEAS://Infeasible 
+//       return INFEASIBLE;
+//       break;
+//     case LPX_UNBND://Unbounded
+//       return INFINITE;
+//       break;
+//     case LPX_FEAS://Feasible
+//       return FEASIBLE;
+//       break;
+//     case LPX_OPT://Feasible
+//       return OPTIMAL;
+//       break;
+//     default:
+//       return UNDEFINED; //to avoid gcc warning
+//       //FIXME error
+//     }
+  }
+
+
+  void LpCplex::_setMax()
+  {
+    CPXchgobjsen (env, lp, CPX_MAX);
+   }
+  void LpCplex::_setMin()
+  {
+    CPXchgobjsen (env, lp, CPX_MIN);
+   }
+  
 } //namespace lemon
 
Index: src/work/athos/lp/lp_cplex.h
===================================================================
--- src/work/athos/lp/lp_cplex.h	(revision 1303)
+++ src/work/athos/lp/lp_cplex.h	(revision 1319)
@@ -21,5 +21,5 @@
 ///\brief Header of the LEMON-CPLEX lp solver interface.
 
-#include "lp_base.h"
+#include <lemon/lp_base.h>
 extern "C" {
 #include "ilcplex/cplex.h"
@@ -109,10 +109,31 @@
     ///\bug Unimplemented
     ///
-    virtual SolutionStatus _solve();
+    virtual SolveExitStatus _solve();
+    ///\e
+
+    ///\bug Unimplemented
+    ///
+    virtual Value _getPrimal(int i);
     ///\e
     
     ///\bug Unimplemented
     ///
-    virtual Value _getSolution(int i);
+    virtual Value _getPrimalValue();
+    ///\e
+    
+    ///\bug Unimplemented
+    ///
+    virtual SolutionStatus _getPrimalStatus();
+
+    ///\e
+    
+    ///\bug Unimplemented
+    ///
+    virtual void _setMax();
+    ///\e
+    
+    ///\bug Unimplemented
+    ///
+    virtual void _setMin();
 
   };
