Mathematics Of Cashiering
I calculated the efficiency of certain aspects of cashiering.
I'm very concerned with efficiency; I'm always trying to find a better way to do things. I wouldn't be able to do it for a living, but it's a hobby of mine. A little while ago while cashiering at the pet store, I became frustrated with my method of doing something and wanted to figure out the best way to do it.
At the pet store, we sell cases (of different denominations) of food, usually layered, and wrapped in plastic. There are two methods of scanning one of the cans so that we can enter the appropriate quantity for the case; one involves rotating the case and trying to scan a UPC which is completely displayed with the scan gun, the other involves opening the plastic and manually rotating a UPC outward so that it may be scanned. The first method offers the obvious advantage of being much faster IF a UPC is completely exposed. The drawback however, arises when after rotating the entire case, no UPCs are completely exposed. This wastes valuable checking time! Unfortunately, ripping out a can to get to the UPC is also time consuming. Is there no middle ground?
Enter mathematics to the rescue.
After that moment of frustration, I realized that there is a computable percent chance that the UPC will be exposed given the dimensions of the case, and the angle that the UPC occupies on the circumference of the cans. I've come up with a formula for figuring out this percent chance, taking a few liberties to make some assumptions. First, my assumptions:
- I estimated the angles of scannable circumference for the corners and sides.
- UPCs are assumed to be oriented "around" the can, and not from face-to-face of the cylinders.
First let's look at some notation. I'm going to use X and Y as the length and height in units of cans:

I will be using a and b for the angles of the corner and side cans, respectively:

First, we need to calculate the total number of degrees in space in which the UPC could exist. This is done by multiplying the number of perimeter cans by 360 and we'll use T to represent the total degrees:
Now we need to figure out how many degrees the UPC could ACTUALLY be scanned in. First, let's look at the corners:
Now let's figure out the sides (using the same variable names):
SO... now we can add it all together to get the total percent chance (shown as P) that a UPC will be completely scannable on the perimeter cans:
To apply this method, there must not be any obviously exposed UPCs, i.e., a quick visual scan will determine if the case can be readily scanned or if prying out a can's UPC would be effective. All the times I have performed this test, the percentage chance (for a range of C and X,Y) has been well below 50%, which I arbitrarily chose as the 'worth-it' point. It would seem it is more efficient the manually rotate a can each time you encounter a case rather than hope to find a completely exposed UPC. The next step would be to do a time-analysis. Granted taking the chance and being successful is much quicker than manually rotating a can - but are the time benefits for taking the chance worth taking it every time? How about only taking the chance on every other case? Perhaps that is math for another day.
comments
1
eric
Tuesday, November 28, 2006
Finally the UPC makes sense. I wonder though where you register a UPC from, or when you have a product... where it becomes "published". Nice math... I can't understand it, but all is swell.
2
Alan
Tuesday, November 28, 2006
I think it is very representative of your personality that you would stop doing something you previously thought was more efficient as soon as you found out it wasn't. Most people would hold on to their original way of doing things for one of many reasons, but you are more objective about it. I know it's just ringing up a case of dog/cat food, but like I said, it's representative of how you are in other areas of life. You get cool points.
3
Alan
Tuesday, November 28, 2006
You need to use nl2br.
4
Alan
Tuesday, November 28, 2006
"This site is part of the molonet."
'Molonet' needs to be an absolute link. ( goes to http://www.themolotov.net/themolotov.net)
5
Alan
Tuesday, November 28, 2006
Just testing...
6
molotov
Wednesday, November 29, 2006
No, not yet. I haven't decided how exactly I'm going to do comment formatting. For myself, I of course just use markup in my entries. For comments, I experimented with writing my own BBcode style regex, but it failed miserably. I'm considering two things: allowing html and stripping nasty-tags, or implementing some GNU version of BBcode, such as PEAR bbcode, or nabbing it from somewhere else. I'll probably implement it the same way that Livejournal does it: basic markup AND nl2br, although the purist in me just wants to use markup.
This is of course in que with some other things that I wanted to do: quoting people and editing your own posts (although I may just dissallow that).
Molonet: Blast! Falling into the localhost trap!
Math et cetera: Thank you. I must be up to what, 8 or 9 cool points?
Note to self: Stop editing multiple styles at a time.
7
molotov
Wednesday, November 29, 2006
Alright, I'm trying the PEAR BBCode parser for a while. So far, I like it more than I thought I would, although I implemented it differently than I thought I would. When you submit a comment, it's stripped of HTML, parsed for BBCode, then nl2br'd. It seems to work well -and- on top of that, all the processing is done when you submit comments, not on rendering the page! I was rendering [size=24][color=#0000ff]two[/color][/size] comments with the parser and it was adding about half a second to page rendering times. I removed the rendering from page display to data store and now page load times are back down to acceptable levels.
This is the list of bbcode that will be parsed, as far as I can tell:
b
i
u
s
sub
sup
img
list
ulist
-li
color
size
font
align
quote
code
to test:
[quote="alan"]I <3 OU.[/quote]
[quote]Things are not what they seem.[/quote]
[code] $parser = new HTML_BBCodeParser();
$parser->setText(htmlspecialchars($ccomment));
$parser->parse();
$ccomment = $parser->getParsed();[/code]
[align=right]say what?[align]
8
Alan
Wednesday, November 29, 2006
nice
9
molotov
Wednesday, November 29, 2006
10
molotov
Wednesday, November 29, 2006
RARG. Will work on it later.
11
Erin
Friday, December 1, 2006
But is it really worth just turning the can, considering how pissed off you would get in this scenario:
Jon: *grabs case and begins turning can"
customer: oh, there's a barcode right here on the other side...
*translation: I'm smarter than you cause I saw the barcode and you're taking too long*
12
molotov
Sunday, December 3, 2006
I see your point, but disagree. Often, people try to smugly point out the bar codes on cases that we don't use; I counter by saying bluntly, "nope, that doesn't work." without ever looking at them. This time I could just say something like, "oh really?" to inflate their ego, but by ignoring them, deflate it. If they pursued, I could counter with a very annoying, "It's alright, this way, for you, is faster. I've done the math." The average customer couldn't comprehend angles and percentages anyway, so fuck them.
That's not to say doing the above wouldn't conceal all efforts of customer, "I-am-better-than-you,-lowly-cashier"ism.
13
Alan
Friday, December 8, 2006
By the way, your rss feed isn't up to date...
14
molotov
Thursday, December 14, 2006
I fixed the entry feed, comments should be fixed soon.
15
molotov
Thursday, December 14, 2006
I think the comment entry is fixed now. Let me know if there are any hang ups.
16
molotov
Thursday, December 14, 2006
One more test...
...and I think it's working now.
17
ericericeric
Saturday, December 16, 2006
how was the road trip?