
Try other rules for speeding up and slowing down. At what point does the flow "break down "? What happens to the flow? Gradually increase DECELERATION while the model runs. Which variable has the greatest effect? Do the patterns make sense? Do they seem to be consistent with your driving experiences? Look for patterns in how these settings affect the traffic flow. In this model there are three sliders that can affect the tendency to create traffic jams: the initial NUMBER-OF-CARS, ACCELERATION, and DECELERATION. This is typical of traffic flow models.Įven though both ACCELERATION and DECELERATION are very small, the cars can achieve high speeds as these values are added or subtracted at each tick. Notice that the default settings have cars decelerating much faster than they accelerate. Notice not only the maximum and minimum, but also the variability - the "jerkiness " of one vehicle.

* the speed of a single car (turtle 0), painted red so it can be watched. * the fastest speed of any car (this doesn' t exceed the speed limit!) The plot shows three values as the model runs: This behavior is common in wave phenomena: the behavior of the group is often very different from the behavior of the individuals that make up the group. If some cars are clustered together, they will move slowly, causing cars behind them to slow down, and a traffic jam forms.Įven though all of the cars are moving forward, the traffic jams tend to move backwards. " These cars start with random positions and random speeds. Traffic jams can start from small "seeds. How much slower it goes than the car in front of it is controlled by the DECELERATION slider.

When a car sees another car right in front, it matches that car's speed and then slows down a bit more. The ACCELERATION slider controls the rate at which cars accelerate (speed up) when there are no cars ahead. Note that they wrap around the world as they move, so the road is like a continuous loop. Set the NUMBER-OF-CARS slider to change the number of cars on the road.Ĭlick on GO to start the cars moving. No "centralized cause " is needed for a traffic jam to form.Ĭlick on the SETUP button to set up the cars. The model demonstrates how traffic jams can form even without any accidents, broken bridges, or overturned trucks. Each car follows a simple set of rules: it slows down (decelerates) if it sees a car close ahead, and speeds up (accelerates) if it doesn' t see a car ahead. This model models the movement of cars on a highway. Ifelse-value any? turtles\n of sample-car ]\n [ 0 WHAT IS IT? "max speed " 1.0 0 - 10899396 true " " "plot max of turtles " "min speed " 1.0 0 - 13345367 true " " "plot min of turtles " slow down so you are driving more slowly than the car ahead of you don't slow down below speed minimum or speed up beyond speed limit Let car-ahead one-of turtles-on patch-ahead 1

if there is a car right ahead of you, match its speed then slow down
#NETLOGO TRAFFIC SIMULATION PATCH#
don't end up with any two cars on the same patch this procedure is needed so when we click "Setup" we set initial speed to be in range 0.1 to 1.0 (world-width + 1) " and press the SETUP button again. "Please decrease the NUMBER-OF-CARS slider to below " "There are too many cars for the amount of road.
