A
A
Anton Shamanov2016-11-04 12:35:38
Algorithms
Anton Shamanov, 2016-11-04 12:35:38

Is there an algorithm for determining the optimal package size?

Goods have width\length\height, how to calculate the optimal (i.e. the most compact) package size?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
P
Philipp, 2016-11-04
@SilenceOfWinter

Read here engsi.ru/doc/781936.html
This problem is difficult to solve, so in most cases there are no ideal solutions.
Because If you need to solve a problem for an online store, then in most cases a rough estimate is sufficient.
Usually people buy relatively few things (up to 10), so you can do the Tetris method in one layer.
Sort packages by length. Get the sum of the lengths. Take 1/3 of the total length, start laying out the parcels along the length. If one has gone beyond 1/3 of the length, increase the length to the last parcel.
That's it, you got the bottom of Tetris. Then just lay in layers to the maximum width.
As a result, you will get a large flat box with a maximum height of the product.
This is a simple suboptimal solution, but it will work quickly, which is important for an online store.
Overpayment for shipping can be returned in the form of a credit to the buyer for the next purchase.

S
sim3x, 2016-11-04
@sim3x

Task_about_knapsack

X
xmoonlight, 2016-11-04
@xmoonlight

In pairs, we remove products with the same area at the base (so that one of the sides is equal or less, but the minimum difference) and giving in total the desired height of the placement block. We start without a pair from the most overall.
When it's ready, we place the areas of the bases on a given plane using the same method.
Placement blocks - can also be combined with the same algorithm scheme, starting from the most dimensional one.
Goods and placement blocks - can be rotated in all directions.
Initially, you need to decide on the dimensions of one of the sides of the package: proportions of the dimensions or clearly defined dimensions so that you can determine the optimal size of the initial placement block.
Or the compactness conditions must be known in advance:
1. the minimum amount of space occupied without restrictions on any of the sizes
2. the minimum removal of the corners of the parallelepiped from the center of the figure, i.e. ideal option - cube.

M
Mercury13, 2016-11-04
@Mercury13

Packing of parallelepipeds. NP-complete problem, exact solution - enumeration. He himself solved the packing of rectangles (i.e. in 2D) with a genetic algorithm with varying success.
Most likely, your delivery service has boxes of a standard size - so it would be worth adapting to these boxes.

P
polifill, 2016-11-05
@polifill

NO WAY.
If the packaging were of a universal size, taking into account all the depressions and bulges .....
But in fact the packaging is standard (well, or a choice of several)
.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question