| | 5 | [[Image(intersection_sketch.jpg)]] |
| | 6 | |
| | 7 | |
| | 8 | '''Highway''' (as shown in sketch) is a highway name and a list of LDS's (Lane Detector Stations). |
| | 9 | |
| | 10 | '''Intersection''' is a postmile number and a cross street identifier. |
| | 11 | |
| | 12 | '''Junction Map''' is a data structure to model highway intersections (junctions), |
| | 13 | A map that associates highways to the cross streets that intersect them. |
| | 14 | |
| | 15 | |
| | 16 | '''Example Map''' |
| | 17 | |
| | 18 | Hwy 123: [(17, Hwy 456), (54, Hwy 789)][[BR]] |
| | 19 | |
| | 20 | Hwy 456: [(93, Hwy 123), (117, Hwy 10A)][[BR]] |
| | 21 | |
| | 22 | Hwy 789: [(22, Hwy 123)][[BR]] |
| | 23 | |
| | 24 | |
| | 25 | In the example Hwy 123 has two cross streets: Hwy 456 at postmile 17 and later at postmile 54 it crosses Hwy 789. |
| | 26 | |
| | 27 | |
| | 28 | == Simulating Congestion == |
| | 29 | |
| | 30 | Alternative 1. Every 30 seconds traverse the network from the incident origin point to find the next LDS that is unaffected, then change its state. |
| | 31 | Pro: Simple concept, needs only the data structures above. |
| | 32 | Con: In a very large network performance would be slow. |
| | 33 | |
| | 34 | Alternative 2. Maintain a "state" that knows the current extent of congestion and can quickly identify next LDS to be changed. |
| | 35 | Pro: Better performance. |
| | 36 | Con: Additional data structures needed. |
| | 37 | |
| | 38 | Decision: We prefer alternative 1. We don't expect out network to be large enough for performance to be a factor. Even a list of thousands of LDS could be traversed in a second and we have 30 second intervals between ATMS updates. |
| | 39 | |
| | 40 | |
| | 41 | |