Forum Moderators: buckworks

Message Too Old, No Replies

Packaging Widgets for Shipment Quoting

         

Ectaris

2:37 pm on Jan 13, 2010 (gmt 0)

10+ Year Member



I am looking for an application in some form that, given a range of containers, will take in a number of widgets of varying sizes and compute the best way to package them (i.e. boxing them with the lowest volume overall) with the use of multiple containers being allowed. These dimensions would then be used to quote shipping. Weight based quoting doesn't work because the actual weight of our packages rarely comes close to the dimensional weight and free shipping is not an option. Any leads would be greatly appreciated.

bwnbwn

10:25 pm on Jan 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How many widgets or better yet how many variations of boxing sizes would be involved.

rocknbil

12:05 am on Jan 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't have good info for you, but others might.

In the same situation, I searched for this five years ago and came up empty handed. I had to grow my own, in Perl.

I'll spare the full details, but it requires getting the total volume (easy,) finding out the item with the largest dimension, insuring that the box doesn't exceed the shippers maximum size/weight requirements, fulling up the first box with items, and if it doesn't fit in the maximum non-oversize box for that shipper, splitting it into multiple boxes if necessary, then send that over to the API for price. And it varies with shipper, USPS and UPS have different requirements.

It's not 100% perfect, but pretty darn close. For a person standing at a table and a dozen box sizes in front of them, it's a simple thing - not so simple to automate.

Ectaris

1:21 pm on Jan 14, 2010 (gmt 0)

10+ Year Member



We have 13 different boxes that we use. An order can have anywhere from one to typically no more than around 15 widgets. I have seen as high as 50 different widgets but that is a rare exception.

Ectaris

1:42 pm on Jan 14, 2010 (gmt 0)

10+ Year Member



I have been working on my own solution in Perl as well as I am despairing of finding any pre-built solution. I am having trouble though because my process seems to break down if I have too many parts, around 8+. It works really well as long as there are under six widgets. It just seems a little foolish to rely on the likelihood that most people won't order that many parts. Hence my renewed search for an out of the box solutions.

rocknbil

7:10 pm on Jan 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Okay, you're coding! :-)

Here is the basic premise:

- get the total volume
- get the longest item in the order, this determines package length
- organize the items in an array from largest volume to smallest
- Begin "stacking" the items into the selected box, which is determined by the first item. Add values horizontally until the box width is reached, then begin stacking them vertically, subtracting volume as you go along, and addin to "total height" as you add "layers."
- Continue until the items' volumes are exhausted. If the box volume is reached before the items volume is exhausted, you know you need a second (or third, or . . . ) box.

There's more to it, as you need to add a percentage for padding and calculate the padding weight as well as box weight into the final values to send to the API. I figured the box weight by weight per square inch, though square foot is easier to "handle," it doesn't help with small parcels.

When all done, your function returns

return ($osvalue,$num_of_pkgs,$ht,$wid,$len,$wt);

representing the final packaged parcel values. In this scenario $osvalue, based on admin settings, always returns 0 so we don't have to pay for oversize packages, multiple parcels works out cheaper.