Question: Traffic flow Simulation A major application of simulation is in modeling the traffic flow in large cities, in order to test different traffic light patterns
Traffic flow Simulation A major application of simulation is in modeling the traffic flow in large cities, in order to test different traffic light patterns before inflicting them on the real traffic. In this example we look at a very small part of the problem: how to simulate the flow of a single line of traffic through one set of traffic lights. We make the following assumptions (you can make additional or different ones if you like): 1. Traffic travels straight, without turning. 2. The probability of a car arriving at the lights in a particular second is independent of what happened during the previous second. This is called a Poisson process. This probability (call it p) may be estimated by watching cars at the intersection and monitoring their arrival pattern. In this simulation we take p = 0.3. 3. When the lights are green, assume the cars move through at a steady rate of, say, eight every ten seconds. 4. In the simulation, we will take the basic time period to be ten seconds, so we want a display showing the length of the queue of traffic (if any) at the lights every ten seconds. 5. We will set
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
