Changeset 8423
- Timestamp:
- 08/07/12 10:52:01 (12 years ago)
- Location:
- branches/RoutePlanning
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RoutePlanning/HeuristicLab.Algorithms.GraphRouting/3.3/HeuristicLab.Algorithms.GraphRouting.csproj
r8408 r8423 59 59 <Compile Include="AStarAlgorithm.cs" /> 60 60 <Compile Include="AStarAlgorithmV2.cs" /> 61 <Compile Include="BidirectionalDijkstraAlgorithm.cs" /> 61 62 <Compile Include="DijkstraAlgorithm.cs" /> 62 63 <Compile Include="GraphRoutingAlgorithm.cs" /> -
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning.Test/Program.cs
r8408 r8423 26 26 //Test(file6, 529102170, 1001363194, true, false); // inz - inz 27 27 28 IDataSource ds = TestLoad(file6);29 Graph.Graph graph = new Graph.Graph(ds);30 TestRouter(new AStarAlgorithm(graph), 529102170, 31372732, false); // inz - hgb31 TestRouter(new AStarAlgorithmV2(graph), 529102170, 31372732, false); // inz - hgb28 //IDataSource ds = TestLoad(file6); 29 //Graph.Graph graph = new Graph.Graph(ds); 30 //TestRouter(new AStarAlgorithm(graph), 529102170, 31372732, false); // inz - hgb 31 //TestRouter(new AStarAlgorithmV2(graph), 529102170, 31372732, false); // inz - hgb 32 32 33 33 //TestLoadAndRouter(file6, typeof(DijkstraAlgorithm), 529102170, 31372732, false, false); // inz - hgb 34 34 //TestLoadAndRouter(file6, typeof(AStarAlgorithm), 529102170, 31372732, false, false); // inz - hgb 35 35 //TestLoadAndRouter(file6, typeof(AStarAlgorithmV2), 529102170, 31372732, false, false); // inz - hgb 36 37 //TestLoadAndRouter(file5, typeof(DijkstraAlgorithm), 529102170, 1001363194, true, false); 38 //TestLoadAndRouter(file5, typeof(BidrectionalDijkstraAlgorithm), 529102170, 1001363194, true, true); 39 TestLoadAndRouter(file6, typeof(BidrectionalDijkstraAlgorithm), 529102170, 31372732, false, true); // inz - hgb 36 40 37 41 System.Console.Read(); -
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Graph/Graph.cs
r8408 r8423 35 35 foreach (Vertex<Node> neighbor in vertices) { 36 36 if (edge.CanBeTraversed(vertex.Node, neighbor.Node)) { 37 float weight = GetWeight(edge, vertex, neighbor); 38 neighbors[neighbor.Node.Id] = weight; 39 } 40 } 41 } 42 return neighbors; 43 } 44 45 public Dictionary<long, float> GetNeighborsReversed(long id) { 46 Vertex<Node> vertex = GetVertex(id); 47 Dictionary<long, float> neighbors = new Dictionary<long, float>(); 48 List<Way> edges = GetEdges(vertex); 49 foreach (Way edge in edges) { 50 List<Vertex<Node>> vertices = GetNeighborVerticesOnEdge(edge, vertex); 51 foreach (Vertex<Node> neighbor in vertices) { 52 if (edge.CanBeTraversed(neighbor.Node, vertex.Node)) { 37 53 float weight = GetWeight(edge, vertex, neighbor); 38 54 neighbors[neighbor.Node.Id] = weight; -
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/TagConstants.cs
r8369 r8423 3 3 public class TagConstants { 4 4 public const string HighwayTagKey = "highway"; 5 public const string JunctionTagKey = "junction"; 5 6 public const string OneWayTag = "oneway"; 7 public const string RoundaboutValue = "roundabout"; 6 8 public const string YesValue = "yes"; 9 public const string TrueValue = "true"; 7 10 } 8 11 } -
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm/Way.cs
r8408 r8423 73 73 if (base.Tags.ContainsKey(TagConstants.OneWayTag)) { 74 74 string value = base.Tags[TagConstants.OneWayTag]; 75 return value.Equals(TagConstants.YesValue); 75 return value.Equals(TagConstants.YesValue) || value.Equals(TagConstants.TrueValue); 76 } else if (base.Tags.ContainsKey(TagConstants.JunctionTagKey)) { 77 string value = base.Tags[TagConstants.JunctionTagKey]; 78 return value.Equals(TagConstants.RoundaboutValue); 76 79 } else { 77 80 return false;
Note: See TracChangeset
for help on using the changeset viewer.