Changeset 8520 for branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/Edge.cs
- Timestamp:
- 08/22/12 19:14:33 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/RoutingGraph/Edge.cs
r8516 r8520 13 13 } 14 14 15 private short category;16 public short Category {17 get { return category; }18 set { category = value; }19 }15 //private short category; 16 //public short Category { 17 // get { return category; } 18 // set { category = value; } 19 //} 20 20 21 21 private float weight; … … 30 30 } 31 31 32 public Edge(Vertex source, Vertex target, short category) {32 public Edge(Vertex source, Vertex target, float weight) { 33 33 this.source = source; 34 34 this.target = target; 35 this. category = category;35 this.weight = weight; 36 36 } 37 37 … … 51 51 return source.GetHashCode() ^ target.GetHashCode(); 52 52 } 53 54 public int GetMaxSpeed() {55 int speed = 0;56 57 //TODO:58 switch (category) {59 case 23:60 case 17:61 case 18:62 case 22:63 case 21:64 case 24:65 case 16:66 case 20:67 case 15:68 case 12:69 case 0:70 speed = 1;71 break;72 73 case 11:74 case 14:75 speed = 15;76 break;77 78 case 19:79 speed = 30;80 break;81 82 case 9:83 case 10:84 case 7:85 case 8:86 speed = 80;87 break;88 89 case 13:90 speed = 50;91 break;92 93 case 3:94 case 4:95 case 5:96 case 6:97 speed = 100;98 break;99 100 case 1:101 case 2:102 speed = 130;103 break;104 105 default:106 speed = 1;107 break;108 }109 return speed;110 }111 53 } 112 54 }
Note: See TracChangeset
for help on using the changeset viewer.