Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/EarthDistanceCostCalculator.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/EarthDistanceCostCalculator.cs	(revision 8516)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/EarthDistanceCostCalculator.cs	(revision 8520)
@@ -1,9 +1,8 @@
-﻿using System;
+﻿using HeuristicLab.Problems.RoutePlanning.Data.Core;
 using HeuristicLab.Problems.RoutePlanning.Interfaces;
+using HeuristicLab.Problems.RoutePlanning.Utilities;
 
 namespace HeuristicLab.Problems.RoutePlanning.RoutingGraph {
   public class EarthDistanceCostCalculator : ICostCalculator {
-    private const double earthMeanRadius = 6371.0 * 1000.0;
-
     #region ICostCalculator Members
 
@@ -12,29 +11,19 @@
     }
 
+    public float CalculateCosts(Vertex source, Vertex destination, HighwayType category) {
+      double distanceKms = Utils.LocationDistance(source.Logitude, source.Latitude,
+                                            destination.Logitude, destination.Latitude);
+      double weight = distanceKms;
+      return (float)weight;
+    }
+
     public float EstimatedCosts(Vertex source, Vertex destination) {
-      return (float)EarthDistance(source.Logitude, source.Latitude, destination.Logitude, destination.Latitude);
+      double distanceKms = Utils.LocationDistance(source.Logitude, source.Latitude,
+                                            destination.Logitude, destination.Latitude);
+      double weight = distanceKms;
+      return (float)weight;
     }
 
     #endregion
-
-    private double DegToRad(double alpha) {
-      return alpha * Math.PI / 180;
-    }
-
-    private double AngularDistance(double startLon, double startLat, double endLon, double endLat) {
-      double lat1 = DegToRad(startLat);
-      double lat2 = DegToRad(endLat);
-      double long1 = DegToRad(startLon);
-      double long2 = DegToRad(endLat);
-
-      double x = Math.Sin(lat1) * Math.Sin(lat2) + Math.Cos(lat1) * Math.Cos(lat2) * Math.Cos(long1 - long2);
-      x = Math.Min(1, Math.Max(0, x));
-
-      return Math.Acos(x);
-    }
-
-    private double EarthDistance(double startLon, double startLat, double endLon, double endLat) {
-      return earthMeanRadius * AngularDistance(startLon, startLat, endLon, endLat);
-    }
   }
 }
Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/Edge.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/Edge.cs	(revision 8516)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/Edge.cs	(revision 8520)
@@ -13,9 +13,9 @@
     }
 
-    private short category;
-    public short Category {
-      get { return category; }
-      set { category = value; }
-    }
+    //private short category;
+    //public short Category {
+    //  get { return category; }
+    //  set { category = value; }
+    //}
 
     private float weight;
@@ -30,8 +30,8 @@
     }
 
-    public Edge(Vertex source, Vertex target, short category) {
+    public Edge(Vertex source, Vertex target, float weight) {
       this.source = source;
       this.target = target;
-      this.category = category;
+      this.weight = weight;
     }
 
@@ -51,62 +51,4 @@
       return source.GetHashCode() ^ target.GetHashCode();
     }
-
-    public int GetMaxSpeed() {
-      int speed = 0;
-
-      //TODO: 
-      switch (category) {
-        case 23:
-        case 17:
-        case 18:
-        case 22:
-        case 21:
-        case 24:
-        case 16:
-        case 20:
-        case 15:
-        case 12:
-        case 0:
-          speed = 1;
-          break;
-
-        case 11:
-        case 14:
-          speed = 15;
-          break;
-
-        case 19:
-          speed = 30;
-          break;
-
-        case 9:
-        case 10:
-        case 7:
-        case 8:
-          speed = 80;
-          break;
-
-        case 13:
-          speed = 50;
-          break;
-
-        case 3:
-        case 4:
-        case 5:
-        case 6:
-          speed = 100;
-          break;
-
-        case 1:
-        case 2:
-          speed = 130;
-          break;
-
-        default:
-          speed = 1;
-          break;
-      }
-      return speed;
-    }
   }
 }
Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/Graph.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/Graph.cs	(revision 8516)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/Graph.cs	(revision 8520)
@@ -3,5 +3,4 @@
 using System.Collections.Generic;
 using HeuristicLab.Problems.RoutePlanning.Interfaces;
-using HeuristicLab.Problems.RoutePlanning.Utilities;
 namespace HeuristicLab.Problems.RoutePlanning.RoutingGraph {
   public class Graph : IGraph {
@@ -126,6 +125,7 @@
       foreach (Edge<Vertex> edge in edges) {
         // TODO: check if edge can be traversed (eg. highway tag for car roads, ...)
-        float weight = GetWeight(edge); // TODO:  edge.Weight?
-        neighbors[edge.Target.Id] = weight;
+        //float weight = GetWeight(edge); // TODO:  edge.Weight?
+        //neighbors[edge.Target.Id] = weight;
+        neighbors[edge.Target.Id] = edge.Weight;
       }
       return neighbors;
@@ -136,49 +136,51 @@
       foreach (Edge<Vertex> edge in edges) {
         // TODO: check if edge can be traversed (eg. highway tag for car roads, ...)
-        float weight = GetWeight(edge); // TODO:  edge.Weight?
-        neighbors[edge.Source.Id] = weight;
+        //float weight = GetWeight(edge); // TODO:  edge.Weight?
+        //neighbors[edge.Source.Id] = weight;
+        neighbors[edge.Source.Id] = edge.Weight;
       }
       return neighbors;
     }
 
-    public float GetWeight(Edge<Vertex> edge) {
-      //double distance = Utils.Distance(edge.Source.Logitude, edge.Source.Latitude,
-      //                                 edge.Target.Logitude, edge.Target.Latitude);
+    //public float GetWeight(Edge<Vertex> edge) {
+    //  //double distance = Utils.Distance(edge.Source.Logitude, edge.Source.Latitude,
+    //  //                                 edge.Target.Logitude, edge.Target.Latitude);
 
-      PointD s = new PointD(edge.Source.Logitude, edge.Source.Latitude);
-      PointD t = new PointD(edge.Target.Logitude, edge.Target.Latitude);
-      double distance = Utils.LocationDistance(s, t);
+    //  PointD s = new PointD(edge.Source.Logitude, edge.Source.Latitude);
+    //  PointD t = new PointD(edge.Target.Logitude, edge.Target.Latitude);
+    //  double distance = Utils.LocationDistance(s, t);
 
-      int speed = edge.GetMaxSpeed();
-      double weight = (distance / speed) * 60;
-      //double weight = (distance / speed) * 3.6;
-      //double weight = (distance / speed);
-      //double weight = distance;
-      return (float)weight;
-    }
+    //  //int speed = edge.GetMaxSpeed();
+    //  //double weight = (distance / speed) * 60;
+    //  //double weight = (distance / speed) * 3.6;
+    //  //double weight = (distance / speed);
+    //  //double weight = distance;
+    //  //return (float)weight;
+    //  return (float)1;
+    //}
 
-    public float EstimatedCosts(long sourceId, long targetId) {
-      Vertex source = GetVertex(sourceId);
-      Vertex target = GetVertex(targetId);
-      return EstimatedCosts(source, target);
-    }
+    //public float EstimatedCosts(long sourceId, long targetId) {
+    //  Vertex source = GetVertex(sourceId);
+    //  Vertex target = GetVertex(targetId);
+    //  return EstimatedCosts(source, target);
+    //}
 
-    public float EstimatedCosts(Vertex source, Vertex target) {
-      //double distance = Utils.Distance(source.Logitude, source.Latitude,
-      //                                 target.Logitude, target.Latitude);
+    //public float EstimatedCosts(Vertex source, Vertex target) {
+    //  //double distance = Utils.Distance(source.Logitude, source.Latitude,
+    //  //                                 target.Logitude, target.Latitude);
 
-      PointD s = new PointD(source.Logitude, source.Latitude);
-      PointD t = new PointD(target.Logitude, target.Latitude);
-      double distance = Utils.LocationDistance(s, t);
+    //  PointD s = new PointD(source.Logitude, source.Latitude);
+    //  PointD t = new PointD(target.Logitude, target.Latitude);
+    //  double distance = Utils.LocationDistance(s, t);
 
-      //int speed = 130;
-      //int speed = 10;
-      int speed = 130;
-      double costs = (distance / speed) * 60;
-      //double costs = (distance / speed) * 3.6;
-      //double costs = (distance / speed);
-      //double costs = distance;
-      return (float)costs;
-    }
+    //  //int speed = 130;
+    //  //int speed = 10;
+    //  int speed = 130;
+    //  double costs = (distance / speed) * 60;
+    //  //double costs = (distance / speed) * 3.6;
+    //  //double costs = (distance / speed);
+    //  //double costs = distance;
+    //  return (float)costs;
+    //}
   }
 }
Index: branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/TravelTimeCostCalculator.cs
===================================================================
--- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/TravelTimeCostCalculator.cs	(revision 8516)
+++ branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/TravelTimeCostCalculator.cs	(revision 8520)
@@ -1,3 +1,4 @@
 ﻿
+using HeuristicLab.Problems.RoutePlanning.Data.Core;
 using HeuristicLab.Problems.RoutePlanning.Interfaces;
 using HeuristicLab.Problems.RoutePlanning.Utilities;
@@ -7,21 +8,149 @@
 
     public float Costs(Edge<Vertex> edge) {
-      double distance = Utils.Distance(edge.Source.Logitude, edge.Source.Latitude,
-                                       edge.Target.Logitude, edge.Target.Latitude);
+      //double distance = Utils.Distance(edge.Source.Logitude, edge.Source.Latitude,
+      //                                 edge.Target.Logitude, edge.Target.Latitude);
       //double distance = Utils.LocationDistance(source.Node.Point, target.Node.Point);
-      int speed = edge.GetMaxSpeed();
-      double weight = (distance / speed) * 3.6;
+      //int speed = edge.GetMaxSpeed();
+      //double weight = (distance / speed) * 3.6;
       //double weight = (distance / speed);
+      //return (float)1;
+      return edge.Weight;
+    }
+
+    public float CalculateCosts(Vertex source, Vertex destination, HighwayType category) {
+      double distanceKms = Utils.Distance(source.Logitude, source.Latitude,
+                                          destination.Logitude, destination.Latitude);
+      int speedKmH = GetMaxSpeed(category);
+      double weight = (distanceKms / speedKmH) * 60;
       return (float)weight;
     }
 
     public float EstimatedCosts(Vertex source, Vertex destination) {
-      double distance = Utils.Distance(source.Logitude, source.Latitude,
-                                       destination.Logitude, destination.Latitude);
+      //double distance = Utils.Distance(source.Logitude, source.Latitude,
+      //                                 destination.Logitude, destination.Latitude);
       //double distance = Utils.LocationDistance(source.Node.Point, target.Node.Point);
-      int speed = 130;
-      double costs = (distance / speed) * 3.6;
+      int speedKmH = 130;
+      //double costs = (distance / speed) * 3.6;
       //double costs = (distance / speed);
-      return (float)costs;
+      //return (float)costs;
+      double distanceKms = Utils.Distance(source.Logitude, source.Latitude,
+                                          destination.Logitude, destination.Latitude);
+      double weight = (distanceKms / speedKmH) * 60;
+      return (float)weight;
+    }
+
+    private int GetMaxSpeed(short category) {
+      int speed = 0;
+
+      //TODO: 
+      switch (category) {
+        case 23:
+        case 17:
+        case 18:
+        case 22:
+        case 21:
+        case 24:
+        case 16:
+        case 20:
+        case 15:
+        case 12:
+        case 0:
+          speed = 1;
+          break;
+
+        case 11:
+        case 14:
+          speed = 15;
+          break;
+
+        case 19:
+          speed = 30;
+          break;
+
+        case 9:
+        case 10:
+        case 7:
+        case 8:
+          speed = 80;
+          break;
+
+        case 13:
+          speed = 50;
+          break;
+
+        case 3:
+        case 4:
+        case 5:
+        case 6:
+          speed = 100;
+          break;
+
+        case 1:
+        case 2:
+          speed = 130;
+          break;
+
+        default:
+          speed = 1;
+          break;
+      }
+      return speed;
+    }
+
+    public int GetMaxSpeed(HighwayType ht) {
+      int speed = 0;
+
+      //TODO: 
+      switch (ht) {
+        case HighwayType.bridleway:
+        case HighwayType.bus_guideway:
+        case HighwayType.raceway:
+        case HighwayType.cycleway:
+        case HighwayType.footway:
+        case HighwayType.steps:
+        case HighwayType.null_type:
+          speed = 1;
+          break;
+
+        case HighwayType.path:
+        case HighwayType.service:
+        case HighwayType.pedestrian:
+        case HighwayType.living_street:
+          speed = 15;
+          break;
+
+        case HighwayType.road:
+        case HighwayType.track:
+          speed = 30;
+          break;
+
+        case HighwayType.tertiary:
+        case HighwayType.tertiary_link:
+        case HighwayType.secondary:
+        case HighwayType.secondary_link:
+          speed = 80;
+          break;
+
+        case HighwayType.unclassified:
+        case HighwayType.residential:
+          speed = 50;
+          break;
+
+        case HighwayType.trunk:
+        case HighwayType.trunk_link:
+        case HighwayType.primary:
+        case HighwayType.primary_link:
+          speed = 100;
+          break;
+        case HighwayType.motorway:
+        case HighwayType.motorway_link:
+          speed = 130;
+          break;
+
+        default:
+          speed = 1;
+          break;
+      }
+      return speed;
     }
 
