
Why Do Buses Bunch? - elliekelly
http://setosa.io/bus/
======
brian_cloutier
I enjoyed the callout to this when I was reading Google's Percolator paper a
few years ago:

> The random-scanning approach requires one additional tweak: when it was
> first deployed we noticed that scanning threads would tend to clump together
> in a few regions of the table, effectively reducing the parallelism of the
> scan. This phenomenon is commonly seen in public transportation systems
> where it is known as “platooning” or “bus clumping” and occurs when a bus is
> slowed down (perhaps by traffic or slow loading). Since the number of
> passengers at each stop grows with time, loading delays become even worse,
> further slowing the bus. Simultaneously, any bus behind the slow bus speeds
> up as it needs to load fewer passengers at each stop. The result is a clump
> of buses arriving simultaneously at a stop [19]. Our scanning threads
> behaved analogously: a thread that was running observers slowed down while
> threads “behind” it quickly skipped past the now-clean rows to clump with
> the lead thread and failed to pass the lead thread because the clump of
> threads overloaded tablet servers. To solve this problem, we modified our
> system in a way that public transportation systems cannot: when a scanning
> thread discovers that it is scanning the same row as another thread, it
> chooses a new random location in the table to scan. To further the
> transportation analogy, the buses (scanner threads) in our city avoid
> clumping by teleporting themselves to a random stop (location in the table)
> if they get too close to the bus in front of them.

From here:
[https://ai.google/research/pubs/pub36726](https://ai.google/research/pubs/pub36726)

~~~
zhte415
> To further the transportation analogy, the buses (scanner threads) in our
> city avoid clumping by teleporting themselves to a random stop (location in
> the table) if they get too close to the bus in front of them.

Subway trains do this "to regulate service" iirc is the term used on the
London Underground.

Takt time［1］and Drum Buffer Rope［2］both related concepts of regulating flow
through a process/system.

［1］
[https://en.m.wikipedia.org/wiki/Takt_time](https://en.m.wikipedia.org/wiki/Takt_time)

［2］
[https://en.m.wikipedia.org/wiki/Theory_of_constraints](https://en.m.wikipedia.org/wiki/Theory_of_constraints)

~~~
icebraining
London subway trains teleport themselves?

~~~
joncrocks
No they don't. When you hear "to regulate the service" what they actually do
in my experience is delay trains to try and introduce a more even service.

So if you have trains that are:

|--|--|--|------------|--|

Then they will delay some of the trains such that it becomes:

\---|--|--|--|--------|----|

i.e. reduce the speed of the lead trains to try and reduce bunching.

So generally if you hear "to regulate the service" it means you're in for a
longer journey than normal.

I believe there are passing points along the tracks, I don't think they can be
used to leapfrog, and there's no such thing as "express" services.

~~~
mcv
I've often felt that maybe the front bus should skip a few stops, but
unfortunately, the fuller a bus is, the bigger the chance that someone has to
get out at every stop, and that means people are going to get in at every stop
too.

Maybe the empty rear bus should overtake the front bus, but that's not always
possible.

Teleporting to a random stop would be really annoying for people who had to
get out at the next stop. That's only an acceptable solution when the bus is
completely empty.

~~~
theluketaylor
When I was growing up in Calgary when buses bunched the lead bus would linger
at a stop specifically so the other buses could pass and even out the
ridership.

The transit system even employed this on purpose at busy times since Calgary
is such a suburban city. It's fairly rare in the morning for people to need to
get off until a major intersection or light rail station. Buses were sent in
pairs (sometimes three) to run the same route, leapfrogging each other at
every stop. If someone did ask for a stop the driver would radio ahead and the
lead bus would skip the stop. Taking the bus route at a leapfrog time really
did cut the journey time down significantly. The technique doesn't work quite
as well coming home since you can't predict when people will need to get off.

------
adrianmonk
Would it help to have the trailing bus pass the leading bus when they bunch
up?

My reasoning:

(1) As the article said, full buses move slower because more passengers means
more boarding/unboarding time at stops.

(2) The lead bus is the fuller, slower one. Slower bus in front means buses
get closer together.

(3) If one bus passes the other, then you have the faster bus in front and the
slower one behind. They should then get further apart.

At least they should for a time. The now-leading bus is going to scoop up a
lot of passengers at the next several stops and the now-trailing bus won't, so
the leading bus will eventually slow down. So it's not perfectly self-
balancing or anything, but maybe it would get some distance between them. More
distance than not doing it.

~~~
kuldeep_kap
You are forgetting people who would want to get off that stop, so this is may
not be an option.

~~~
userbinator
The bus in front will have more people, and more likely to stop to let people
off (and on).

Meanwhile, the one following behind will be emptier, and thus less likely to
need to stop, meaning it can easily pass the one in front (while that one is
at a stop for entering/exiting passengers) and then itself take on more
passengers at the stops ahead --- which then gradually slows it down too, but
at the same time the one behind will be mostly emptying.

I'd say it is reasonably self-balancing.

~~~
dalore
Wouldn't that mean when the bus overtakes it's now taking more passengers and
therefore slowing down. The bus it just overtook (which would have quite a few
passengers) is now speeding up (but also having to drop off passengers,
possibly even stopping at the same stops the previous bus just stopped at.

So it just adds more bunching, doesn't fix anything.

If the bus that overtakes doesn't stop at the next stop but overtakes several
stops (or until a passenger needs to get off but should be rare as emptier
then the bus it overtook). And then start from there.

Someone mentioned this solution but called it random teleport.

------
caymanjim
This is very common in Manhattan. Whenever I saw a full bus, I'd skip it and
wait for the next one, because it was almost certainly going to come along
within 5 minutes and be pleasantly uncrowded. On a busy route, it's the
sensible choice.

On longer-distance commuter routes, where the scheduled times are 30-60
minutes apart, I wouldn't usually take a chance on waiting for the next one,
but I even did that on occasion when a bus was particularly-overcrowded.

~~~
tim333
It's mostly been fixed in London. They used to be famous for no busses for 20
mins then 3 at once but they are now controlled by a central computer system
which knows all the positions via gps and cell data.

~~~
inferiorhuman
That's fascinating. Are there any writeups on it?

~~~
tim333
[https://en.wikipedia.org/wiki/IBus_(London)](https://en.wikipedia.org/wiki/IBus_\(London\))
is part of it. Also [https://www.intelligenttransport.com/transport-
articles/688/...](https://www.intelligenttransport.com/transport-
articles/688/the-ibus-system-serving-as-the-backbone-for-londons-bus-network/)
[http://www.eltis.org/sites/default/files/case-
studies/docume...](http://www.eltis.org/sites/default/files/case-
studies/documents/ibus-leaflet_3.pdf)

It's not actually clear if the de-bunching is algorithms or humans:

>Headway information, the time gap between consecutive buses, will be
available to a bus driver at all times on a screen so that they can make
decisions such as slowing down or speeding up to help maintain a regulated
service and stop undesirable ‘bunching’ of buses.

~~~
inferiorhuman
Either way that's a great use of technology. AVLs and annunciators aren't
exactly new technology (both exist with SF's Muni, for instance), but the MTA
has definitely not used this data to avoid bunching — even in the subway.

~~~
tim333
Yeah. Sometimes when you get a bus to X it'll stop saying 'this bus terminates
here' after about one stop, well short of X. When I asked the driver WTF he
said it's the computer system and if they have too many empty busses going
down one route they'll reallocate. There's nearly always another bus a couple
of minutes behind to take you to X.

I was thinking someone could build quite a lot of the functionality into a
free phone app if the drivers were willing to use it.

------
bobthepanda
It is also worth noting that in real life passengers are not uniformly
distributed through time. When school lets out, or a train arrives at the
station full of transfer passengers, etc. you can get a huge burst of traffic
at one stop that screws up everything.

This can have knockback effects, because if buses show up late to their
terminal they have now also started their return trip late.

EDIT: edited a word

~~~
kilbuz
Not to be a pedant (too late), but you probably meant 'uniformly distributed'
in this case.

~~~
vecter
Not pedantic at all, this is a very crucial distinction.

~~~
watersb
"Uniformly distributed" : the number of passengers is the same for every time
of day

"Normally distributed": number of passengers versus time of day roughly looks
like a bell-shaped curve, a Gaussian.

I hesitated writing this, pushing the pedantry up a notch, but then considered
spacecraft crashing into Mars due to failure in technical communication, and
recalled colleagues __with college degrees in computer "science" __who
rejected the paradigm of Evolution of species as "only a theory", so here I am
writing it down to remind myself of the difference between normal and uniform
distributions.

Also, I worked briefly with some Ph.D. Queuing Theory people that one time.

Maybe there should be an academic discipline of "Commuter Science".

------
tibbon
This happens all of the time in Boston, especially with the bigger bus lines.
No number 1 bus for 30 minutes, then 3 or 4 of them. Regardless of the cause,
it's very frustrating as a passenger from a UX standpoint.

~~~
screye
The dreaded 66 lining up one after an other

------
Topgamer7
It's effectively a greedy algorithm where the first occurrence takes the most
time, and there are no passengers left for the second bus, so it's load time
is lower, and it will catch up. It's a pretty visualization though :)

------
telesilla
Thanks for letting me relive nightmare memories of Grand Ave in Chicago! I
always wondered, why couldn't the bus drivers be in communication and have the
front bus just skip a couple of stops (where people are waiting) when they
bunched, which was often even 3 buses!

~~~
dmoy
If nobody signals to get off, buses sometimes will skip if they're bunched.
I've seen it in at least three cities before. I have no idea if it's policy or
if the drivers on those routes juts took matters into their own hands.

I see bunched buses on the stop right outside my work basically every day.
Sometimes four from one route and another three from another parallel route
all within a ~5 minute span.

Mercer in Seattle is... not great for traffic.

~~~
unixhero
Not stopping when nobody signals is the point of the signal right:).

~~~
dmoy
Right I mean not stopping when there's no signal _and there are people at the
stop waiting to get on_.

------
munk-a
Interesting, that simulator shows buses that are often full.

I think that's a rather rare case and know of a pretty graspable reason why
lower fill buses clump up quite a bit. Assume that a stop produces a customer
every minute or so, if a bus is five minutes late to the stop (lets say due to
traffic) it will take a bit longer to load customers than normal adding slight
amounts to its delay over time - concurrently, the bus behind it will always
miss out on the customer potential that the first bus is carrying (so five
people on that first stop), this will lower its loading time and cause it to
gain time and run ahead of schedule - further lowering the loading time.

What can happen with longer commuterish buses is that the first bus can try
and counter this effect by either pulling ahead/behind a stop and unloading
passengers only, or by skipping stops if no one wishes to disembark, this
shifts the load over to the later bus and can equalize the system - but this
sort of thing happens all the time.

Additionally, even without that issue, buses are variable, they usually run in
the same lanes as traffic and can be delayed for other reasons, high frequency
(2,3,4,5 minute lines) will often have a speed deviation that exceeds the
frequency, leading to the common effect of waiting six minutes for a 3 minute
frequency bus.

~~~
zifnab06
In Seattle, where we mostly lack any sort of useable rail, it's entirely
normal to have full busses, especially at rush hour. Bunching does happen and
I love it because it makes my commute home quiet.

~~~
munk-a
Yea uh... can you guys fix that? Metro is a godsend and Seattle suffers
greatly from the lack of it - it's super annoying to try and bus to
interesting parts of the city because the traffic in those areas tends to be
terrible.

(I'm in vancouver now but for a while I was regularly flying in from the US
and I'd usually fly to seattle and then catch the train/amtrack bus up the
last leg due to the stupidly large price difference)

------
fghtr
See also:
[https://en.wikipedia.org/wiki/Bus_bunching](https://en.wikipedia.org/wiki/Bus_bunching)

------
scandox
Perhaps relevant previous article on same subject and discussion:

[https://news.ycombinator.com/item?id=17589349](https://news.ycombinator.com/item?id=17589349)

------
thiscatis
"This bus is being held at this stop for a short while to even out gaps in the
service". - Welcome to London.

------
nobrains
"Why do Buses Come in Threes"

I read this book when I was 12 which opened up my mind to the hidden maths of
everyday life.

I recommend to read this book, even as adults, but HIGHLY recommend to give to
children to let them read about and discover coincidences like common
birthdays, fractals in nature and many others.

Author link: [http://www.robeastaway.com/books/why-do-buses-come-in-
threes](http://www.robeastaway.com/books/why-do-buses-come-in-threes)

Goodreads:
[https://www.goodreads.com/book/show/1225641.Why_Do_Buses_Com...](https://www.goodreads.com/book/show/1225641.Why_Do_Buses_Come_in_Threes)

(Not including Amazon link on purpose)

------
PavlikPaja
There are several ways to avoid this.

1\. The buses have predetermined stop times, signalled by a beep. You don't
get on in time, you don't get on at all. Makes the delays predictable,
regardless of the number of passangers.

2\. Lines go from A to B and back, rather than in circles, so the delays
cannot accumulate.

These are known and widely used. There is no reason why this should happen.

~~~
cozzyd
#1 is extremely non-ADA compliant but might work in countries other than the
US.

------
ape4
Very nice visualization. Minor suggestion... I would put a [Delay] button on
each bus - to avoid the explanation.

~~~
munk-a
It'd also be nice with a capacity slider, the flow of buses will vary
differently if they average a lower fill rate.

------
yangl1996
MTA has this interesting animation to explain the same problem, but in the
context of subway.

[https://www.youtube.com/watch?v=eShtZSx4kWc](https://www.youtube.com/watch?v=eShtZSx4kWc)

~~~
rhcom2
The NYT also did a good visualizition about subway delays
[https://www.nytimes.com/interactive/2018/05/09/nyregion/subw...](https://www.nytimes.com/interactive/2018/05/09/nyregion/subway-
crisis-mta-decisions-signals-rules.html)

------
iblaine
This happens daily on the Muni 30X in San Francisco. What this algorithm needs
is a comfort level such that a persons decision to get on a bus is a function
of their expected comfort level and expected arrival time.

------
mikorym
I remember a while ago reading about how bus arrival times in some South
American country were studied and showed to follow psuedorandom distributions.

I don't remember the source, but the key differentiator [in that country] is
that there is a person at the bus stop that tells the bus driver the time that
the previous bus was there. This will cause said driver to increase/decrease
speed in effect to counter bunching with the next bus.

Unfortunately, I also don't remember how rigorous the study was.

~~~
omrjml
Here is a nice article about that [https://www.quantamagazine.org/in-
mysterious-pattern-math-an...](https://www.quantamagazine.org/in-mysterious-
pattern-math-and-nature-converge-20130205/)

------
ulucs
I have some feature (slider) requests to see the effect of extra variables

\- Passenger boarding speed, theoretically we could stop bunching if
passengers got on immediately

\- Bus capacity, maybe the front bus can avoid being bunched if it drops
capacity with respect to its delay (it's likely an invalid solution for the
real world though)

\- Poisson generation of passengers instead of uniform. Maybe delays aren't
even necessary for bunching. It seems the schedule is quite an unstable
equilibrium.

------
jontro
On busy routes one solution is to have longer buses and allow passengers to
enter and exit in all doors. In Gothenburg they run these buses on certain
routes:
[https://sv.wikipedia.org/wiki/Stombussar_i_G%C3%B6teborg#/me...](https://sv.wikipedia.org/wiki/Stombussar_i_G%C3%B6teborg#/media/File:Gothenburg-
bus-16-by-BIL.jpg)

~~~
gruez
How's this any better? Now instead of having two or three buses that sometimes
bunch up, you have 1 bus that's (essentially) always bunched up.

~~~
jontro
It comes one every five minutes during rush hours. You'll increase capacity by
around 50%. Don't see how a longer bus will bunch up more?

------
patates
It even happens on games. For example, "Cities: Skylines" has a mod[1] that
keeps it from happening. The strategy is making the following bus wait a
little bit if the gap is too small.

[1]:
[https://steamcommunity.com/sharedfiles/filedetails/?id=53140...](https://steamcommunity.com/sharedfiles/filedetails/?id=531401164)

------
marxfits
There is one line where I use this to my advantage, I could wait at the bus
stop for the next 417, but if I miss it by a short time I know that if I catch
the 137 that the 417 will pick up all of the passengers from the stops and so
the 137 won't have to stop as many times, and I will usually be able to run
from one to the other.

------
analog31
I suspect that cars bunch too. For a given traffic volume, if they're going
slower, then they have to be closer together, which causes cars to slow down
even more. This is a feedback cycle.

Buses bunching might be more noticeable because buses tend to stay in the
right lane.

------
the_fonz
The layout of the page appears to bunch on mobile Safari on iOS as one long,
skinny column for the main text.

Edit: Written on an express bus that doesn't bunch, although yes normal buses
bunch, including purposely for peak times where there's lots of passengers.

------
yogrish
It seems like phantom traffic jam.
[https://www.vox.com/2014/11/24/7276027/traffic-
jam](https://www.vox.com/2014/11/24/7276027/traffic-jam)

------
sethammons
I've always wondered why we don't just account for full bus/train loading
deloading plus a buffer. Each stop has the mass transit stop for multiple
minutes. Bingo, automatic buffer. If the bus is running late, it stops
briefly.

~~~
hamandcheese
The trade off for this, though, is increased travel times.

------
axilmar
When buses are clumped like that, the leading bus shall not stop at the next
bus stops until the distance between them becomes sufficient.

~~~
red0point
But what if I (or all passangers) want to get off at the next stop?

~~~
errnesto
Then you could get out at the current stop and let the next bus take you to
the next one. I've seen this in New York where trains become 'express trains'
Im shure other cities do this too.

------
cyberjunkie
I feel like I must encourage everyone to play Transport Tycoon Deluxe, or
OpenTTD.

------
Siira
This doesn’t work on iOS safari?

------
elamje
You should add a button for people to "work remote" if you want 10x karma.

------
kazinator
_How_ buses bunch is fairly ovious: the trailing bus has few people to pick up
so it moves faster, uselessly catching up to the full bus.

 _Why_ they bunch up is actually a different reason: the operators don't give
a darn about sticking to schedules and/or tracking the other buses and
maintaining space.

~~~
munk-a
Out here (vancouver) operators are allowed to skip stops when full, so they
are able to recover from this state gracefully.

Depending on the frequency of the bus route I'd prefer adherence to a schedule
vs. efforts to minimize bunching. With frequent buses I think the schedule
ends up being irrelevant - but if the hourly bus I occasionally take pulls in
fifteen minutes early or late then I will be pissed, especially on the early
side.

~~~
cimmanom
Are they allowed to also skip stops where people want to get off?

~~~
pushpop
Clearly not. You’re not going to hold people captive on the bus just to make
up a few minutes. However that doesn’t mean the bus drive has to accept new
passengers when someone does get off (it’s not common that happens but I have
seen that happen before and it’s highly infuriating for those waiting for the
bus. Which is likely why it’s not common)

~~~
cimmanom
My experience on crowded buses is that typically every stop gets rung for
anyway, so skipping isn’t an option.

Of course, if it were possible to open only the back doors and let people off
but not on, that might help, at the expense of leaving the people waiting to
get on enraged. But then you also have the problem that on a crowded bus it
can be really tough to squeeze past the rest of the passengers to get off,
which also slows everything down.

The whole thing is miserable, and mostly these routes just need more buses
(plus the articulated ones that hold 60% more people).

~~~
munk-a
Vancouver buses have this ability! And they will often specifically refuse to
let new people on the bus if they are at or near capacity.

It noticeably speeds up things.

