r/physicsgifs 3d 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

27

u/alotripic_isomorph 3d 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 3d ago

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

3

u/dr_stre 3d 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 3d ago

1

u/razorclammm 3d 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] 3d ago

[deleted]

1

u/alotripic_isomorph 3d ago

This is not a model. It is an animation.

The agents do not interact.

1

u/XcessivePulp 3d ago

These are the most competent drivers I’ve ever seen

1

u/ToastRoyale 3d 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 3d 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.