

Groceries: which lane is the fastest? - bootload
http://blog.mrmeyer.com/?p=4646

======
mathogre
Fastest doesn't always matter in a grocery check-out lane. Look for the
cashier who appears to be a Mom. She's the one who won't crush the bread or
put the big jar of spaghetti sauce on top of the egg carton at the last
minute.

Besides, the better item to optimize when grocery shopping is the actual
shopping experience. While you may spend five minutes in a check-out line, you
may spend an hour or more shopping. Nicking a minute out of the check-out
experience is irrelevant if you just wasted five minutes zig-zagging through
the store for multiple items (traveling salesman problem) or if you made a
couple calls back home to find out if you were out of ____ or needed ____, a
time issue that is magnified if you forgot something and need to return to the
store before your normal (optimized) shopping trip.

~~~
Splines
I wouldn't optimize for the mom. Instead I'd look for anybody who didn't look
like a fresh-faced teenager. Since I enjoy living near a grocery store that
has reasonable prices, I also tend to recognize the workers. The ones who seem
the most senior usually can work the till faster.

You're right about it not really being worth it for optimizing your waiting
time. If there is only one checkout and it's some lady with 50 items and she's
struggling with a checkbook, other cashiers will usually open up if you make
eye contact with a free employee.

You'd save the most time by planning your shopping in advance. Make a list,
and categorize it by food type. If you know your store layout, some time spent
thinking about the order of you visit can pay off quite well. Plus, it helps
reign in impulse purchases.

------
misterbwong
I've found that paying attention to the type people in the line matters as
much as the number of items and the payment type.

It sounds silly but I learned this from Apu on the Simpsons:

“Season 5: “Homer and Apu” Original airdate in N.A.: 10-Feb-94

Apu and Marge wait at the back of the long line in the express lane.

Apu: Mrs. Simpson, the express line is the fastest line not always.

That old man up front, he is starved for attention. He will talk the cashier’s
head off.

Abe: {Ah, there’s an interesting story behind this nickel. In 1957, I remember
it was, I got up in the morning and made myself a piece of toast. I set the
toaster to three—medium brown.}—Then he tied an onion to his belt

Apu: Let’s go to…that line.

Marge: But that’s the longest.

Apu: Yes, but look: all pathetic single men. Only cash, no chitchat.

Marge smiles approvingly as the line moves much faster.”

~~~
philwelch
It's also important to size up the cashier.

------
neatoincognito
_From my observations, the fastest cash transaction will outpace the fastest
credit transaction by a wide margin_

Nearly every modern point of sale self-swipe card terminal will allow you to
swipe, insert pin, and sign electronically before the cashier can finish
scanning your items. The only step left once that has completed is to approve
the transaction total with the push of a button. I wish more people were aware
of this, and then card transactions would be faster.

~~~
stellar678
I'm not sure I've ever seen one that lets you sign before the cashier is done
scanning. Wouldn't that defeat the whole premise of signing "I agree to pay
the amount above in full"?

You can do everything up to that point - 'what type of card is this', etc...
And many places are going signature-free below a certain transaction size, so
I suppose all interactions can be handled in those cases before the 'total'
key is hit.

~~~
Splines
In my experience, you can get as far as needing to hit "I agree to pay" and
scribbling on the touch screen.

Entering in/scanning your customer loyalty number and pulling out your credit
card and scanning it (and pressing credit/debit) is what I've been able to
"preload".

One other neat thing I've noticed is that at my Costco gas station, I can pull
the pump out and select my gas type while simultaneously scanning my costco +
credit card. I usually try to time myself with the person in front of/behind
me to see if I can start my pump faster than them. I usually win :)

------
jfb
I've largely given up trying to optimize my shopping time, but I do find the
subject interesting. I'd be interested in seeing the effect of the (to me
intuitively superior) one line, many cashiers setup, like at Fry's. I realize
supermarkets make a boatload of cash from the geegaws sold in line that you
hounded your parents into buying you as a kid, but I can't help but think that
the many lines/many cashiers setup is less an optimal setup and more an
artifact of some Lionel Hutz type who sold the cabal of Evil Grocery Barons a
bag of magic beans in the 1960's.

As usual, I am too lazy to go look it up for myself. Back to hacking.

~~~
nikster
One queue minimizes the average wait time - it's the fairest and fastest
system. Any CS person should know this, it's pretty basic.

Say we have 100 people and 10 servers. Everyone takes 1 minute to process,
except one guy who needs 10 minutes.

With 10 queues and the long taking guy ahead of 9 other people he's blocking
all those for 10 minutes. Total processing time 19 minutes. With 1 queue and
the long taking guy first (blocking 1 counter for 10 minutes) total processing
time is 11 Minutes.

Another way to look at it is that with one queue, everyone gets the minimum
possible wait time. In the many queues case you get that only occasionally.
You could optimize the many queues so they're just as efficient as the one
single queue but you'd have to know everyone's processing time in advance -
impossible in a real world setting.

~~~
danio
One queue adds an overhead for the time it takes for the person at the front
of the queue to notice a cashier is free and walk to that cashier. I have
watched this system in action at the Post Office, Rail stations, and one
supermarket and this overhead can be significant. One supermarket actually
employs somebody at the head of the queue just to tell them which cashier to
go to and when.

jfb - It also doesn't have any negative effect on "the geegaws sold in line"
as they just put the "geegaw" displays along the side of the one queue. In
fact it is better for the store in that respect as they can show more variety.

The best way I can think of to get rid of this overhead is to have a rule
where each cashier has a queue depth 2 that is fed from a single queue. But
how would you get people to stick to just 2 people? And it would be very
annoying to be just behind a slow person.

In theory people should naturaly start moving forward when they notice that
somebody is finishing up but at least in the Rail station and Post office the
counter staff have a tendency to shut their counter without warning or start
processing some other task before they are ready to serve the next person.

~~~
Bostwick
_One queue adds an overhead for the time it takes for the person at the front
of the queue to notice a cashier is free and walk to that cashier. I have
watched this system in action at the Post Office, Rail stations, and one
supermarket and this overhead can be significant. One supermarket actually
employs somebody at the head of the queue just to tell them which cashier to
go to and when._

Whole Foods in NYC has solved this problem by having one queue, but when you
get towards the front, there are five separate, color-coded lines. At the
front of the queue is a giant television that shows a bar of color for each
lane. When a register opens up, the number for that register slides into the
color bar for the next person in the sequence, and a voice announces "Register
12". It's fairly efficient at keeping the queue moving as well as managing
people's psychological need for multiple lines. It also prevents cashiers from
wasting time, because as soon as a transaction is finished, their register is
automatically assigned to the next person in the queue. The only "wasted" time
is the time walking from queue to register, and pleasantries.

------
nicksergeant
Here's something a bit unorthodox. I worked for 7 years in the grocery
industry, and still shop at the same store I worked at years ago.

At Wegmans at least, in the Northeast US, always pick the longest line. The
one with the most customers.

Why? Visible long lines are bad for business. Front-end (checkout) managers
hate long lines. As soon as they see them, they start bringing in more people
to start running more registers, and then pull people from the back of the
longest lines to these newly-opened registers.

This doesn't work so well if there aren't any long lines to begin with, but
during the weekends and holidays, I always pick the longest line, and I always
get moved to a line-less checkout lane. Never fails.

~~~
ajays
At the Wegmans I remember, the manager would pick people from the front of the
line to move them to the newly opened registers (to keep things fair).

------
steve19
The slowest lane is the one you are in.

~~~
alexitosrv
and this also applies even if you change lanes...

~~~
kgermino
Especially when driving and late for work...

------
nl
We have (optional) self-checkout here, and there are some weird non-
linearities in that situation I've observed.

1) Around 1/3 transactions still require staff intervention of some kind. This
might be credit card approval, weight overrides, or just dumb customers. If
your transaction is one that needs it then the time it will take is much less
predicable than in a normal check-out

2) As people become more familiar with them, they are using them for larger
and larger loads. That means people are bringing shopping trolleys in, and
bagging themselves, which is slow and creates traffic flow problems.

~~~
fragmede
Stop and Shop in New England has a scanner gun you pickup when you enter the
store for self-checkout. You scan items before you put them in your basket and
when you get to the self-checkout, you've already scanned your items. Helps
situation 2 not take forever.

~~~
wwortiz
Except all the stores I've been to no one trusts the customer so when you do
self checkout not only do you have to scan each item but you have to make sure
you put each item in the bag area so it can feel the weight. God forbid you
want to take a bag out and put it in your cart before you pay as well.

------
xiaoma
I've thought about this a lot, too. The conclusion I've come to is that it's a
lot like the stock market-- the greatest rewards go to those who focus on a
currently undervalued variable. Just as buying stocks primarily based on P/E
is useless in this day and age, so is counting the number of people in a line.
Looking at how much is in their carts is a bit better, but far too many people
do that, too.

My solution is to focus almost entirely on how competent and quick the cashier
appears to be. If and when most other people do that as well, I'll look for
another undervalued variable.

------
micky_25
According to Apu (The Simpsons) it's the line with the most single men in it.
"... Only cash, no chitchat." <http://www.snpp.com/episodes/1F10.html>

------
px
I just want to give a nod to the work and writing that Dan Meyer makes
available on his blog. If you want to get a glimpse of the future of secondary
math education, this is the place to look.

------
mikesaraf
This is the calculation I use and it seems to work out more often then not:

Observe the lanes, every person is assigned 1 point, elderly (60+) +1, buggies
over 70% full get +1, smokers get +1, welfare recipients +2. Add up the totals
and the line with the smallest sum is usually the fastest. Obviously you can't
always tell who is on welfare or who the smokers are, but the obvious ones are
usually the ones that take the most time anyway.

------
pinchyfingers
The biggest factor for speed is the competency of the cashier. Many cashiers
are tired and slow and don't care much about their jobs, you need to get in
the line with the energetic smiling cashier who is moving things along.

Also, the self checkout lines can be incredibly fast or incredibly slow. If
there is a problem you have to wait for a cashier to come fix it, and if the
person in front of you gets confused it can take forever.

------
ssp
Instead of picking the fastest lane, it would in principle be faster to
distribute all your items across all the lanes. That way, you minimize the
time from you are first in line until you are checked out.

Consider the problem of optimizing the response time of a set of servers. Load
balancing - keeping the hardware busy - will keep the request queues at
roughly equal and therefore minimize the maximum queue length. That ensures
that the hardware is as busy as possible, but you can improve on that.

When a new request arrives, you can either add all of that request to _one_
queue, or you can split it into pieces and distribute those across all the
queues. Distributing the request, assuming perfect load balancing, means the
latency for that request will be _k_ \+ 1/ _n_ instead of _k + 1_ , where _k_
is the length of the queue.

In other words: Parallelizing gets you a _substantial_ improvement in response
time without additional hardware, and without making the code run any faster.
I didn't realize the implications of this until recently.

~~~
blaines
In the case of groceries wouldn't you only be as fast as the slowest line?

Your comment only applies if all lines are equal, which they almost never are.
So you can't assume perfect load balancing under this circumstance.

I think the best store queueing system is to have one main queue that
distributes customers to the first available cashier. People with larger loads
take longer, but this has little effect on the main queue.

~~~
silentbicycle
> In the case of groceries wouldn't you only be as fast as the slowest line?

That's a pretty good summary of Amdahl's law. Even a computer with an infinite
number of processors can't run a program faster than it takes to run the
slowest sequential part.

------
invalidOrTaken
My cousin (econ major) and I (stats major) kicked around an idea for dynamic
grocery pricing based on line length. We never got any data ("kicked around"
the idea, remember), so we didn't even get to the point of realizing the
y-intercept wouldn't be zero.

Something will happen there, though. Lines = deadweight loss, and deadweight
loss = room for improvement.

~~~
kwantam

        >  Lines = deadweight loss, and deadweight loss = room for improvement.
    

Do you mean deadweight loss for the grocery store, or for the customer?
Relatedly, does the grocery store care about deadweight loss for the customer?

If every grocery store in town has the same expected line length, then the
entire cost of line length is borne by the consumer---since the line lengths
are in equilibrium, none of the stores feel economic pressure to reduce their
line length, and the line length is a fixed cost of food shopping (unless
latency becomes comparable with the length of time a store is open during the
day, in which case it's actually limiting the number of customers they can
process per day, but I find this highly unlikely).

Granted, a store might try to differentiate itself by reducing its average
line length, but there are many other (perhaps more important) factors that go
into a consumer's choice regarding grocery stores, e.g., Wal-Mart mega-food-
store competes on prices, Whole Foods competes on its customers' self-
satisfaction (I kid, I love Whole Foods).

Intuitively, it feels like grocery store line length is in the noise when
considering the decision process for most consumers, especially since I can
get zero line length at almost any store by going during off-hours. If it's in
the noise, there's no selection pressure to improve it.

~~~
dcbell
I meant for the customer, and while I agree that grocery stores don't care
about deadweight loss for their customers, I think they _could_.

I think the chief reason line length is considered noise rather than signal is
because it's so unpredictable. When it's known, people do a great deal to
minimize their time spent in line. They go to the store at off hours; they
switch lines once they're standing in them. I know my local Taco Bell gets a
lot more business from me because of their speedy response time, vs. the
teriyaki place next door that I like more, but takes forever. And my college's
bookstore has had a great deal of success with putting live camera feeds of
their lines (or lack thereof) on their website.

But with grocery stores, I couldn't really tell you which of the two grocery
stores in my area would have a longer line. They're _about_ the same, and
that's close enough.

So you'd need a pretty big delta for line length to become a differentiating
factor between stores. The current system of a cashier scanning items
individually probably won't see drastic efficiency improvements without
drastic changes, so...drastic changes are needed.

After a certain point, changes in "line length" become "presence or absence of
a line at all." As jonnathanson says below, electronic scan-as-you-buy is
probably the future there(Smith's, in answer to my cousin's email inquiry,
mentioned they were testing a portable bar code scanner). I'm under the
impression that grocery stores have pretty cruddy margins, so maybe I
shouldn't read that much into "in testing." If anyone out there is dying for a
startup idea, I think this one is worth a look. (Before you say it, I'm
working on another project, and my cousin left for grad school.)

Since few things are more self-satisfying than sailing out of a store without
waiting in line, maybe Whole Foods will be the first? ;)

------
brianbreslin
I also factor in age of customers in line when I pick which line to go to; as
I assume older people move through checkout much slower.

~~~
devmonk
In one Simpsons episode, Apu tells Marge to avoid the line with the old guy
("Grampa" Abraham Simpson) and that the fastest line is the one of the single
guys.

~~~
westicle
Apu is giving Marge contradictory advice.

The old guy ("Grampa" Abraham Simpson) is in fact also a single guy.

~~~
devmonk
Apu may have specified younger single depressed guys. I couldn't find the
video clip anywhere still available to get the actual quote, so I'm going from
memory.

------
dhume
I was a bit dissappointed to not see any discussion of the confidence interval
on a predicted checkout time. I see so much variation in how long people take
to figure out which pocket contains their wallets, how they're paying, etc.
that I have trouble coming up with a good time estimate.

------
enan
Here's the trick I've successfully used during peak hours. All things being
equal, pick the longest line next to a closed lane, wait for the closed one to
open (supermarkets will usually open additional lines when they think they are
getting longer), and then quickly switch.

~~~
colanderman
It's expected that you let the person who's been waiting the longest move
there. That's why you'll hear the new cashier say "I can help the next person
in line." I consider hopping over from the back of a line to be very rude.

~~~
joezydeco
I've also seen clueless managers at some stores (cough cough TARGET) take the
people in the back of the lines and redirect them to the newly opening lanes.
Pisses me off to no end when I'm the guy that's been waiting the longest and
grandma in front of me pulls out her checkbook....

------
jonnathanson
I long for the days when grocery lines are unnecessary, self-checkout lines
are unnecessary, and you can just scan-to-buy items as you go. Enforcement
might be an issue, though. Heh.

~~~
rlpb
Safeway experimented with that here (UK) about fifteen years ago. I used it.
It worked, but I don't think it saved that much time, since shoppers are much
slower at doing the scanning.

For enforcement they used sampling: at payment time, you were sometimes
required to have your items scanned by a cashier anyway. The theory was that
the more reliable you showed yourself to be, the less likely you were to be
selected.

I haven't seen back to the store that they trialled it in recently, but I
guess that it didn't work for some reason since it has not become widespread.

~~~
jonnathanson
Interesting. I wonder if this kind of system will make a comeback as RFIDs, QR
codes, digital payment systems, and smartphones get more ubiquitous.

------
latch
If there's one thing I've learnt, is that once you pick a lane, stick with it
(goes for driving too).

~~~
xiaoma
That sounds a bit like people who buy stock in a company and then, after the
company deteriorates, stubbornly refuse to sell until they "get their money
back".

 _The next line is open, but I've already invested 10 minutes waiting in this
one and switching will mean it was time wasted!_

~~~
bostonvaulter2
See: sunk cost fallacy

