- Timestamp:
- 08/21/12 15:53:54 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Graph/Graph.cs
r8512 r8514 142 142 143 143 public float GetWeight(Edge<Vertex> edge) { 144 double distance = Utils.Distance(edge.Source.Logitude, edge.Source.Latitude, 145 edge.Target.Logitude, edge.Target.Latitude); 146 //double distance = Utils.LocationDistance(source.Node.Point, target.Node.Point); 144 //double distance = Utils.Distance(edge.Source.Logitude, edge.Source.Latitude, 145 // edge.Target.Logitude, edge.Target.Latitude); 146 147 PointD s = new PointD(edge.Source.Logitude, edge.Source.Latitude); 148 PointD t = new PointD(edge.Target.Logitude, edge.Target.Latitude); 149 double distance = Utils.LocationDistance(s, t); 150 147 151 int speed = edge.GetMaxSpeed(); 152 double weight = (distance / speed) * 60; 148 153 //double weight = (distance / speed) * 3.6; 149 double weight = (distance / speed); 154 //double weight = (distance / speed); 155 //double weight = distance; 150 156 return (float)weight; 151 157 } … … 158 164 159 165 public float EstimatedCosts(Vertex source, Vertex target) { 160 double distance = Utils.Distance(source.Logitude, source.Latitude, 161 target.Logitude, target.Latitude); 162 //double distance = Utils.LocationDistance(source.Node.Point, target.Node.Point); 163 int speed = 10; 166 //double distance = Utils.Distance(source.Logitude, source.Latitude, 167 // target.Logitude, target.Latitude); 168 169 PointD s = new PointD(source.Logitude, source.Latitude); 170 PointD t = new PointD(target.Logitude, target.Latitude); 171 double distance = Utils.LocationDistance(s, t); 172 173 //int speed = 130; 174 //int speed = 10; 175 int speed = 1; 176 double costs = (distance / speed) * 60; 164 177 //double costs = (distance / speed) * 3.6; 165 double costs = (distance / speed); 178 //double costs = (distance / speed); 179 //double costs = distance; 166 180 return (float)costs; 167 181 }
Note: See TracChangeset
for help on using the changeset viewer.