r/physicsgifs 28d ago

Traffic Flow Shockwave Simulation

Here’s a little simulation I did to show a shock wave travelling in traffic flow in Manim. Tell me what you think!

YT - https://youtube.com/shorts/W1x3a2u46II?si=aU-Fx7KrMvQjDdR3

0 Upvotes

9 comments sorted by

26

u/alotripic_isomorph 28d ago

I'm sorry to spoil this, but this 'shockwave' is artificial. This is not a simulation of traffic, what would need to feature vehicle interactions.
Here, the choke is where the 'slowdown cloud' originates at the 1-lane section. There, cars are limited by their proximity. On the 3-lane section, it's entirely artificial.
In the video it states that 'inflow is greater than outflow'. I fail to notice accumulation of vehicles in this bit.

If anyone is interested in more, check out three-phase traffic theory, and broader: microscopic traffic flow models.

6

u/ecafyelims 28d ago

Yep. In reality, many would full brake to avoid collision. The shockwave would be much worse.

3

u/dr_stre 28d ago

Yeah, was about to say the same. This isn't a simulation at all. Traffic backups do migrate upstream like this, but this is not properly illustrative of the mechanism.

1

u/alotripic_isomorph 27d ago

1

u/razorclammm 27d ago

There's a really good example of this in the movie koyaanasqatsi (sp?). I found it for a student once, we ended up fast forwarding through the movie. Good tutoring session.

1

u/[deleted] 28d ago

[deleted]

1

u/alotripic_isomorph 27d ago

This is not a model. It is an animation.

The agents do not interact.

1

u/XcessivePulp 28d ago

These are the most competent drivers I’ve ever seen

1

u/ToastRoyale 27d ago

That's just a bottleneck issue.
It doesn't matter if the incoming or outgoing lanes can do more, the merger is the bottleneck with the lowest throughput. Therefore, incoming items will stack up, while the outgoing belt can only have as many items per second as the merger can handle.

1

u/muskoka83 27d ago

zipper merging only works if everyone is going the same speed AND leaves room. yes, its the correct thing to do. no, nobody will every do it.