Page 1 of 1
fitting products into a shipping box
Posted: Tue Aug 19, 2003 3:49 am
by dbalatero
This is a problem I've been recently wrestling with: when a user places an order through Site X, I need to be able to determine whether a certain shipping box will accommodate the products in the order, in terms of volume, and 3 sides.
Is there an algorithm to do this, or could someone point me in the right direction of where to go with this? I have my own theories, but while I'm competent with math, I'm not a math genius either...
Thanks!
Posted: Tue Aug 19, 2003 11:17 am
by nielsene
Sounds like the "Knapsack" problem. Check out some books at a library/bookstore with "alogrithms" in the title. I beleive CLRS covers this.
Posted: Tue Aug 19, 2003 11:31 am
by dbalatero
what is CLRS?
Posted: Tue Aug 19, 2003 11:34 am
by nielsene
Oh, sorry, CLRS is one of the most common algorithm text books. Title is Introduction to Algorithms by Cormen, Lesierson, Rivest and S-somebody. (The first edition I used was only CLR, second edition added an author...)
Posted: Tue Aug 19, 2003 11:35 am
by dbalatero
thanks! i'll check it out today, see what i can find!
Posted: Sat Aug 23, 2003 10:55 am
by Selkirk
This probably isn't helpful, but...
I used to work for a manufacturing company that made customized products that was boxed in custom built wooden crates.
Often, box vendors would build their own factories close to ours, but there was still a lead time for ordering boxes for product.
A colleague of mine wrote the program that examined the production schedule and automatically produced an order for boxes that would be sent to the box vendor.
One day, he received a Polaroid from the production shift out in the factory. The picture was of the entire shift crew standing inside a wooden crate. It seems that a bug in the program had ordered a gigantic box and the box vendor dutifully fulfilled the order.
