Module map_model::make::traffic_signals [−][src]
Expand description
The various traffic signal generators live in the traffic signal module. Eventually, we might want to move to a trait. For now, there’s a single make_traffic_signal static method in each generator file, which is called to generate a traffic signal of a particular flavor.
For example, lagging_green.rs contains a one public fn:
pub fn make_traffic_signal(map: &Map, i: IntersectionID)->Option
Modules
Constants
Functions
Applies a bunch of heuristics to a single intersection, returning the valid results in best-first order. The signal configuration is only based on the roads connected to the intersection.
Simple second-pass after generating all signals. Find pairs of traffic signals very close to each other with 2 stages each, see if the primary movement of the first stages lead to each other, and flip the order of stages if not. This is often wrong when the most common movement is actually turning left then going straight (near Mercer for example), but not sure how we could know that without demand data.