pub fn make_traffic_signal(
    map: &Map,
    i: &Intersection
) -> Option<ControlTrafficSignal>
Expand description

Create a traffic signal which has a stage that is: protected straight, protected right, unprotected left, unprotected right on red. Followed by a variable stage that has protected left, unprotected right on red. With a last stage that is all-walk and variable. In some degenerate cases, usually with one or more one-way, this can reduce to stage per road. In some rare cases, usually with an alleyway, oncoming lanes can’t both be protected left turns. In such cases the stage is split into two stages with each having a protected and yield turn.