Index: lemon/concepts/graph_components.h
===================================================================
--- lemon/concepts/graph_components.h	(revision 1175)
+++ lemon/concepts/graph_components.h	(revision 1161)
@@ -109,6 +109,4 @@
 
           bool b;
-          ignore_unused_variable_warning(b);
-
           b = (ia == ib) && (ia != ib);
           b = (ia == INVALID) && (ib != INVALID);
Index: lemon/howard_mmc.h
===================================================================
--- lemon/howard_mmc.h	(revision 1164)
+++ lemon/howard_mmc.h	(revision 1178)
@@ -150,4 +150,21 @@
     typedef TR Traits;
 
+    /// \brief Constants for the causes of search termination.
+    ///
+    /// Enum type containing constants for the different causes of search
+    /// termination. The \ref findCycleMean() function returns one of
+    /// these values.
+    enum TerminationCause {
+      
+      /// No directed cycle can be found in the digraph.
+      NO_CYCLE = 0,
+    
+      /// Optimal solution (minimum cycle mean) is found.
+      OPTIMAL = 1,
+
+      /// The iteration count limit is reached.
+      ITERATION_LIMIT
+    };
+
   private:
 
@@ -325,11 +342,25 @@
     }
 
-    /// \brief Find the minimum cycle mean.
+    /// \brief Find the minimum cycle mean (or an upper bound).
     ///
     /// This function finds the minimum mean cost of the directed
-    /// cycles in the digraph.
-    ///
-    /// \return \c true if a directed cycle exists in the digraph.
-    bool findCycleMean() {
+    /// cycles in the digraph (or an upper bound for it).
+    ///
+    /// By default, the function finds the exact minimum cycle mean,
+    /// but an optional limit can also be specified for the number of
+    /// iterations performed during the search process.
+    /// The return value indicates if the optimal solution is found
+    /// or the iteration limit is reached. In the latter case, an
+    /// approximate solution is provided, which corresponds to a directed
+    /// cycle whose mean cost is relatively small, but not necessarily
+    /// minimal.
+    ///
+    /// \param limit  The maximum allowed number of iterations during
+    /// the search process. Its default value implies that the algorithm 
+    /// runs until it finds the exact optimal solution.
+    ///
+    /// \return The termination cause of the search process.
+    /// For more information, see \ref TerminationCause. 
+    TerminationCause findCycleMean(int limit = std::numeric_limits<int>::max()) {
       // Initialize and find strongly connected components
       init();
@@ -337,11 +368,18 @@
 
       // Find the minimum cycle mean in the components
+      int iter_count = 0;
+      bool iter_limit_reached = false;
       for (int comp = 0; comp < _comp_num; ++comp) {
         // Find the minimum mean cycle in the current component
         if (!buildPolicyGraph(comp)) continue;
         while (true) {
+          if (++iter_count > limit) {
+            iter_limit_reached = true;
+            break;
+          }
           findPolicyCycle();
           if (!computeNodeDistances()) break;
         }
+
         // Update the best cycle (global minimum mean cycle)
         if ( _curr_found && (!_best_found ||
@@ -352,6 +390,13 @@
           _best_node = _curr_node;
         }
-      }
-      return _best_found;
+        
+        if (iter_limit_reached) break;
+      }
+
+      if (iter_limit_reached) {
+        return ITERATION_LIMIT;
+      } else {
+        return _best_found ? OPTIMAL : NO_CYCLE;
+      }
     }
 
Index: test/bellman_ford_test.cc
===================================================================
--- test/bellman_ford_test.cc	(revision 1174)
+++ test/bellman_ford_test.cc	(revision 1160)
@@ -66,8 +66,6 @@
   Arc e;
   Value l;
-  ignore_unused_variable_warning(l);
   int k=3;
   bool b;
-  ignore_unused_variable_warning(b);
   BF::DistMap d(gr);
   BF::PredMap p(gr);
@@ -150,6 +148,4 @@
   Digraph g;
   bool b;
-  ignore_unused_variable_warning(b);
-
   bellmanFord(g,LengthMap()).run(Node());
   b = bellmanFord(g,LengthMap()).run(Node(),Node());
Index: test/bfs_test.cc
===================================================================
--- test/bfs_test.cc	(revision 1173)
+++ test/bfs_test.cc	(revision 956)
@@ -62,5 +62,4 @@
   Arc e;
   int l, i;
-  ignore_unused_variable_warning(l,i);
   bool b;
   BType::DistMap d(G);
@@ -152,6 +151,4 @@
   Digraph g;
   bool b;
-  ignore_unused_variable_warning(b);
-
   bfs(g).run(Node());
   b=bfs(g).run(Node(),Node());
Index: test/circulation_test.cc
===================================================================
--- test/circulation_test.cc	(revision 1173)
+++ test/circulation_test.cc	(revision 956)
@@ -74,5 +74,4 @@
   VType v;
   bool b;
-  ignore_unused_variable_warning(v,b);
 
   typedef Circulation<Digraph, CapMap, CapMap, SupplyMap>
Index: test/dfs_test.cc
===================================================================
--- test/dfs_test.cc	(revision 1176)
+++ test/dfs_test.cc	(revision 1111)
@@ -68,6 +68,4 @@
   int l, i;
   bool b;
-  ignore_unused_variable_warning(l,i,b);
-
   DType::DistMap d(G);
   DType::PredMap p(G);
@@ -154,6 +152,4 @@
   Digraph g;
   bool b;
-  ignore_unused_variable_warning(b);
-
   dfs(g).run(Node());
   b=dfs(g).run(Node(),Node());
Index: test/dijkstra_test.cc
===================================================================
--- test/dijkstra_test.cc	(revision 1173)
+++ test/dijkstra_test.cc	(revision 956)
@@ -66,6 +66,4 @@
   int i;
   bool b;
-  ignore_unused_variable_warning(l,i,b);
-
   DType::DistMap d(G);
   DType::PredMap p(G);
@@ -165,6 +163,4 @@
   Digraph g;
   bool b;
-  ignore_unused_variable_warning(b);
-
   dijkstra(g,LengthMap()).run(Node());
   b=dijkstra(g,LengthMap()).run(Node(),Node());
Index: test/gomory_hu_test.cc
===================================================================
--- test/gomory_hu_test.cc	(revision 1173)
+++ test/gomory_hu_test.cc	(revision 956)
@@ -69,5 +69,4 @@
   Value v;
   int d;
-  ignore_unused_variable_warning(v,d);
 
   GomoryHu<Graph, CapMap> gh_test(g, cap);
Index: test/hao_orlin_test.cc
===================================================================
--- test/hao_orlin_test.cc	(revision 1173)
+++ test/hao_orlin_test.cc	(revision 956)
@@ -67,5 +67,4 @@
   CutMap cut;
   Value v;
-  ignore_unused_variable_warning(v);
 
   HaoOrlin<Digraph, CapMap> ho_test(g, cap);
Index: test/matching_test.cc
===================================================================
--- test/matching_test.cc	(revision 1173)
+++ test/matching_test.cc	(revision 956)
@@ -146,5 +146,4 @@
   MaxMatching<Graph>::Status stat =
     const_mat_test.status(n);
-  ignore_unused_variable_warning(stat);
   const MaxMatching<Graph>::StatusMap& smap =
     const_mat_test.statusMap();
Index: test/min_cost_arborescence_test.cc
===================================================================
--- test/min_cost_arborescence_test.cc	(revision 1173)
+++ test/min_cost_arborescence_test.cc	(revision 956)
@@ -92,5 +92,4 @@
   VType c;
   bool b;
-  ignore_unused_variable_warning(c,b);
   int i;
   CostMap cost;
Index: test/min_mean_cycle_test.cc
===================================================================
--- test/min_mean_cycle_test.cc	(revision 956)
+++ test/min_mean_cycle_test.cc	(revision 1178)
@@ -111,5 +111,5 @@
                  int cost, int size) {
   MMC alg(gr, lm);
-  alg.findCycleMean();
+  check(alg.findCycleMean(), "Wrong result");
   check(alg.cycleMean() == static_cast<double>(cost) / size,
         "Wrong cycle mean");
@@ -211,4 +211,11 @@
     checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l3, c3,  0, 1);
     checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l4, c4, -1, 1);
+    
+    // Howard with iteration limit
+    HowardMmc<GR, IntArcMap> mmc(gr, l1);
+    check((mmc.findCycleMean(2) == HowardMmc<GR, IntArcMap>::ITERATION_LIMIT),
+      "Wrong termination cause");
+    check((mmc.findCycleMean(4) == HowardMmc<GR, IntArcMap>::OPTIMAL),
+      "Wrong termination cause");
   }
 
Index: test/nagamochi_ibaraki_test.cc
===================================================================
--- test/nagamochi_ibaraki_test.cc	(revision 1177)
+++ test/nagamochi_ibaraki_test.cc	(revision 1017)
@@ -66,5 +66,4 @@
   Value v;
   bool b;
-  ignore_unused_variable_warning(v,b);
 
   NagamochiIbaraki<Graph, CapMap> ni_test(g, cap);
Index: test/preflow_test.cc
===================================================================
--- test/preflow_test.cc	(revision 1173)
+++ test/preflow_test.cc	(revision 1029)
@@ -87,5 +87,4 @@
   VType v;
   bool b;
-  ignore_unused_variable_warning(v,b);
 
   typedef Preflow<Digraph, CapMap>
Index: test/suurballe_test.cc
===================================================================
--- test/suurballe_test.cc	(revision 1173)
+++ test/suurballe_test.cc	(revision 956)
@@ -118,6 +118,4 @@
   int f;
   VType c;
-  ignore_unused_variable_warning(f,c);
-
   c = const_suurb_test.totalLength();
   f = const_suurb_test.flow(e);
