Index: lemon/lp_base.h
===================================================================
--- lemon/lp_base.h	(revision 2364)
+++ lemon/lp_base.h	(revision 2366)
@@ -136,8 +136,8 @@
 
     class ColIt : public Col {
-      LpSolverBase *_lp;
+      const LpSolverBase *_lp;
     public:
       ColIt() {}
-      ColIt(LpSolverBase &lp) : _lp(&lp)
+      ColIt(const LpSolverBase &lp) : _lp(&lp)
       {
         _lp->cols.firstFix(id);
@@ -181,8 +181,8 @@
 
     class RowIt : public Row {
-      LpSolverBase *_lp;
+      const LpSolverBase *_lp;
     public:
       RowIt() {}
-      RowIt(LpSolverBase &lp) : _lp(&lp)
+      RowIt(const LpSolverBase &lp) : _lp(&lp)
       {
         _lp->rows.firstFix(id);
@@ -736,37 +736,39 @@
     virtual int _addCol() = 0;
     virtual int _addRow() = 0; 
+
     virtual void _eraseCol(int col) = 0;
     virtual void _eraseRow(int row) = 0;
-    virtual void _getColName(int col, std::string & name) = 0;
+
+    virtual void _getColName(int col, std::string & name) const = 0;
     virtual void _setColName(int col, const std::string & name) = 0;
+    virtual int _colByName(const std::string& name) const = 0;
+
     virtual void _setRowCoeffs(int i, ConstRowIterator b, 
                                ConstRowIterator e) = 0;
-    virtual void _getRowCoeffs(int i, RowIterator b) = 0;
+    virtual void _getRowCoeffs(int i, RowIterator b) const = 0;
     virtual void _setColCoeffs(int i, ConstColIterator b, 
                                ConstColIterator e) = 0;
-    virtual void _getColCoeffs(int i, ColIterator b) = 0;
+    virtual void _getColCoeffs(int i, ColIterator b) const = 0;
     virtual void _setCoeff(int row, int col, Value value) = 0;
-    virtual Value _getCoeff(int row, int col) = 0;
+    virtual Value _getCoeff(int row, int col) const = 0;
     virtual void _setColLowerBound(int i, Value value) = 0;
-    virtual Value _getColLowerBound(int i) = 0;
+    virtual Value _getColLowerBound(int i) const = 0;
     virtual void _setColUpperBound(int i, Value value) = 0;
-    virtual Value _getColUpperBound(int i) = 0;
+    virtual Value _getColUpperBound(int i) const = 0;
     virtual void _setRowBounds(int i, Value lower, Value upper) = 0;
-    virtual void _getRowBounds(int i, Value &lower, Value &upper)=0;
+    virtual void _getRowBounds(int i, Value &lower, Value &upper) const = 0;
 
     virtual void _setObjCoeff(int i, Value obj_coef) = 0;
-    virtual Value _getObjCoeff(int i) = 0;
+    virtual Value _getObjCoeff(int i) const = 0;
     virtual void _clearObj()=0;
 
     virtual SolveExitStatus _solve() = 0;
-    virtual Value _getPrimal(int i) = 0;
-    virtual Value _getDual(int i) = 0;
-    virtual Value _getPrimalValue() = 0;
-    virtual bool _isBasicCol(int i) = 0;
-    virtual SolutionStatus _getPrimalStatus() = 0;
-    virtual SolutionStatus _getDualStatus() = 0;
-    ///\todo This could be implemented here, too, using _getPrimalStatus() and
-    ///_getDualStatus()
-    virtual ProblemTypes _getProblemType() = 0;
+    virtual Value _getPrimal(int i) const = 0;
+    virtual Value _getDual(int i) const = 0;
+    virtual Value _getPrimalValue() const = 0;
+    virtual bool _isBasicCol(int i) const = 0;
+    virtual SolutionStatus _getPrimalStatus() const = 0;
+    virtual SolutionStatus _getDualStatus() const = 0;
+    virtual ProblemTypes _getProblemType() const = 0;
 
     virtual void _setMax() = 0;
@@ -774,5 +776,5 @@
     
 
-    virtual bool _isMax() = 0;
+    virtual bool _isMax() const = 0;
 
     //Own protected stuff
@@ -878,5 +880,5 @@
     ///\param r is the column to get
     ///\return the dual expression associated to the column
-    DualExpr col(Col c) {
+    DualExpr col(Col c) const {
       DualExpr e;
       _getColCoeffs(_lpId(c), ColIterator(std::inserter(e, e.end()), *this));
@@ -975,5 +977,5 @@
     ///\todo Option to control whether a constraint with a single variable is
     ///added or not.
-    void row(Row r, Value l,const Expr &e, Value u) {
+    void row(Row r, Value l, const Expr &e, Value u) {
       e.simplify();
       _setRowCoeffs(_lpId(r), ConstRowIterator(e.begin(), *this),
@@ -996,5 +998,5 @@
     ///\param r is the row to get
     ///\return the expression associated to the row
-    Expr row(Row r) {
+    Expr row(Row r) const {
       Expr e;
       _getRowCoeffs(_lpId(r), RowIterator(std::inserter(e, e.end()), *this));
@@ -1046,5 +1048,5 @@
     ///\param c is the coresponding coloumn 
     ///\return The name of the colunm
-    std::string colName(Col c){
+    std::string colName(Col c) const {
       std::string name;
       _getColName(_lpId(c), name);
@@ -1056,5 +1058,5 @@
     ///\param c is the coresponding coloumn 
     ///\param name The name to be given
-    void colName(Col c, const std::string& name){
+    void colName(Col c, const std::string& name) {
       _setColName(_lpId(c), name);
     }
@@ -1066,5 +1068,5 @@
     ///\param val is the new value of the coefficient
 
-    void coeff(Row r, Col c, Value val){
+    void coeff(Row r, Col c, Value val) {
       _setCoeff(_lpId(r),_lpId(c), val);
     }
@@ -1076,5 +1078,5 @@
     ///\return the corresponding coefficient
 
-    Value coeff(Row r, Col c){
+    Value coeff(Row r, Col c) const {
       return _getCoeff(_lpId(r),_lpId(c));
     }
@@ -1094,5 +1096,5 @@
     /// (this might be -\ref INF as well).  
     ///\return The lower bound for coloumn \t c
-    Value colLowerBound(Col c) {
+    Value colLowerBound(Col c) const {
       return _getColLowerBound(_lpId(c));
     }
@@ -1149,5 +1151,5 @@
     /// (this might be \ref INF as well).  
     ///\return The upper bound for coloumn \t c
-    Value colUpperBound(Col c) {
+    Value colUpperBound(Col c) const {
       return _getColUpperBound(_lpId(c));
     }
@@ -1261,5 +1263,5 @@
     /// implementation of the setting functions for CPLEX:  
     /// check out whether this can be done for these functions.
-    void getRowBounds(Row c, Value &lower, Value &upper) {
+    void getRowBounds(Row c, Value &lower, Value &upper) const {
       _getRowBounds(_lpId(c),lower, upper);
     }
@@ -1269,5 +1271,5 @@
 
     ///Get an element of the objective function
-    Value objCoeff(Col c) {return _getObjCoeff(_lpId(c)); };
+    Value objCoeff(Col c) const { return _getObjCoeff(_lpId(c)); };
 
     ///Set the objective function
@@ -1285,5 +1287,5 @@
 
     ///\return the objective function as a linear expression of type \ref Expr.
-    Expr obj() {
+    Expr obj() const {
       Expr e;
       for (ColIt it(*this); it != INVALID; ++it) {
@@ -1303,8 +1305,8 @@
 
     ///Query function: is this a maximization problem?
-    bool is_max() {return _isMax(); }
+    bool is_max() const {return _isMax(); }
 
     ///Query function: is this a minimization problem?
-    bool is_min() {return !is_max(); }
+    bool is_min() const {return !is_max(); }
     
     ///@}
@@ -1331,26 +1333,26 @@
 
     /// The status of the primal problem (the original LP problem)
-    SolutionStatus primalStatus() {
+    SolutionStatus primalStatus() const {
       return _getPrimalStatus();
     }
 
     /// The status of the dual (of the original LP) problem 
-    SolutionStatus dualStatus() {
+    SolutionStatus dualStatus() const {
       return _getDualStatus();
     }
 
     ///The type of the original LP problem
-    ProblemTypes problemType() {
+    ProblemTypes problemType() const {
       return _getProblemType();
     }
 
     ///\e
-    Value primal(Col c) { return _getPrimal(_lpId(c)); }
+    Value primal(Col c) const { return _getPrimal(_lpId(c)); }
 
     ///\e
-    Value dual(Row r) { return _getDual(_lpId(r)); }
+    Value dual(Row r) const { return _getDual(_lpId(r)); }
 
     ///\e
-    bool isBasicCol(Col c) { return _isBasicCol(_lpId(c)); }
+    bool isBasicCol(Col c) const { return _isBasicCol(_lpId(c)); }
 
     ///\e
@@ -1361,5 +1363,5 @@
     ///- \ref NaN if no primal solution is found.
     ///- The (finite) objective value if an optimal solution is found.
-    Value primalValue() { return _getPrimalValue()+obj_const_comp;}
+    Value primalValue() const { return _getPrimalValue()+obj_const_comp;}
     ///@}
     
@@ -1395,5 +1397,5 @@
     ///
     ///Gives back the type of the column.
-    ColTypes colType(Col c){
+    ColTypes colType(Col c) const {
       return _colType(_lpId(c));
     }
@@ -1413,10 +1415,10 @@
     ///Gives back the type of the column.
     ///\return true if the column has integer type and false if not.
-    bool integer(Col c){
+    bool integer(Col c) const {
       return (colType(c)==INT);
     }
 
     /// The status of the MIP problem
-    SolutionStatus mipStatus() {
+    SolutionStatus mipStatus() const {
       return _getMipStatus();
     }
@@ -1424,7 +1426,7 @@
   protected:
 
-    virtual ColTypes _colType(int col) = 0;
+    virtual ColTypes _colType(int col) const = 0;
     virtual void _colType(int col, ColTypes col_type) = 0;
-    virtual SolutionStatus _getMipStatus()=0;
+    virtual SolutionStatus _getMipStatus() const = 0;
 
   };
Index: lemon/lp_cplex.cc
===================================================================
--- lemon/lp_cplex.cc	(revision 2364)
+++ lemon/lp_cplex.cc	(revision 2366)
@@ -85,5 +85,5 @@
   }
   
-  void LpCplex::_getColName(int col, std::string &name)
+  void LpCplex::_getColName(int col, std::string &name) const
   {
     ///\bug Untested
@@ -108,4 +108,14 @@
     CPXchgcolname(env, lp, 1, &col, names);    
   }
+
+  int LpCplex::_colByName(const std::string& name) const
+  {
+    int index;
+    if (CPXgetcolindex(env, lp, 
+                       const_cast<char*>(name.c_str()), &index) == 0) {
+      return index;
+    }
+    return -1; 
+  }
   
   ///\warning Data at index 0 is ignored in the arrays.
@@ -126,5 +136,5 @@
   }
 
-  void LpSoplex::_getRowCoeffs(int i, RowIterator b) {
+  void LpSoplex::_getRowCoeffs(int i, RowIterator b) const {
     /// \todo implement
   }
@@ -146,5 +156,5 @@
   }
 
-  void LpSoplex::_getColCoeffs(int i, ColIterator b) {
+  void LpSoplex::_getColCoeffs(int i, ColIterator b) const {
     /// \todo implement
   }
@@ -155,5 +165,5 @@
   }
 
-  LpCplex::Value LpCplex::_getCoeff(int row, int col) 
+  LpCplex::Value LpCplex::_getCoeff(int row, int col) const
   {
     LpCplex::Value value;
@@ -174,5 +184,5 @@
   }
 
-  LpCplex::Value LpCplex::_getColLowerBound(int i)
+  LpCplex::Value LpCplex::_getColLowerBound(int i) const
   {
     LpCplex::Value x;
@@ -192,5 +202,5 @@
   }
 
-  LpCplex::Value LpCplex::_getColUpperBound(int i)
+  LpCplex::Value LpCplex::_getColUpperBound(int i) const
   {
     LpCplex::Value x;
@@ -271,5 +281,5 @@
 //   }
   
-  void LpCplex::_getRowBounds(int i, Value &lb, Value &ub)
+  void LpCplex::_getRowBounds(int i, Value &lb, Value &ub) const
   {
     char sense;
@@ -303,5 +313,5 @@
   }
 
-  LpCplex::Value LpCplex::_getObjCoeff(int i)
+  LpCplex::Value LpCplex::_getObjCoeff(int i) const
   {
     Value x;
@@ -368,5 +378,5 @@
   }
 
-  LpCplex::Value LpCplex::_getPrimal(int i)
+  LpCplex::Value LpCplex::_getPrimal(int i) const
   {
     Value x;
@@ -375,5 +385,5 @@
   }
 
-  LpCplex::Value LpCplex::_getDual(int i)
+  LpCplex::Value LpCplex::_getDual(int i) const
   {
     Value y;
@@ -382,5 +392,5 @@
   }
   
-  LpCplex::Value LpCplex::_getPrimalValue()
+  LpCplex::Value LpCplex::_getPrimalValue() const
   {
     Value objval;
@@ -391,5 +401,6 @@
     return objval;
   }
-  bool LpCplex::_isBasicCol(int i) {
+  bool LpCplex::_isBasicCol(int i) const
+  {
     int cstat[CPXgetnumcols(env, lp)];
     CPXgetbase(env, lp, cstat, NULL);
@@ -459,5 +470,4 @@
 // Description: Method for linear optimization. 
 // Determines which algorithm is used when CPXlpopt() (or "optimize" in the Interactive Optimizer) is called. Currently the behavior of the "Automatic" setting is that CPLEX simply invokes the dual simplex method, but this capability may be expanded in the future so that CPLEX chooses the method based on problem characteristics 
-  //Hulye cplex
   void statusSwitch(CPXENVptr env,int& stat){
 #if CPX_VERSION < 900
@@ -476,5 +486,5 @@
   }
 
-  LpCplex::SolutionStatus LpCplex::_getPrimalStatus()
+  LpCplex::SolutionStatus LpCplex::_getPrimalStatus() const
   {
     //Unboundedness not treated well: the following is from cplex 9.0 doc
@@ -559,5 +569,5 @@
 // CPX_STAT_UNBOUNDED
 
-  LpCplex::SolutionStatus LpCplex::_getDualStatus()
+  LpCplex::SolutionStatus LpCplex::_getDualStatus() const
   {
     int stat = CPXgetstat(env, lp);
@@ -588,5 +598,5 @@
   }
 
-  LpCplex::ProblemTypes LpCplex::_getProblemType()
+  LpCplex::ProblemTypes LpCplex::_getProblemType() const
   {
     int stat = CPXgetstat(env, lp);
@@ -628,5 +638,5 @@
    }
 
-  bool LpCplex::_isMax()
+  bool LpCplex::_isMax() const
   {
     if (CPXgetobjsen(env, lp)==CPX_MAX)
Index: lemon/lp_cplex.h
===================================================================
--- lemon/lp_cplex.h	(revision 2364)
+++ lemon/lp_cplex.h	(revision 2366)
@@ -61,36 +61,37 @@
     virtual void _eraseCol(int i);
     virtual void _eraseRow(int i);
-    virtual void _getColName(int col,       std::string & name);
+    virtual void _getColName(int col, std::string & name) const;
     virtual void _setColName(int col, const std::string & name);
+    virtual int _colByName(const std::string& name) const;
     virtual void _setRowCoeffs(int i, ConstRowIterator b, ConstRowIterator e);
-    virtual void _getRowCoeffs(int i, RowIterator b);
+    virtual void _getRowCoeffs(int i, RowIterator b) const;
     virtual void _setColCoeffs(int i, ConstColIterator b, ConstColIterator e);
-    virtual void _getColCoeffs(int i, ColIterator b);
+    virtual void _getColCoeffs(int i, ColIterator b) const;
     virtual void _setCoeff(int row, int col, Value value);
-    virtual Value _getCoeff(int row, int col);
+    virtual Value _getCoeff(int row, int col) const;
 
     virtual void _setColLowerBound(int i, Value value);
-    virtual Value _getColLowerBound(int i);
+    virtual Value _getColLowerBound(int i) const;
     virtual void _setColUpperBound(int i, Value value);
-    virtual Value _getColUpperBound(int i);
+    virtual Value _getColUpperBound(int i) const;
 
 //     virtual void _setRowLowerBound(int i, Value value);
 //     virtual void _setRowUpperBound(int i, Value value);
     virtual void _setRowBounds(int i, Value lower, Value upper);
-    virtual void _getRowBounds(int i, Value &lb, Value &ub);
+    virtual void _getRowBounds(int i, Value &lb, Value &ub) const;
     virtual void _setObjCoeff(int i, Value obj_coef);
-    virtual Value _getObjCoeff(int i);
+    virtual Value _getObjCoeff(int i) const;
     virtual void _clearObj();
 
     
     virtual SolveExitStatus _solve();
-    virtual Value _getPrimal(int i);
-    virtual Value _getDual(int i);
-    virtual Value _getPrimalValue();
-    virtual bool _isBasicCol(int i);
+    virtual Value _getPrimal(int i) const;
+    virtual Value _getDual(int i) const;
+    virtual Value _getPrimalValue() const;
+    virtual bool _isBasicCol(int i) const;
     
-    virtual SolutionStatus _getPrimalStatus();
-    virtual SolutionStatus _getDualStatus();
-    virtual ProblemTypes _getProblemType();
+    virtual SolutionStatus _getPrimalStatus() const;
+    virtual SolutionStatus _getDualStatus() const;
+    virtual ProblemTypes _getProblemType() const;
 
     
@@ -98,5 +99,5 @@
     virtual void _setMin();
 
-    virtual bool _isMax();
+    virtual bool _isMax() const;
 
   };
Index: lemon/lp_glpk.cc
===================================================================
--- lemon/lp_glpk.cc	(revision 2364)
+++ lemon/lp_glpk.cc	(revision 2366)
@@ -38,4 +38,5 @@
     cols = _lp_bits::LpId(1);
     lp = lpx_create_prob();
+    lpx_create_index(lp);
     ///\todo control function for this:
     lpx_set_int_parm(lp, LPX_K_DUAL, 1);
@@ -113,5 +114,5 @@
   }
 
-  void LpGlpk::_getColName(int col, std::string & name)
+  void LpGlpk::_getColName(int col, std::string & name) const
   {
     
@@ -126,4 +127,11 @@
 
   }
+
+  int LpGlpk::_colByName(const std::string& name) const
+  {
+    int k = lpx_find_col(lp, const_cast<char*>(name.c_str()));
+    return k > 0 ? k : -1; 
+  }
+
   
   void LpGlpk::_setRowCoeffs(int i, ConstRowIterator b, ConstRowIterator e) 
@@ -143,5 +151,5 @@
   }
 
-  void LpGlpk::_getRowCoeffs(int i, RowIterator b) 
+  void LpGlpk::_getRowCoeffs(int i, RowIterator b) const
   {
     int length = lpx_get_mat_row(lp, i, 0, 0);
@@ -174,5 +182,5 @@
   }
 
-  void LpGlpk::_getColCoeffs(int i, ColIterator b) 
+  void LpGlpk::_getColCoeffs(int i, ColIterator b) const
   {
     int length = lpx_get_mat_col(lp, i, 0, 0);
@@ -248,5 +256,5 @@
   }
 
-  LpGlpk::Value LpGlpk::_getCoeff(int row, int col)
+  LpGlpk::Value LpGlpk::_getCoeff(int row, int col) const
   {
 
@@ -313,5 +321,5 @@
   }
 
-  LpGlpk::Value LpGlpk::_getColLowerBound(int i)
+  LpGlpk::Value LpGlpk::_getColLowerBound(int i) const
   {
     int b=lpx_get_col_type(lp, i);
@@ -370,5 +378,5 @@
   }
 
-  LpGlpk::Value LpGlpk::_getColUpperBound(int i)
+  LpGlpk::Value LpGlpk::_getColUpperBound(int i) const
   {
     int b=lpx_get_col_type(lp, i);
@@ -415,5 +423,5 @@
   }
 
-  void LpGlpk::_getRowBounds(int i, Value &lb, Value &ub)
+  void LpGlpk::_getRowBounds(int i, Value &lb, Value &ub) const
   {
 
@@ -445,5 +453,5 @@
   }
 
-  LpGlpk::Value LpGlpk::_getObjCoeff(int i){
+  LpGlpk::Value LpGlpk::_getObjCoeff(int i) const {
     //i=0 means the constant term (shift)
     return lpx_get_obj_coef(lp, i);
@@ -473,24 +481,25 @@
   }
 
-  LpGlpk::Value LpGlpk::_getPrimal(int i)
+  LpGlpk::Value LpGlpk::_getPrimal(int i) const
   {
     return lpx_get_col_prim(lp,i);
   }
 
-  LpGlpk::Value LpGlpk::_getDual(int i)
+  LpGlpk::Value LpGlpk::_getDual(int i) const
   {
     return lpx_get_row_dual(lp,i);
   }
   
-  LpGlpk::Value LpGlpk::_getPrimalValue()
+  LpGlpk::Value LpGlpk::_getPrimalValue() const
   {
     return lpx_get_obj_val(lp);
   }
-  bool LpGlpk::_isBasicCol(int i) {
+  bool LpGlpk::_isBasicCol(int i) const
+  {
     return (lpx_get_col_stat(lp, i)==LPX_BS);
   }
   
  
-  LpGlpk::SolutionStatus LpGlpk::_getPrimalStatus()
+  LpGlpk::SolutionStatus LpGlpk::_getPrimalStatus() const
   {
     int stat=  lpx_get_status(lp);
@@ -513,9 +522,6 @@
   }
 
-  LpGlpk::SolutionStatus LpGlpk::_getDualStatus()
-  {
-//     std::cout<<"Itt megy: "<<lpx_get_dual_stat(lp)<<std::endl;
-//     std::cout<<"Itt a primal: "<<lpx_get_prim_stat(lp)<<std::endl;
-
+  LpGlpk::SolutionStatus LpGlpk::_getDualStatus() const
+  {
     switch (lpx_get_dual_stat(lp)) {
     case LPX_D_UNDEF://Undefined (no solve has been run yet)
@@ -539,5 +545,5 @@
   }
 
-  LpGlpk::ProblemTypes LpGlpk::_getProblemType()
+  LpGlpk::ProblemTypes LpGlpk::_getProblemType() const
   {
       //int stat=  lpx_get_status(lp);
@@ -566,5 +572,5 @@
   }
 
-  bool LpGlpk::_isMax()
+  bool LpGlpk::_isMax() const
   {
     return (lpx_get_obj_dir(lp)==LPX_MAX);
Index: lemon/lp_glpk.h
===================================================================
--- lemon/lp_glpk.h	(revision 2364)
+++ lemon/lp_glpk.h	(revision 2366)
@@ -56,28 +56,24 @@
     virtual void _eraseCol(int i);
     virtual void _eraseRow(int i);
-    virtual void _getColName(int col,       std::string & name);
+    virtual void _getColName(int col, std::string & name) const;
     virtual void _setColName(int col, const std::string & name);
+    virtual int _colByName(const std::string& name) const;
     virtual void _setRowCoeffs(int i, ConstRowIterator b, ConstRowIterator e);
-    virtual void _getRowCoeffs(int i, RowIterator b);
+    virtual void _getRowCoeffs(int i, RowIterator b) const;
     virtual void _setColCoeffs(int i, ConstColIterator b, ConstColIterator e);
-    virtual void _getColCoeffs(int i, ColIterator b);
+    virtual void _getColCoeffs(int i, ColIterator b) const;
     virtual void _setCoeff(int row, int col, Value value);
-    virtual Value _getCoeff(int row, int col);
+    virtual Value _getCoeff(int row, int col) const;
 
     virtual void _setColLowerBound(int i, Value value);
-    virtual Value _getColLowerBound(int i);
+    virtual Value _getColLowerBound(int i) const;
     virtual void _setColUpperBound(int i, Value value);
-    virtual Value _getColUpperBound(int i);
+    virtual Value _getColUpperBound(int i) const;
 
-//     virtual void _setRowLowerBound(int i, Value value);
-//     virtual void _setRowUpperBound(int i, Value value);
     virtual void _setRowBounds(int i, Value lower, Value upper);
-    virtual void _getRowBounds(int i, Value &lb, Value &ub);
+    virtual void _getRowBounds(int i, Value &lb, Value &ub) const;
     virtual void _setObjCoeff(int i, Value obj_coef);
-    virtual Value _getObjCoeff(int i);
+    virtual Value _getObjCoeff(int i) const;
     virtual void _clearObj();
-//     virtual void _setObj(int length,
-//                          int  const * indices, 
-//                          Value  const * values ) = 0;
 
     ///\e
@@ -86,20 +82,20 @@
     ///
     virtual SolveExitStatus _solve();
-    virtual Value _getPrimal(int i);
-    virtual Value _getDual(int i);
-    virtual Value _getPrimalValue();
-    virtual bool _isBasicCol(int i);
+    virtual Value _getPrimal(int i) const;
+    virtual Value _getDual(int i) const;
+    virtual Value _getPrimalValue() const;
+    virtual bool _isBasicCol(int i) const;
     ///\e
     
     ///\todo It should be clarified
     ///
-    virtual SolutionStatus _getPrimalStatus();
-    virtual SolutionStatus _getDualStatus();
-    virtual ProblemTypes _getProblemType();
+    virtual SolutionStatus _getPrimalStatus() const;
+    virtual SolutionStatus _getDualStatus() const;
+    virtual ProblemTypes _getProblemType() const;
 
     virtual void _setMax();
     virtual void _setMin();
 
-    virtual bool _isMax();
+    virtual bool _isMax() const;
 
   public:
Index: lemon/lp_skeleton.cc
===================================================================
--- lemon/lp_skeleton.cc	(revision 2364)
+++ lemon/lp_skeleton.cc	(revision 2366)
@@ -51,5 +51,5 @@
   }
 
-  void LpSkeleton::_getColName(int, std::string &) {
+  void LpSkeleton::_getColName(int, std::string &) const {
   }
   
@@ -57,4 +57,6 @@
   void LpSkeleton::_setColName(int, const std::string &) {
   }
+
+  int LpSkeleton::_colByName(const std::string&) const { return -1; }
   
   
@@ -62,5 +64,5 @@
   }
 
-  void LpSkeleton::_getRowCoeffs(int, RowIterator) {
+  void LpSkeleton::_getRowCoeffs(int, RowIterator) const {
   }
   
@@ -68,5 +70,5 @@
   }
 
-  void LpSkeleton::_getColCoeffs(int, ColIterator) {
+  void LpSkeleton::_getColCoeffs(int, ColIterator) const {
   }
 
@@ -75,5 +77,5 @@
   }
 
-  LpSkeleton::Value LpSkeleton::_getCoeff(int, int)
+  LpSkeleton::Value LpSkeleton::_getCoeff(int, int) const
   {
     return 0;
@@ -85,5 +87,5 @@
   }
   
-  LpSkeleton::Value LpSkeleton::_getColLowerBound(int)
+  LpSkeleton::Value LpSkeleton::_getColLowerBound(int) const
   {
     return 0;
@@ -94,5 +96,5 @@
   }
 
-  LpSkeleton::Value LpSkeleton::_getColUpperBound(int)
+  LpSkeleton::Value LpSkeleton::_getColUpperBound(int) const
   {
     return 0;
@@ -111,5 +113,5 @@
   }
 
-  void LpSkeleton::_getRowBounds(int, Value&, Value&)
+  void LpSkeleton::_getRowBounds(int, Value&, Value&) const
   {
   }
@@ -119,5 +121,6 @@
   }
 
-  LpSkeleton::Value LpSkeleton::_getObjCoeff(int){
+  LpSkeleton::Value LpSkeleton::_getObjCoeff(int) const
+  {
     return 0;
   }
@@ -131,5 +134,5 @@
   }
 
-  bool LpSkeleton::_isMax()
+  bool LpSkeleton::_isMax() const
   {
     return true;
@@ -146,35 +149,35 @@
   }
 
-  LpSkeleton::Value LpSkeleton::_getPrimal(int)
+  LpSkeleton::Value LpSkeleton::_getPrimal(int) const
   {
     return 0;
   }
   
-  LpSkeleton::Value LpSkeleton::_getDual(int)
+  LpSkeleton::Value LpSkeleton::_getDual(int) const
   {
     return 0;
   }
   
-  LpSkeleton::Value LpSkeleton::_getPrimalValue()
+  LpSkeleton::Value LpSkeleton::_getPrimalValue() const
   {
     return 0;
   }
   
-  LpSkeleton::SolutionStatus LpSkeleton::_getPrimalStatus()
+  LpSkeleton::SolutionStatus LpSkeleton::_getPrimalStatus() const
   {
     return UNDEFINED;
   }
 
-  LpSkeleton::SolutionStatus LpSkeleton::_getDualStatus()
+  LpSkeleton::SolutionStatus LpSkeleton::_getDualStatus() const
   {
     return UNDEFINED;
   }
 
-  LpSkeleton::ProblemTypes LpSkeleton::_getProblemType()
+  LpSkeleton::ProblemTypes LpSkeleton::_getProblemType() const
   {
     return UNKNOWN;
   }
 
-  bool LpSkeleton::_isBasicCol(int)
+  bool LpSkeleton::_isBasicCol(int) const
   {
     return true;
Index: lemon/lp_skeleton.h
===================================================================
--- lemon/lp_skeleton.h	(revision 2364)
+++ lemon/lp_skeleton.h	(revision 2366)
@@ -45,16 +45,18 @@
     virtual void _eraseRow(int i);
     /// \e
-    virtual void _getColName(int col, std::string & name);
+    virtual void _getColName(int col, std::string & name) const;
     /// \e
     virtual void _setColName(int col, const std::string & name);
+    /// \e
+    virtual int _colByName(const std::string& name) const;
 
     /// \e
     virtual void _setRowCoeffs(int i, ConstRowIterator b, ConstRowIterator e);
     /// \e
-    virtual void _getRowCoeffs(int i, RowIterator b);
+    virtual void _getRowCoeffs(int i, RowIterator b) const;
     /// \e
     virtual void _setColCoeffs(int i, ConstColIterator b, ConstColIterator e);
     /// \e
-    virtual void _getColCoeffs(int i, ColIterator b);
+    virtual void _getColCoeffs(int i, ColIterator b) const;
     
     /// Set one element of the coefficient matrix
@@ -62,5 +64,5 @@
 
     /// Get one element of the coefficient matrix
-    virtual Value _getCoeff(int row, int col);
+    virtual Value _getCoeff(int row, int col) const;
 
     /// The lower bound of a variable (column) have to be given by an 
@@ -73,5 +75,5 @@
     /// extended number of type Value, i.e. a finite number of type 
     /// Value or -\ref INF.
-    virtual Value _getColLowerBound(int i);
+    virtual Value _getColLowerBound(int i) const;
 
     /// The upper bound of a variable (column) have to be given by an 
@@ -84,5 +86,5 @@
     /// extended number of type Value, i.e. a finite number of type 
     /// Value or \ref INF.
-    virtual Value _getColUpperBound(int i);
+    virtual Value _getColUpperBound(int i) const;
 
 //     /// The lower bound of a linear expression (row) have to be given by an 
@@ -109,5 +111,5 @@
     /// extended numbers of type Value, i.e.  finite numbers of type 
     /// Value, -\ref INF or \ref INF. 
-    virtual void _getRowBounds(int i, Value &lb, Value &ub);
+    virtual void _getRowBounds(int i, Value &lb, Value &ub) const;
     /// \e
 
@@ -119,5 +121,5 @@
 
     /// \e
-    virtual Value _getObjCoeff(int i);
+    virtual Value _getObjCoeff(int i) const;
 
     ///\e
@@ -131,5 +133,5 @@
     ///\bug Wrong interface
     ///
-    virtual Value _getPrimal(int i);
+    virtual Value _getPrimal(int i) const;
 
     ///\e
@@ -137,5 +139,5 @@
     ///\bug Wrong interface
     ///
-    virtual Value _getDual(int i);
+    virtual Value _getDual(int i) const;
 
     ///\e
@@ -143,5 +145,5 @@
     ///\bug Wrong interface
     ///
-    virtual Value _getPrimalValue();
+    virtual Value _getPrimalValue() const;
 
     ///\e
@@ -149,12 +151,12 @@
     ///\bug Wrong interface
     ///
-    virtual SolutionStatus _getPrimalStatus();
+    virtual SolutionStatus _getPrimalStatus() const;
 
     ////e
-    virtual SolutionStatus _getDualStatus();
+    virtual SolutionStatus _getDualStatus() const;
 
 
     ///\e
-    virtual ProblemTypes _getProblemType();
+    virtual ProblemTypes _getProblemType() const;
 
     ///\e
@@ -164,10 +166,10 @@
 
     ///\e
-    virtual bool _isMax();
+    virtual bool _isMax() const;
 
 
 
     ///\e
-    virtual bool _isBasicCol(int i);
+    virtual bool _isBasicCol(int i) const;
 
     
Index: lemon/lp_soplex.cc
===================================================================
--- lemon/lp_soplex.cc	(revision 2364)
+++ lemon/lp_soplex.cc	(revision 2366)
@@ -91,10 +91,24 @@
   }
   
-  void LpSoplex::_getColName(int col, std::string &name) {
+  void LpSoplex::_getColName(int col, std::string &name) const {
     name = colNames[col]; 
   }
   
   void LpSoplex::_setColName(int col, const std::string &name) {
+    invColNames.erase(colNames[col]);
     colNames[col] = name; 
+    if (!name.empty()) {
+      invColNames.insert(std::make_pair(name, col));
+    }
+  }
+
+  int LpSoplex::_colByName(const std::string& name) const {
+    std::map<std::string, int>::const_iterator it =
+      invColNames.find(name);
+    if (it != invColNames.end()) {
+      return it->second;
+    } else {
+      return -1;
+    }
   }
   
@@ -110,5 +124,5 @@
   }
 
-  void LpSoplex::_getRowCoeffs(int i, RowIterator b) {
+  void LpSoplex::_getRowCoeffs(int i, RowIterator b) const {
     const soplex::SVector& vec = soplex->rowVector(i);
     for (int k = 0; k < vec.size(); ++k) {
@@ -128,5 +142,5 @@
   }
 
-  void LpSoplex::_getColCoeffs(int i, ColIterator b) {
+  void LpSoplex::_getColCoeffs(int i, ColIterator b) const {
     const soplex::SVector& vec = soplex->colVector(i);
     for (int k = 0; k < vec.size(); ++k) {
@@ -141,5 +155,5 @@
   }
 
-  LpSoplex::Value LpSoplex::_getCoeff(int i, int j) {
+  LpSoplex::Value LpSoplex::_getCoeff(int i, int j) const {
     return soplex->rowVector(i)[j];
   }
@@ -150,5 +164,5 @@
   }
   
-  LpSoplex::Value LpSoplex::_getColLowerBound(int i) {
+  LpSoplex::Value LpSoplex::_getColLowerBound(int i) const {
     double value = soplex->lower(i);
     return value != -soplex::infinity ? value : -INF;
@@ -160,5 +174,5 @@
   }
 
-  LpSoplex::Value LpSoplex::_getColUpperBound(int i) {
+  LpSoplex::Value LpSoplex::_getColUpperBound(int i) const {
     double value = soplex->upper(i);
     return value != soplex::infinity ? value : INF;
@@ -170,5 +184,5 @@
     solved = false;
   }
-  void LpSoplex::_getRowBounds(int i, Value &lower, Value &upper) {
+  void LpSoplex::_getRowBounds(int i, Value &lower, Value &upper) const {
     lower = soplex->lhs(i);
     if (lower == -soplex::infinity) lower = -INF;
@@ -182,5 +196,5 @@
   }
 
-  LpSoplex::Value LpSoplex::_getObjCoeff(int i) {
+  LpSoplex::Value LpSoplex::_getObjCoeff(int i) const {
     return soplex->obj(i);
   }
@@ -213,21 +227,21 @@
   }
 
-  LpSoplex::Value LpSoplex::_getPrimal(int i) {
+  LpSoplex::Value LpSoplex::_getPrimal(int i) const {
     return primal_value[i];
   }
 
-  LpSoplex::Value LpSoplex::_getDual(int i) {
+  LpSoplex::Value LpSoplex::_getDual(int i) const {
     return dual_value[i];
   }
   
-  LpSoplex::Value LpSoplex::_getPrimalValue() {
+  LpSoplex::Value LpSoplex::_getPrimalValue() const {
     return soplex->objValue();
   }
 
-  bool LpSoplex::_isBasicCol(int i) {
+  bool LpSoplex::_isBasicCol(int i) const {
     return soplex->getBasisColStatus(i) == soplex::SPxSolver::BASIC;
   }  
 
-  LpSoplex::SolutionStatus LpSoplex::_getPrimalStatus() {
+  LpSoplex::SolutionStatus LpSoplex::_getPrimalStatus() const {
     if (!solved) return UNDEFINED;
     switch (soplex->status()) {
@@ -243,5 +257,5 @@
   }
 
-  LpSoplex::SolutionStatus LpSoplex::_getDualStatus() {
+  LpSoplex::SolutionStatus LpSoplex::_getDualStatus() const {
     if (!solved) return UNDEFINED;
     switch (soplex->status()) {
@@ -255,5 +269,5 @@
   }
 
-  LpSoplex::ProblemTypes LpSoplex::_getProblemType() {
+  LpSoplex::ProblemTypes LpSoplex::_getProblemType() const {
     if (!solved) return UNKNOWN;
     switch (soplex->status()) {
@@ -275,5 +289,5 @@
     solved = false;
   }
-  bool LpSoplex::_isMax() {
+  bool LpSoplex::_isMax() const {
     return soplex->spxSense() == soplex::SPxSolver::MAXIMIZE;
   }
Index: lemon/lp_soplex.h
===================================================================
--- lemon/lp_soplex.h	(revision 2364)
+++ lemon/lp_soplex.h	(revision 2366)
@@ -35,7 +35,13 @@
 namespace lemon {
 
+  /// \ingroup gen_opt_group
+  ///
   /// \brief Interface for the SOPLEX solver
   /// 
-  /// This class implements an interface for the SOPLEX LP solver.
+  /// This class implements an interface for the SoPlex LP solver.
+  /// The SoPlex library is an object oriented lp solver library
+  /// developed at the Konrad-Zuse-Zentrum für Informationstechnik
+  /// Berlin (ZIB). You can find detailed information about it at the
+  /// <tt>http://soplex.zib.de</tt> address.
   class LpSoplex :virtual public LpSolverBase {
   protected:
@@ -47,4 +53,5 @@
 
     std::vector<std::string> colNames;
+    std::map<std::string, int> invColNames;
 
     std::vector<Value> primal_value;
@@ -71,36 +78,37 @@
     virtual void _eraseCol(int i);
     virtual void _eraseRow(int i);
-    virtual void _getColName(int col, std::string & name);
+    virtual void _getColName(int col, std::string & name) const;
     virtual void _setColName(int col, const std::string & name);
+    virtual int _colByName(const std::string& name) const;
     virtual void _setRowCoeffs(int i, ConstRowIterator b, ConstRowIterator e);
-    virtual void _getRowCoeffs(int i, RowIterator b);
+    virtual void _getRowCoeffs(int i, RowIterator b) const;
     virtual void _setColCoeffs(int i, ConstColIterator b, ConstColIterator e);
-    virtual void _getColCoeffs(int i, ColIterator b);
+    virtual void _getColCoeffs(int i, ColIterator b) const;
     virtual void _setCoeff(int row, int col, Value value);
-    virtual Value _getCoeff(int row, int col);
+    virtual Value _getCoeff(int row, int col) const;
     virtual void _setColLowerBound(int i, Value value);
-    virtual Value _getColLowerBound(int i);
+    virtual Value _getColLowerBound(int i) const;
     virtual void _setColUpperBound(int i, Value value);
-    virtual Value _getColUpperBound(int i);
+    virtual Value _getColUpperBound(int i) const;
     virtual void _setRowBounds(int i, Value lower, Value upper);
-    virtual void _getRowBounds(int i, Value &lower, Value &upper);
+    virtual void _getRowBounds(int i, Value &lower, Value &upper) const;
     virtual void _setObjCoeff(int i, Value obj_coef);
-    virtual Value _getObjCoeff(int i);
+    virtual Value _getObjCoeff(int i) const;
     virtual void _clearObj();
     
     virtual SolveExitStatus _solve();
-    virtual Value _getPrimal(int i);
-    virtual Value _getDual(int i);
-    virtual Value _getPrimalValue();
-    virtual bool _isBasicCol(int i);
+    virtual Value _getPrimal(int i) const;
+    virtual Value _getDual(int i) const;
+    virtual Value _getPrimalValue() const;
+    virtual bool _isBasicCol(int i) const;
     
-    virtual SolutionStatus _getPrimalStatus();
-    virtual SolutionStatus _getDualStatus();
-    virtual ProblemTypes _getProblemType();
+    virtual SolutionStatus _getPrimalStatus() const;
+    virtual SolutionStatus _getDualStatus() const;
+    virtual ProblemTypes _getProblemType() const;
 
     
     virtual void _setMax();
     virtual void _setMin();
-    virtual bool _isMax();
+    virtual bool _isMax() const;
 
   };
Index: lemon/mip_cplex.cc
===================================================================
--- lemon/mip_cplex.cc	(revision 2267)
+++ lemon/mip_cplex.cc	(revision 2366)
@@ -59,5 +59,5 @@
   }
   
-  MipCplex::ColTypes MipCplex::_colType(int i){
+  MipCplex::ColTypes MipCplex::_colType(int i) const {
     
     char ctype[1];
@@ -86,5 +86,5 @@
 
 
-  LpCplex::SolutionStatus MipCplex::_getMipStatus(){
+  LpCplex::SolutionStatus MipCplex::_getMipStatus() const {
 
     int stat = CPXgetstat(env, lp);
@@ -120,5 +120,5 @@
   }  
 
-  MipCplex::Value MipCplex::_getPrimal(int i){
+  MipCplex::Value MipCplex::_getPrimal(int i) const {
     Value x;
     CPXgetmipx(env, lp, &x, i, i);
@@ -126,5 +126,5 @@
   }
   
-  MipCplex::Value MipCplex::_getPrimalValue(){
+  MipCplex::Value MipCplex::_getPrimalValue() const {
     Value objval;
     status = CPXgetmipobjval(env, lp, &objval);
Index: lemon/mip_cplex.h
===================================================================
--- lemon/mip_cplex.h	(revision 2219)
+++ lemon/mip_cplex.h	(revision 2366)
@@ -48,11 +48,11 @@
   protected:
   
-    virtual ColTypes _colType(int col);
+    virtual ColTypes _colType(int col) const;
     virtual void _colType(int col, ColTypes col_type);
     
     virtual LpCplex::SolveExitStatus _solve();
-    virtual LpCplex::SolutionStatus _getMipStatus();
-    virtual ParentLp::Value _getPrimal(int i);
-    virtual ParentLp::Value _getPrimalValue();
+    virtual LpCplex::SolutionStatus _getMipStatus() const;
+    virtual ParentLp::Value _getPrimal(int i) const;
+    virtual ParentLp::Value _getPrimalValue() const;
   };
 
Index: lemon/mip_glpk.cc
===================================================================
--- lemon/mip_glpk.cc	(revision 2267)
+++ lemon/mip_glpk.cc	(revision 2366)
@@ -41,5 +41,5 @@
   }
   
-  MipGlpk::ColTypes MipGlpk::_colType(int i){
+  MipGlpk::ColTypes MipGlpk::_colType(int i) const {
     switch (lpx_get_col_kind(lp,i)){
     case LPX_IV:
@@ -53,5 +53,5 @@
   }
   
-  LpGlpk::SolveExitStatus MipGlpk::_solve(){
+  LpGlpk::SolveExitStatus MipGlpk::_solve() {
     int result = lpx_simplex(lp);
     //
@@ -72,5 +72,5 @@
 
 
-  LpGlpk::SolutionStatus MipGlpk::_getMipStatus(){
+  LpGlpk::SolutionStatus MipGlpk::_getMipStatus() const {
 
     if (lpx_get_status(lp)==LPX_OPT){
@@ -101,9 +101,9 @@
   }  
 
-  MipGlpk::Value MipGlpk::_getPrimal(int i){
+  MipGlpk::Value MipGlpk::_getPrimal(int i) const {
     return lpx_mip_col_val(lp,i);
   }
   
-  MipGlpk::Value MipGlpk::_getPrimalValue(){
+  MipGlpk::Value MipGlpk::_getPrimalValue() const {
     return lpx_mip_obj_val(lp);
   }
Index: lemon/mip_glpk.h
===================================================================
--- lemon/mip_glpk.h	(revision 2218)
+++ lemon/mip_glpk.h	(revision 2366)
@@ -46,11 +46,11 @@
   protected:
   
-    virtual ColTypes _colType(int col);
+    virtual ColTypes _colType(int col) const;
     virtual void _colType(int col, ColTypes col_type);
     
     virtual LpGlpk::SolveExitStatus _solve();
-    virtual LpGlpk::SolutionStatus _getMipStatus();
-    virtual ParentLp::Value _getPrimal(int i);
-    virtual ParentLp::Value _getPrimalValue();
+    virtual LpGlpk::SolutionStatus _getMipStatus() const;
+    virtual ParentLp::Value _getPrimal(int i) const;
+    virtual ParentLp::Value _getPrimalValue() const;
   };
 
