Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/09/12 16:20:19 (12 years ago)
Author:
spimming
Message:

#1894:

  • calculate distance in kilometers for two locations
  • generate IGraph from a datasource
  • adapted test program
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Graph/OsmGraph.cs

    r8434 r8462  
    7171    public float GetWeight(Way edge, OsmVertex<Node> source, OsmVertex<Node> target) {
    7272      double distance = Utils.Distance(source.Node.Point, target.Node.Point);
     73      //double distance = Utils.LocationDistance(source.Node.Point, target.Node.Point);
    7374      int speed = edge.GetMaxSpeed();
    7475      double weight = (distance / speed) * 3.6;
     76      //double weight = (distance / speed);
    7577      return (float)weight;
    7678    }
     
    8486    public float EstimatedCosts(OsmVertex<Node> source, OsmVertex<Node> target) {
    8587      double distance = Utils.Distance(source.Node.Point, target.Node.Point);
     88      //double distance = Utils.LocationDistance(source.Node.Point, target.Node.Point);
    8689      int speed = 130;
    8790      double costs = (distance / speed) * 3.6;
     91      //double costs = (distance / speed);
    8892      return (float)costs;
    8993    }
Note: See TracChangeset for help on using the changeset viewer.