Index: src/lemon/utility.h
===================================================================
--- src/lemon/utility.h	(revision 1164)
+++ src/lemon/utility.h	(revision 1256)
@@ -57,5 +57,7 @@
   };
 
+  /**************** dummy class to avoid ambiguity ****************/
 
+  template<int T> struct dummy { dummy(int) {} };
 
   /**************** enable_if from BOOST ****************/
Index: src/work/athos/lp/Makefile
===================================================================
--- src/work/athos/lp/Makefile	(revision 1254)
+++ src/work/athos/lp/Makefile	(revision 1256)
@@ -2,4 +2,7 @@
 
 all: lp_test
+
+clean:
+	rm lp_test *.o
 
 lp_base.o: lp_base.cc lp_base.h lin_expr.h
Index: src/work/athos/lp/lp_base.cc
===================================================================
--- src/work/athos/lp/lp_base.cc	(revision 1253)
+++ src/work/athos/lp/lp_base.cc	(revision 1256)
@@ -20,5 +20,7 @@
 #include "lp_base.h"
 namespace lemon {
-
+  
+  const LpSolverBase::Value
+  LpSolverBase::INF = std::numeric_limits<Value>::infinity();
 
 
Index: src/work/athos/lp/lp_base.h
===================================================================
--- src/work/athos/lp/lp_base.h	(revision 1253)
+++ src/work/athos/lp/lp_base.h	(revision 1256)
@@ -19,6 +19,9 @@
 
 #include<vector>
-
+#include<limits>
+
+#include<lemon/utility.h>
 #include<lemon/error.h>
+#include<lemon/invalid.h>
 
 #include"lin_expr.h"
@@ -66,4 +69,5 @@
 	  first_free=next;
 	}
+	return cross[n];
       }
       else throw LogicError(); //floatingId-s must form a continuous range;
@@ -97,13 +101,54 @@
   public:
 
-    /// \e
+    ///The floating point type used by the solver
     typedef double Value;
-    /// \e 
+    ///The infinity constant
     static const Value INF;
     
-    ///\e
-    class Col { protected: int id; friend class LpSolverBase; };
-    ///\e
-    class Row { protected: int id; friend class LpSolverBase; };
+    ///Refer to a column of the LP.
+
+    ///This type is used to refer to a column of the LP.
+    ///
+    ///Its value remains valid and correct even after the addition or erase of
+    ///new column (unless the referred column itself was also deleted,
+    ///of course).
+    ///
+    ///\todo Document what can one do with a Col (INVALID, comparing,
+    ///it is similar to Node/Edge)
+    class Col {
+    protected:
+      int id;
+      friend class LpSolverBase;
+    public:
+      typedef True LpSolverCol;
+      Col() {}
+      Col(const Invalid&) : id(-1) {}
+      bool operator<(Col c) const  {return id<c.id;}
+      bool operator==(Col c) const  {return id==c.id;}
+      bool operator!=(Col c) const  {return id==c.id;}
+    };
+
+    ///Refer to a row of the LP.
+
+    ///This type is used to refer to a row of the LP.
+    ///
+    ///Its value remains valid and correct even after the addition or erase of
+    ///new rows (unless the referred row itself was also deleted, of course).
+    ///
+    ///\todo Document what can one do with a Row (INVALID, comparing,
+    ///it is similar to Node/Edge)
+    class Row {
+    protected:
+      int id;
+      friend class LpSolverBase;
+    public:
+      typedef True LpSolverRow;
+      Row() {}
+      Row(const Invalid&) : id(-1) {}
+      typedef True LpSolverRow;
+      bool operator<(Row c) const  {return id<c.id;}
+      bool operator==(Row c) const  {return id==c.id;}
+      bool operator!=(Row c) const  {return id==c.id;} 
+   };
 
     typedef SparseLinExpr<Col, Value> Expr;
@@ -176,4 +221,42 @@
     ///Add a new empty column (i.e a new variable) to the LP
     Col addCol() { Col c; c.id=cols.insert(_addCol()); return c;}
+    ///\brief Fill the elements of a container with newly created columns
+    ///(i.e a new variables)
+    ///
+    ///This magic function takes container as its argument
+    ///and fills its elements
+    ///with new columns (i.e. variables)
+    ///\param t can be either any standard STL iterable container with
+    ///\ref Col \c values_type or \c mapped_type
+    ///like <tt>std::vector<LpSolverBase::Col></tt>,
+    /// <tt>std::list<LpSolverBase::Col></tt> or
+    /// <tt>std::map<AnyType,LpSolverBase::Col></tt> or
+    ///it can be an iterable lemon map like 
+    /// <tt>ListGraph::NodeMap<LpSolverBase::Col></tt>.
+    ///\return The number of the created column.
+    ///\bug Iterable nodemap hasn't been implemented yet.
+#ifdef DOXYGEN
+    template<class T>
+    int addColSet(T &t) { return 0;} 
+#else
+    template<class T>
+    typename enable_if<typename T::value_type::LpSolverCol,int>::type
+    addColSet(T &t,dummy<0> = 0) {
+      int s=0;
+      for(typename T::iterator i=t.begin();i!=t.end();++i) {*i=addCol();s++;}
+      return s;
+    }
+    template<class T>
+    typename enable_if<typename T::value_type::second_type::LpSolverCol,
+		       int>::type
+    addColSet(T &t,dummy<1> = 1) { 
+      int s=0;
+      for(typename T::iterator i=t.begin();i!=t.end();++i) {
+	i->second=addCol();
+	s++;
+      }
+      return s;
+    }
+#endif
     ///Add a new empty row (i.e a new constaint) to the LP
     Row addRow() { Row r; r.id=rows.insert(_addRow()); return r;}
@@ -192,12 +275,13 @@
       indices.push_back(0);
       values.push_back(0);
-      for(Expr::iterator i=e.begin(); i!=e.end(); ++i) {
-	indices.push_back(cols.floatingId((*i).first.id));
-	values.push_back((*i).second);
-      }
+      for(Expr::iterator i=e.begin(); i!=e.end(); ++i)
+	if((*i).second!=0) { ///\bug EPSILON would be necessary here!!!
+	  indices.push_back(cols.floatingId((*i).first.id));
+	  values.push_back((*i).second);
+	}
       _setRowCoeffs(rows.floatingId(r.id),indices.size()-1,
 		    &indices[0],&values[0]);
-      _setRowLowerBound(rows.floatingId(r.id),l);
-      _setRowUpperBound(rows.floatingId(r.id),l);
+      _setRowLowerBound(rows.floatingId(r.id),l-e.constComp());
+      _setRowUpperBound(rows.floatingId(r.id),u-e.constComp());
       return r;
     }
Index: src/work/athos/lp/lp_test.cc
===================================================================
--- src/work/athos/lp/lp_test.cc	(revision 1254)
+++ src/work/athos/lp/lp_test.cc	(revision 1256)
@@ -5,4 +5,29 @@
 int main()
 {
-  LpSolverSkeleton lp;
+  typedef LpSolverSkeleton LP;
+  LP lp;
+
+  std::vector<LP::Col> x;
+  for(int i=0;i<10;i++) x.push_back(lp.addCol());
+
+  std::vector<LP::Col> y(10);
+  lp.addColSet(y);
+
+  std::map<int,LP::Col> z;
+  
+  z.insert(std::make_pair(12,INVALID));
+  z.insert(std::make_pair(2,INVALID));
+  z.insert(std::make_pair(7,INVALID));
+  z.insert(std::make_pair(5,INVALID));
+  
+  lp.addColSet(z);
+
+
+  LP::Expr e;
+  e[x[3]]=2;
+  e[x[3]]=4;
+  e[x[3]]=1;
+  e.constComp()=12;
+  lp.addRow(LP::INF,e,23);
+
 }
