Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

How to design a traffic control system

Anjali Sharma answered on January 15, 2023 Popularity 5/10 Helpfulness 1/10

Contents


More Related Answers

  • website traffic
  • Design a Traffic Controller System for a Junction?
  • Develop a traffic management system using Java

  • How to design a traffic control system

    0

    Here are my thoughts based on what I have seen in real life.

    But one thing I have seen in real life that we don't have here is: traffic lights at adjacent intersections working together.

    In general there are 4 states that the intersection can be in, and we can cycle through them in order.

    The states are:

    A) vertical (top to bottom or bottom to top) traffic, including pedestrian traffic

    B) left turn from horizontal to vertical (also allows horizontal U-turns)

    C) horizontal traffic, including pedestrian traffic

    D) left turn from vertical to horizontal (also allows vertical U-turns)

    There are also intermediate states if we want to get more complicated. In state B we are allowing two left turns: left-to-up and right-to-down. We might decide to stop the left-to-up traffic (in order to allow right-to-left traffic) but keep the right-to-down traffic going. So this is a state between B and C.

    How long to stay in each state? We need all of these criteria to be met in order to be done with the state:

    We can leave state A when all the cars have gone through, and X seconds have passed*, and the pedestrian time has passed (only applies if a pedestrian pressed the button)

    We can leave state B when all the cars have gone through

    We can leave state C when all the cars have gone through, and Y seconds have passed*, and the pedestrian time has passed (only applies if a pedestrian pressed the button)

    We can leave state D when all the cars have gone through

    *Example X and Y calculations:

    X = 60 seconds during rush hour, 20 seconds otherwise

    Y = 10 seconds

    We could also put a time limit on each state.

    In my drawing I show the 4 states. Black = the main flow. Blue = right turn traffic that is always allowed. Brown lines = pedestrian traffic.

    https://github.com/Skullbash27/trafficemgmt/tree/master/Traffic%20Management

    Popularity 5/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Jan 15 2023
    Anjali Sharma
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.