Index: lemon/Makefile.am
===================================================================
--- lemon/Makefile.am	(revision 2126)
+++ lemon/Makefile.am	(revision 2144)
@@ -20,4 +20,5 @@
 if HAVE_GLPK
 lemon_libemon_la_SOURCES += lemon/lp_glpk.cc
+lemon_libemon_la_SOURCES += lemon/mip_glpk.cc
 endif
 
Index: lemon/lp.h
===================================================================
--- lemon/lp.h	(revision 1956)
+++ lemon/lp.h	(revision 2144)
@@ -24,4 +24,5 @@
 #ifdef HAVE_GLPK
 #include <lemon/lp_glpk.h>
+#include <lemon/mip_glpk.h>
 #elif HAVE_CPLEX
 #include <lemon/lp_cplex.h>
@@ -55,8 +56,17 @@
   ///Currently, the possible values are "GLPK" or "CPLEX"
   const char default_solver_name[]="SOLVER";  
+
+  ///The default ILP solver.
+
+  ///The default ILP solver.
+  ///\ingroup gen_opt_group
+  ///
+  ///Currently, it is either \c LpGlpk or \c LpCplex
+  typedef MipGlpk Mip;
 #else
 #ifdef HAVE_GLPK
 #define DEFAULT_LP GLPK
   typedef LpGlpk Lp;
+  typedef MipGlpk Mip;
   const char default_solver_name[]="GLPK";
 #elif HAVE_CPLEX
Index: lemon/lp_base.h
===================================================================
--- lemon/lp_base.h	(revision 2085)
+++ lemon/lp_base.h	(revision 2144)
@@ -176,4 +176,5 @@
       int id;
       friend class LpSolverBase;
+      friend class MipSolverBase;
     public:
       typedef Value ExprValue;
@@ -1157,5 +1158,31 @@
   };  
 
-  ///\e
+
+  ///Common base class for ILP solvers
+  ///\todo Much more docs
+  ///\ingroup gen_opt_group
+  class MipSolverBase : virtual public LpSolverBase{
+  public:
+
+    ///Set the type of the given Col to integer or remove that property.
+    ///
+    ///Set the type of the given Col to integer or remove that property.
+    void integer(Col c, bool enable) {
+      _integer(cols.floatingId(c.id),enable);
+    }
+
+    ///Gives back the type of the column.
+    ///
+    ///Gives back the type of the column.
+    ///\return true if the column has integer type and false if not.
+    bool integer(Col c){
+      return _integer(cols.floatingId(c.id));
+    }
+
+  protected:
+
+    virtual bool _integer(int col) = 0;
+    virtual void _integer(int col, bool enable) = 0;
+  };
   
   ///\relates LpSolverBase::Expr
Index: lemon/lp_glpk.h
===================================================================
--- lemon/lp_glpk.h	(revision 1956)
+++ lemon/lp_glpk.h	(revision 2144)
@@ -36,5 +36,5 @@
   /// This class implements an interface for the GLPK LP solver.
   ///\ingroup gen_opt_group
-  class LpGlpk : public LpSolverBase {
+  class LpGlpk : virtual public LpSolverBase {
   protected:
     LPX* lp;
Index: lemon/mip_glpk.cc
===================================================================
--- lemon/mip_glpk.cc	(revision 2144)
+++ lemon/mip_glpk.cc	(revision 2144)
@@ -0,0 +1,72 @@
+/* -*- C++ -*-
+ *
+ * This file is a part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2003-2006
+ * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Research Group on Combinatorial Optimization, EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#ifndef LEMON_ILP_GLPK_CC
+#define LEMON_ILP_GLPK_CC
+
+///\file
+///\brief Implementation of the LEMON-GLPK lp solver interface.
+
+#include <lemon/mip_glpk.h>
+
+namespace lemon {
+  
+  MipGlpk::MipGlpk() {
+    lpx_set_class(lp,LPX_MIP);
+  }
+  
+  void MipGlpk::_integer(int i, bool enable){
+    if(enable){
+      lpx_set_col_kind(lp,i,LPX_IV);
+    }else{
+      lpx_set_col_kind(lp,i,LPX_CV);
+    }
+  }
+  
+  bool MipGlpk::_integer(int i){
+    if(LPX_IV == lpx_get_col_kind(lp,i)){
+      return true;
+    }
+    return false;
+  }
+  
+  LpGlpk::SolveExitStatus MipGlpk::_solve(){
+    int result = lpx_simplex(lp);
+    result = lpx_integer(lp);
+    switch (result){
+      case LPX_E_OBJLL:
+      case LPX_E_OBJUL:
+      case LPX_E_ITLIM:
+      case LPX_E_TMLIM:
+      case LPX_E_OK:
+        return SOLVED;
+      default:
+        return UNSOLVED;
+    }
+  }
+  
+  MipGlpk::Value MipGlpk::_getPrimal(int i){
+    return lpx_mip_col_val(lp,i);
+  }
+  
+  MipGlpk::Value MipGlpk::_getPrimalValue(){
+    return lpx_mip_obj_val(lp);
+  }
+} //END OG NAMESPACE LEMON
+
+#endif
Index: lemon/mip_glpk.h
===================================================================
--- lemon/mip_glpk.h	(revision 2144)
+++ lemon/mip_glpk.h	(revision 2144)
@@ -0,0 +1,58 @@
+/* -*- C++ -*-
+ *
+ * This file is a part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2003-2006
+ * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Research Group on Combinatorial Optimization, EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#ifndef LEMON_ILP_GLPK_H
+#define LEMON_ILP_GLPK_H
+
+///\file
+///\brief Header of the LEMON-GLPK lp solver interface.
+///\ingroup gen_opt_group
+
+
+#include <lemon/lp_glpk.h>
+
+namespace lemon {
+  /// \brief Interface for the GLPK ILP solver
+  /// 
+  /// This class implements an interface for the GLPK ILP solver.
+  ///\ingroup gen_opt_group
+  class MipGlpk : public MipSolverBase, public LpGlpk{
+  
+  public:
+  
+    typedef MipSolverBase ParentMip;
+    typedef LpGlpk ParentLp;
+    
+    MipGlpk();
+    //~MipGlpk();
+    
+    
+    
+  protected:
+  
+    virtual void _integer(int c, bool enable);
+    virtual bool _integer(int c);
+    
+    virtual LpGlpk::SolveExitStatus _solve();
+    virtual ParentLp::Value _getPrimal(int i);
+    virtual ParentLp::Value _getPrimalValue();
+  };
+
+} //END OF NAMESPACE LEMON
+
+#endif // END OF LEMON_ILP_GLPK_H
Index: test/Makefile.am
===================================================================
--- test/Makefile.am	(revision 2119)
+++ test/Makefile.am	(revision 2144)
@@ -29,4 +29,5 @@
 	test/max_matching_test \
 	test/min_cost_flow_test \
+	test/mip_test \
 	test/path_test \
 	test/polynomial_test \
@@ -71,4 +72,5 @@
 test_max_matching_test_SOURCES = test/max_matching_test.cc
 test_min_cost_flow_test_SOURCES = test/min_cost_flow_test.cc
+test_mip_test_SOURCES = test/mip_test.cc
 test_path_test_SOURCES = test/path_test.cc
 test_polynomial_test_SOURCES = test/polynomial_test.cc
Index: test/mip_test.cc
===================================================================
--- test/mip_test.cc	(revision 2144)
+++ test/mip_test.cc	(revision 2144)
@@ -0,0 +1,50 @@
+#include <lemon/lp.h>
+//#include <lemon/ilp_glpk.h>
+
+using namespace lemon;
+
+int main(){
+
+  //MipGlpk ilp;
+
+   Mip ilp;
+
+    
+  typedef Mip::Row Row;
+  typedef Mip::Col Col;
+  
+  ilp.max();
+  
+  Col x1 = ilp.addCol();
+  Col x2 = ilp.addCol();
+  Col x3 = ilp.addCol();
+  
+  ilp.integer(x1,true);
+  ilp.integer(x2,true);
+  ilp.integer(x3,true);
+  
+  ilp.addRow(x1+x2+x3 <=100);  
+  ilp.addRow(10*x1+4*x2+5*x3<=600);  
+  ilp.addRow(2*x1+2*x2+6*x3<=300); 
+  
+  ilp.colLowerBound(x1, 0);
+  ilp.colLowerBound(x2, 0);
+  ilp.colLowerBound(x3, 0);
+  //Objective function
+  ilp.setObj(10*x1+6*x2+4*x3);
+  
+  //Call the routine of the underlying LP solver
+  ilp.solve();
+  
+  //Print results
+  if (ilp.primalStatus()==LpSolverBase::OPTIMAL){
+    std::cout<<"Optimal solution found!"<<std::endl;
+    printf("optimum value = %g; x1 = %g; x2 = %g; x3 = %g\n", 
+           ilp.primalValue(), 
+           ilp.primal(x1), ilp.primal(x2), ilp.primal(x3));
+  }
+  else{
+    std::cout<<"Optimal solution not found!"<<std::endl;
+  }
+
+}
