== Highway Model Design == First draft of data structure for representing a highway network that can model traffic congestion. [[Image(intersection_sketch.jpg)]] '''Highway''' (as shown in sketch) is a highway name and a list of LDS's (Lane Detector Stations). '''Intersection''' is a postmile number and a cross street identifier. '''Junction Map''' is a data structure to model highway intersections (junctions), A map that associates highways to the cross streets that intersect them. '''Example Map''' Hwy 123: [(17, Hwy 456), (54, Hwy 789)][[BR]] Hwy 456: [(93, Hwy 123), (117, Hwy 10A)][[BR]] Hwy 789: [(22, Hwy 123)][[BR]] In the example Hwy 123 has two cross streets: Hwy 456 at postmile 17 and later at postmile 54 it crosses Hwy 789. == Simulating Congestion == 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. Pro: Simple concept, needs only the data structures above. Con: In a very large network performance would be slow. Alternative 2. Maintain a "state" that knows the current extent of congestion and can quickly identify next LDS to be changed. Pro: Better performance. Con: Additional data structures needed. 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.