Skip to main content

Science of Everyday Materials-4/4/2022: 1. Nagel-Schrekenberg model of traffic

Science of Everyday Materials-4/4/2022
1. Nagel-Schrekenberg model of traffic
    • Notifications
    • Privacy
  • Project HomeScience of Everyday Materials
  • Projects
  • Learn more about Manifold

Notes

Show the following:

  • Annotations
  • Resources
Search within:

Adjust appearance:

  • font
    Font style
  • color scheme
  • Margins
table of contents
  1. 1. Lengthscales in everyday materials
    1. 1. Building blocks at tiny lengthscales
    2. 2. Building blocks at intermediate lengthscales
    3. 3. Building blocks at large lengthscales
    4. 4. Example Problems
    5. 5. Additional Resources
    6. 6. Slides
    7. 7. Lab Activities
  2. 2. Forces-Why somethings stick together but others do not
    1. 1. Newton's laws of forces
    2. 2. The force of gravity
    3. 3. The electromagnetic force
    4. 4. The weak and strong nuclear forces
    5. 5. Example Problems
    6. 6. Additional Resources
    7. 7. Slides
    8. 8. Lab Activities
  3. 3. What are materials made of?
    1. 1.Elements and the periodic table
    2. 2.Electric charges
    3. 3. Chemical bonds
    4. 4. Phases of matter
    5. 5. Example problems
    6. 6. Slides
    7. 7. Lab Activities
  4. 4. What do gases have to do with energetic toddlers?
    1. 1. Gases
    2. 2. Absolute zero
    3. 3. Volume
    4. 4. Pressure
    5. 5. Energy
    6. 6. Temperature
    7. 7. Ideal gas law
    8. 8. Example problems
    9. 9. Slides
    10. 10. Lab Activities
  5. 5. Solids and springs
    1. 1. What are solids made of?
    2. 2. Why do atoms in solids stick together?
    3. 3. Solids and springs
    4. 4. What happens when you connect multiple springs?
    5. 5. The emergence of elasticity from atomic springs
    6. 6. Slides
    7. 7. Lab Activities
  6. 6. Liquids and viscosity
    1. 1. Solids, liquids, whats the difference??
    2. 2. Shear stress
    3. 3. Strain rate
    4. 4. Viscosity
    5. 5. Viscosity and elasticity
    6. 6. Slides
  7. 7. Solid or liquid?
    1. 1. The world's longest running experiment
    2. 2. Is it possible to run on a liquid?
    3. 3. Is ketchup solid or liquid?
    4. 4. Spring and dashpot models
    5. 5. Slides
    6. 6. Lab Activities
  8. 8. Soap bubbles and surface tension
    1. 1. Why do soap bubbles form?
    2. 2. Inside a soap bubble
    3. 3. Why are soap bubbles spherical?
    4. 4. Slides
    5. 5. Lab Activities
  9. 9. Life Essentials
    1. 1. The importance of Carbon
    2. 2. What do Hydrogen and Oxygen make?
  10. 10. The science behind traffic jams
    1. 1. Nagel-Schrekenberg model of traffic
    2. 2. Space-time plots to visualize traffic jams
    3. 3. What is the origin of traffic jams?
    4. 4. Traffic jams in the real world
  11. Appendix. Math Essentials
    1. 1. Units
    2. 2. Scientific notation
    3. 3. Slopes and plotting

Simulation of Nagel-Schrekenberg model of traffic at density 0.35 and p=0.3. Colors indicate vehicle speed | Skanda Vivek

Ever been stuck in traffic and thought - if others drove better I wouldn't be here? German physicists Kai Nagel and Michael Schreckenberg came up with a fundamental breakthrough in understanding and modeling the emergence traffic jams. It turns out, traffic jams are not isolated events, in fact they are extremely predictable.

Nagel-Schrekenberg model of traffic

In the Nagel-Schrekenberg model, cars are simulated as discrete objects on a grid of cells. At every time step, vehicle positions are updated according to 4 simple rules:

  1. Speed limit: All vehicles drive at speeds between 0 and the speed limit. In the original paper the speed limit is '5', so vehicles drive between 0 and 5.
  2. Acceleration to speed limit: At every time step, vehicle speeds are updated to their current speed +1, as long as it is below the speed limit.
  3. Slowing down if too close to the vehicle in front: If a vehicle is going to crash into the vehicle in front giv en its current speed, it is slowed down so as to not crash. For example, say at time t, a vehicle is 3 cells away from the vehicle in front of it and it's current velocity is 4. The velocity of the vehicle is slowed down to 2 so that it moves only a distance 2 cells from time t to time t+1, so as to not overlap with the vehicle in front (not cause an accident).
  4. Random slowing: At every time step, a vehicle reduces its velocity by 1 with a certain probability, p. If p=0.5, then every vehicle has a 50% chance of slowing down at every timestep. In this case if the velocity is 3, it is reduced to 2, 50% of the time. This represents the human imperfection aspect, that nucleates traffic jams.

In the video, you see vehicles moving to the right and jams nucleating (patches of red vehicles) combined with bursts of fast moving vehicles (green). This captures stop-and-go traffic jams. Density of 0.35 denotes that 35% of cells are occupied by vehicles. If you have a 100 cell grid, that means 35 of them are filled with vehicles.

Space-time plots to visualize traffic jams

Space-time diagram for Nagel-Schrekenberg model with density 0.35 and p=0.3 | Skanda Vivek

A common way to visualize traffic flow is a space-time plot. Dark black regions illustrate vehicle density waves. The negative slope shows that an initially upstream traffic jam that originates at time t=0 propagates downstream at later times. E.g. the jam originating at position 80 affects position 30 at t=100.

What is the origin of traffic jams?

Velocity vs Density for Nagel-Schrekenberg model with p=0.3 | Skanda Vivek

As the number of vehicles increases, velocity reduces. Above around density of 0.2, there is a sharp decrease in velocity. This is because at density of 0.2, the average spacing between each vehicle is 1/0.2=5. Why is the number 5 familiar? It's because 5 is the maximum possible speed! Hence above that density, vehicles start to feel the effects of the vehicle in front, and need to slow down in response.

Flux vs Density for Nagel-Schrekenberg model with p=0.3 | Skanda Vivek

The flux density plot is another great way to understand the point at which traffic jams emerge. Flux measures the number of vehicles per time that pass through a given point, (vehicle throughput). Its basically the sum of velocities for all vehicles within a certain distance. At low densities, every vehicle is basically traveling at the speed limit so flux increases linearly with density. However at larger densities, vehicles can't travel at the speed limit and at a certain point (here density = 0.2), the effect of larger number of vehicles is countered by each vehicle traveling at a smaller speed, resulting in a reduced flux. There's an optimal vehicle density (number of vehicle per distance), which maximizes vehicle throughput.

Traffic jams in the real world

The Nagel-Schrekenberg model is great in that it captures key features of traffic. But what do these plots look like in the real-world? And how do they translate to real distances and speeds? On June 15th, 2005 researchers for the NGSIM program collected detailed vehicle trajectory data on southbound US 101, also known as the Hollywood Freeway, in LA.

Space-time plot from vehicle trajectories as part of the NGSIM project | Plot by Skanda Vivek

The space time plots show the distinct waves associated with traffic jams. Similar to the Nagel-Schrekenberg model, a jam initially nucleated at 0.5 km upstream eventually makes it downstream to 0.1 km after 100 seconds or so.

Data from vehicle trajectories as part of the NGSIM project | Plot by Skanda Vivek

The flux-density plot from vehicle trajectory data looks pretty similar to the Nagel-Schrekenberg plots. However you see the units are different. In the real world, flux starts to drop down at density around 30 vehicles/km/lane. Why is that point special? A quick back of the envelope calculation shows that 30 vehicles/km/lane corresponds to 1000/30=33 m between every vehicle on average. A vehicle traveling at 65 mph (30 m/s), has 33/30 seconds -  essentially a second to reach the vehicle in front. If for some reason the person in front were to suddenly stop, you have a second to react. Vehicles start to slow down at a density of 30 vehicles/km/lane as it corresponds to 1 second to react to the vehicle in front (driving at 65 mph or 29 m/s).

In conclusion, traffic jams emerge as a consequence of imperfect human driving. The most important of these are the tendency to drive noisily - sometimes someone stops for no reason or does not drive optimally. The other reason is that we have a finite reaction time which makes us stay apart from the driver in front (usually one second away). Once there are too many vehicles on the road, we get uncomfortably close to the vehicle in front and don't drive as we would on a free stretch of highway. The next time you feel X - city would have improved traffic if people just drove better, take a good look at the human in the mirror :)

For updates, please subscribe below.

Annotate

Next Chapter
1. Units
PreviousNext
This text is licensed under a CC BY 4.0 license.
Powered by Manifold Scholarship. Learn more at
Opens in new tab or windowmanifoldapp.org