Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning.Test/Program.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning.Test/Program.cs	(revision 8504)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning.Test/Program.cs	(revision 8509)
@@ -1,6 +1,8 @@
 ﻿
 using System;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
+using System.Linq;
 using System.Xml;
 using HeuristicLab.Algorithms.GraphRouting;
@@ -28,19 +30,21 @@
 
       //IDataSource ds = TestLoad(typeof(XmlDataSource), file7);
-      IDataSource ds = TestLoad(typeof(OsmDataSource), file5);
-      OsmGraph graph = new OsmGraph(ds);
+      IDataSource ds = TestLoad(typeof(OsmDataSource), file6);
+      //OsmGraph graph = new OsmGraph(ds);
+
       //IGraph graphNew = TestGetRoutingGraph(ds);
+      //ExecuteBenchmark(graphNew, typeof(AStarAlgorithmV3), 2048, 1000);
 
       //IDataSource ds = new DIMACSDataSource(fileNYCoords, fileNYArcs);
       //IDataSource ds = new OsmDataSource(file5);
 
-      TestRouter(new DijkstraAlgorithm(graph), 529102170, 1001363194, true);
+      //TestRouter(new DijkstraAlgorithm(graph), 529102170, 1001363194, true);
       //TestRouter(new DijkstraAlgorithmV2(graphNew), 529102170, 1001363194, true);
-      TestRouter(new DijkstraAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
+      //TestRouter(new DijkstraAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
       //TestRouter(new DijkstraAlgorithmV2(graphNew), 529102170, 31372732, false); // inz - hgb
-      TestRouter(new BidrectionalDijkstraAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
+      //TestRouter(new BidrectionalDijkstraAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
       //TestRouter(new BidrectionalDijkstraAlgorithmV2(graphNew), 529102170, 31372732, false); // inz - hgb
       //TestRouter(new AStarAlgorithm(graph), 529102170, 31372732, false); // inz - hgb
-      TestRouter(new AStarAlgorithmV2(graph), 529102170, 31372732, false); // inz - hgb
+      //TestRouter(new AStarAlgorithmV2(graph), 529102170, 31372732, false); // inz - hgb
       //TestRouter(new AStarAlgorithmV3(graphNew), 529102170, 31372732, false); // inz - hgb
 
@@ -73,5 +77,5 @@
       //TestLoadAndRouterNew(file7, typeof(AStarAlgorithmV3), 346151602, 33196510, false, true); // bregenz (bahnhofstr) - wien (stepansplatz)
 
-      TestLoadAndRouter(file8, typeof(AStarAlgorithmV2), 32044987, 261576106, false, true);    //vorarblberg
+      //TestLoadAndRouter(file8, typeof(AStarAlgorithmV2), 32044987, 261576106, false, true);    //vorarblberg
 
       System.Console.Read();
@@ -299,4 +303,65 @@
       return graph;
     }
+
+    private static List<Tuple<long, long>> GenerateSourceTargetPairs(IGraph graph, int locality, int noOfPairs) {
+      List<Tuple<long, long>> benchmarkPairs = new List<Tuple<long, long>>();
+      Random r = new Random();
+      DijkstraAlgorithmV2 dijkstra = new DijkstraAlgorithmV2(graph);
+      int vertexCount = graph.GetVertices().Count;
+
+      for (int i = 0; i < noOfPairs; i++) {
+        long startId = r.Next();
+        Vertex s = graph.GetVertex(startId);
+
+        while (s == null) {
+          startId = r.Next();
+          s = graph.GetVertex(startId);
+        }
+        long targetId = dijkstra.GetNodeIdWithRank(s.Id, locality);
+        Tuple<long, long> t = new Tuple<long, long>(startId, targetId);
+        benchmarkPairs.Add(t);
+      }
+      return benchmarkPairs;
+    }
+
+    private static void ExecuteBenchmark(IGraph graph, Type routerType, int locality, int noOfQueries) {
+      Console.WriteLine("Benchmark Routing Algrithm BEGIN ------------------");
+      Stopwatch sw;
+      IRouter router = (IRouter)Activator.CreateInstance(routerType, graph);
+
+      Console.Write("Generate queries ... ");
+      List<Tuple<long, long>> queries = GenerateSourceTargetPairs(graph, locality, noOfQueries);
+      Console.WriteLine("done.");
+
+      Console.Write("Execute benchmark ... ");
+      List<TimeSpan> times = new List<TimeSpan>(noOfQueries);
+      foreach (Tuple<long, long> pair in queries) {
+        sw = Stopwatch.StartNew();
+        long[] result = router.Calculate(pair.Item1, pair.Item2);
+        sw.Stop();
+        times.Add(sw.Elapsed);
+      }
+      Console.WriteLine("done.\n");
+
+      Console.WriteLine("Results:");
+      PrintStatistics(times);
+
+      Console.WriteLine("===================================================");
+    }
+
+    private static void PrintStatistics(List<TimeSpan> times) {
+      long averageTicks = Convert.ToInt64(times.Average(timeSpan => timeSpan.Ticks));
+      TimeSpan avg = new TimeSpan(averageTicks);
+      TimeSpan min = times.Min();
+      TimeSpan max = times.Max();
+      TimeSpan total = times.Aggregate(TimeSpan.Zero, (sum, value) => sum.Add(value));
+
+      Console.WriteLine("Min:\t" + min);
+      Console.WriteLine("Max:\t" + max);
+      Console.WriteLine("Avg:\t" + avg);
+      Console.WriteLine("Total:\t" + total);
+      Console.WriteLine("Count:\t" + times.Count);
+
+    }
   }
 }
