A Novel Bin Design Problem and High Performance Algorithm for E-commerce Logistics System
Xinhang Zhang, Haoyuan Hu, Longfei Wang, Zhijun Sun, Ying Zhang,, Kunpeng Han, Yinghui Xu

TL;DR
This paper introduces a new bin design problem for e-commerce logistics, aiming to minimize surface area by optimizing bin sizes, and proposes a high-performance heuristic algorithm that outperforms existing methods in efficiency and cost reduction.
Contribution
The paper formulates a novel bin design problem with variable bin sizes and develops a dynamic programming-based heuristic algorithm, DPTS, that improves efficiency and cost savings over traditional methods.
Findings
DPTS outperforms greedy local search by 5.8% in total cost.
DPTS requires only 1/50 of the computational resources of GLS.
Numerical experiments validate DPTS's efficiency and effectiveness.
Abstract
Packing cost accounts for a large part of the e-commerce logistics cost. Mining the patterns of customer orders and designing suitable packing bins help to reduce operating cost. In the classical bin packing problem, a given set of cuboid-shaped items should be packed into bins with given and fixed-sizes (length, width and height) to minimize the number of bins that are used. However, a novel bin design problem is proposed in this paper. The decision variables are the geometric sizes of bins, and the objective is to minimize the total surface area. To solve the problem, a low computational-complexity, high-performance heuristic algorithm based on dynamic programming and depth-first tree search, named DPTS, is developed. Based on real historical data that are collected from logistics scenario, numerical experiments show that the DPTS out-performed 5.8% than the greedy local search (GLS)…
| Notation | Meaning | ||
|---|---|---|---|
| The number of customer orders | |||
| The number of types of bins | |||
| The length of the th type of bin | |||
| The width of the th type of bin | |||
| The height of the th type of bin | |||
| The upper bound of length of bins | |||
| The upper bound of width of bins | |||
| The upper bound of height of bins | |||
|
| Bin id | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| L(cm) | 27 | 31 | 35 | 40 | 40 | 43 | 44 | 50 |
| W(cm) | 18 | 23 | 25 | 28 | 28 | 30 | 35 | 40 |
| H(cm) | 15 | 18 | 20 | 20 | 25 | 27 | 30 | 33 |
| No. of Orders | DPTS | GLS | Human | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
||||||||||||
| 2282 | ||||||||||||||||
| 3390 | ||||||||||||||||
| 8176 | ||||||||||||||||
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsOptimization and Packing Problems · Advanced Manufacturing and Logistics Optimization · Vehicle Routing Optimization Methods
A Novel Bin Design Problem and High Performance Algorithm for E-commerce Logistics System
Xinhang Zhang, Haoyuan Hu, Longfei Wang, Zhijun Sun, Ying Zhang, Kunpeng Han, Yinghui Xu
Zhejiang Cainiao Supply Chain Management Co., Ltd
Abstract
Packing cost accounts for a large part of the e-commerce logistics cost. Mining the patterns of customer orders and designing suitable packing bins help to reduce operating cost. In the classical bin packing problem, a given set of cuboid-shaped items should be packed into bins with given and fixed-sizes (length, width and height) to minimize the number of bins that are used. However, a novel bin design problem is proposed in this paper. The decision variables are the geometric sizes of bins, and the objective is to minimize the total surface area. To solve the problem, a low computational-complexity, high-performance heuristic algorithm based on dynamic programming and depth-first tree search, named DPTS, is developed. Based on real historical data that are collected from logistics scenario, numerical experiments show that the DPTS out-performed 5.8% than the greedy local search (GLS) algorithm in the total cost. What’s more, DPTS algorithm requires only about 1/50 times of the computational resources compared to the GLS algorithm. This demonstrates that DPTS algorithm is very efficient in bin design problem and can help logistics companies to make appropriate design.
Introduction
For logistics or production companies, packing cost accounts for a large portion of the total operating cost. So many optimization problems and algorithms have been studied and applied to reduce packing cost. One of the most classical and popular problems is three-dimensional bin packing problem. In this problem, a number of cuboid-shaped items with different sizes should be packed into bins orthogonally. The sizes and costs of bins are fixed and the objective is to minimize the number of bins used, i.e., minimize the total cost. This problem is NP-hard (?) and has many applications in real world. So it has attracted many researchers’ interest and some valuable achievements have been obtained.
In the classical bin packing problems, the sizes of bins are fixed and given. The decision variables to be optimized include packing sequence, items’ orientations and positions. Effective and efficient bin packing algorithms can make good packing plans quickly and reduce the packing cost. But there is another important factor that should be considered: the sizes of bins. For example, if the bin is too large for most customer orders, packing space and materials will be wasted. On the other hand, if the bin is too small, then items from one customer order may be separated into several bins, which may lead to additional management and packing cost. For many e-commerce companies, a warehouse may manage and supply different categories of commodities, such as clothes, cosmetics and household electrical appliances. Commodities stored in each warehouse varies greatly in both size and category, so it is highly demanding that different warehouses should use different sized bins. Mining the patterns of size of customer orders using historical order data and designing different sized bins for different warehouse operational scenario may save a lot of packing cost, which is the main motivation of study in this paper.
In this paper, a novel bin design problem is proposed. In this problem, packing bins with certain geometric sizes are designed based on the customer orders. Each customer order consists of several cuboid-shaped items. Items from one order must be put into the same bin while items from different orders cannot be put into one same bin. The number of bin types are given beforehand, and the decision variables to be optimized are the sizes (length, width and height) of bins. The cost of each bin is proportional to its surface area and the objective is to minimize the total cost of bins that are used to pack all customer orders.
Related Work
The most relevant research to the topic discussed in this paper is the studies on bin packing problems. Bin packing problems are first proposed in 1970s. Since then, related work about their variants, algorithms and applications has been researched. (?) develops a branch-and-cut algorithm to solve a two-dimensional orthogonal packing problem with unloading constraints. Lower bounds of the three-dimensional bin packing problem are discussed and an exact branch-and-bound algorithm, which can solve instances with up to 90 items, is proposed (?). In (?), a branch-and-price exact method and a beam search heuristics is proposed to solve the variable cost and size bin packing problem with optional items. Due to the difficulty of obtaining optimal solutions of bin packing problems, some approximation algorithms are investigated. (?) proposes a 5/4 algorithm for the two-dimensional packing problem. In (?), an approximation algorithm for the three-dimensional bin packing problems is proposed and the performance is investigated. In (?), the variable-sized online bin packing problem is studied and a new algorithm is proposed and its upper bound is analyzed. The first approximation scheme for a nontrivial two-dimensional generalization of a classical one-dimensional packing problem in which rectangles have to be packed in finite squares is studied in (?). And some effective heuristic algorithms, such as Tabu Search based algorithms (?) (?) (?), genetic algorithms (?) (?) (?), guided local search algorithm (?), ant colony based algorithm (?), extreme point-based heuristics (?), have been developed.
There is another branch of the packing problem: the strip packing problem. In this problem, some cuboid-shaped items should be packed into a given strip orthogonally. The length and width of the strip is fixed, and the objective is to minimize the height of packing. Some exact algorithms (?) (?), approximation algorithms (?) and heuristic algorithms (?) (?) (?) have been investigated.
To the best of our knowledge, there is no research about optimizing the sizes of bins. The problem introduced in this paper is novel and worth being studied.
Bin Design Problem
In this section, the definition of the novel bin design problem will be introduced. In the problem, a number of customer orders are given, each consists of several cuboid-shaped items. All the items belongs to each order should be packed into one specific bin. To guarantee customer experience, items from one order should be put into the same bin, and one packing bin only contains the items from the same order. The total number of bin types is limited and set beforehand due to the manufacturing cost, and the decision variables are the sizes (length, width and height) of bins. What’s more, the sizes of bins in all three dimensions are monotonically increasing along the bin type index, therefore, the th type of bin can be hold in the (+1)th type of bin. The cost of each type of bin is proportional to its surface area. And the objective is to minimize the total cost to pack all customer orders.
To make our definition more clear and precise, some notations are introduced in Table 1.
Based on the description and notations above, the formulation of the bin design problem is presented as follows:
[TABLE]
The objective function indicates that the optimization goal is to minimize the total cost of bins that are used to pack all orders. For , the cost of each of the th type of bin with length , width and height is , and for , . The number of the th type of bins that are used is , because if a customer order can be packed into the th type and the th type of bin, it must be packed into the th type of bin, because the surface area of the th type of bin is smaller than that of the th type of bin.
Constraints (2)-(5) denote that the th type of bin can be contained in the th type of bin. Constraints (6)-(9) indicate that the sizes of the bins are positive integers and not greater than the corresponding upper bounds.
To solve the problem above, for each combination of , and must be calculated first. What’s more, the objective function is nonlinear, so traditional algorithms are not capable of solving the problem directly. In next section, a heuristic algorithm based on dynamic programming and depth-first tree search is developed to solve the problem.
Heuristic Algorithm
In this section, a heuristic algorithm based on dynamic programming and depth-first tree search, named DPTS algorithm, will be discussed. The dynamic programming method is used to find the optimal combinations of bin types if for each type of bins has been obtained. Depth-first tree search method is used to search the marginal bin type for each customer order and can be calculated based on the search results. The framework of DPTS is showed in Fig. 1.
For the convenience of the discussion, some definitions will be introduced first.
Definition 1. A bin type with is an expanded bin type for a bin type with if , and bin type with is a shrunken bin type for bin type with .
Definition 2. A bin type with is a marginal bin type for a customer order if the order can be packed into this type of bin, but cannot be packed into any other bin that is shrunken type of this bin type.
Dynamic Programming Method
Given for each combinations of , and , the problem proposed in the above section can be solved by a dynamic programming method. As shown in Fig. 2, there are decision steps. For the th step, where , the sizes of the th type of bins are selected from candidates. Let denote the type of bin that is selected in the th step, , and let denote the total cost if is selected in the th step. is used to indicate the incremental cost if is selected in the th step and is selected in the th step. Then the recursive function is:
where
[TABLE]
The dynamic programming method above can be interpreted as finding the shortest path between the point in step 0 and the point in step . The definition of can assure that must be an expanded type for in the final solution. And because , so must equal to in the final solution, i.e., the th type of bin must be able to pack all customer orders.
The computation complexity of the dynamic programming method is . To accelerate the computation, some tricky techniques based on ideas of divide and conquer and convex hull are used, and the computation complexity is reduced to . The accelerative dynamic programming algorithm can be seen in the Appendix.
Tree Search Method
To calculate for each bin type , one simple idea is counting the number of customer orders that can be put into the bin type, this needs an effective three dimensional bin packing algorithm to determine whether a customer order can be put into a bin or not. When the number of customer orders and the number of candidate bin types is large, the computation cost will be huge. So in this section, a depth-first tree search method is designed and implemented to calculate .
The depth-first tree search method is to search the marginal bin types for each customer order, which will be used to calculate . The basic idea of the tree search method is to sort the items in one customer order in a descending order of volume first, then search the orientation and position of each item. For the convenience of the discussion of the tree search method, some notations are introduced below.
ItemOrientation: the orientation set for each item, which is a subset of front-up, front-down, side-up, side-down, bottom-up, bottom-down. Because some items have same size at different dimensions, the size of orientation set may be less than 6, which can reduce the computation cost.
CornersX, CornersY, CornersZ: the dictionary of x, y, z-coordinates of corner points of the items and the left-bottom-back corner point of bin. The keys of the dictionary are the coordinates and the values are the number of times that each coordinate appears.
When putting a new item, it is assumed that the position of the left-bottom-back corner point of the item must be a combination of x-coordinate, y-coordinate, z-coordinate from CornersX, CornersY, CornersZ, respectively. A two-dimensional example is show in Fig. 3. Before putting items, the initial CornersX = , CornersY = . And after putting item 1, CornersX is updated to , CornersY is updated to , after putting item 2, CornersX=, CornersY=.
BestCost: the lowest cost of leaf node that is found in the search process.
NodeBinType: the length, width and height of the smallest bin that can contain items in the node.
Based on the notations above, the depth-first tree search method is shown in Algorithm 1 and Algorithm 2. In Step 8 of the DepthFirstTreeSerach, the algorithm enumerates every possible orientation and position to place a new item. In Step 11, the algorithm should determine whether a boundary and an item overlap, and whether the item is next to the boundary on x-axis, y-axis or z-axis. Being next to the boundary on x-axis means that the item cannot be moved in the direction to decrease x-coordinate of corner points of the item. In Step 14, the algorithm prunes some branches, because the marginal bin type won’t have a large cost.
The running time of the tree search algorithm depends on the number of items in customer order. And customer orders are independent, so we can execute the tree search in parallel to reduce total computation time.
To calculate , we define the intermediate results , where for each . The algorithm to calculate is shown in Algorithm 3.
In Algorithm 3, the computation of for each is also independent, so the computation can be executed in parallel to reduce total computation time.
Lemma 1. Obtaining from the Algorithm 3, then can be calculated by .
Proof: The lemma can be proved by a mathematical induction method.
Firstly, the statement in the Lemma is obviously holds for , i.e., when the number of customer orders is zero.
Secondly, assume that the statement holds when the number of orders is , then a new order is added, and assume the marginal bin types of the th order is .
Based on the logic of Algorithm 3, for any , it will be affected by the new order only if there is bin type in that is shrunken bin type of bin type . The shrunken bin types are processed as the Step 11 Step 15 in Algorithm 3, then we can get the a set of .
And will be affected by the set, because will be changed by the set. Let denote the new for , and let denote the new , then:
So after a new order is added, and if the new order can be packed into any bin type (there is at least one marginal bin type of the order that is shrunken bin type of bin type ), will be increased by one. This satisfies the definition of . This ends the proof.
Based on the lemma above, after obtaining , we can calculate . To reduce computation cost, we can get the following recursive function based on the Inclusion-exclusion principle:
.
Numerical Experiments
To demonstrate performance of the DPTS algorithm proposed in this paper, numerical experiments are designed and conducted. The order data in experiments are all collected from real e-commerce business. The distribution of item number in orders is shown in Fig. 4. It can be seen that about 75 % orders have less than or equal to 10 items. The experiments is classified into three categories based on the number of customer orders, i.e., 200000, 500000 and 1000000.
A greedy local search (GLS) algorithm and decisions of human (purchasing expert who is responsible for the final plan) are used to compare to the heuristic algorithm. The basic idea of the GLS algorithm is to gradually enlarge or shrink the bin size at every step, and then invoke a three-dimensional bin packing algorithm to evaluate the combination of bin types. If the new combination of bin types can result in less packing cost, it will be accepted and its neighbors will be searched in next step. The details of the GLS algorithm in Algorithm 4.
DPTS can optimize the total cost for different bin type numbers, and the results for 1000000 orders are shown in Fig. 5. The number of bin types is usually set to be 8 in the usual practice of bin purchasing, so the detail sizes of 8 bin types are shown in Table 2 and the percentages of orders that can be packed into each bin type are shown in Fig. 6. The cost and computational time comparison are shown in Table 3. DPTS reduce cost by 12.8% compare to human result, and 5.8% compare to GLS. More importantly, the DPTS has been used in real business and financial analysis result show that the algorithm can save about $ 20 million packing cost a year (about 10% of the total packing cost). What’s more, DPTS algorithm is about 50 times faster than the GLS algorithm. In practice, the decisions about bin purchasing for many warehouses should be made in finite time, so the efficiency of DPTS is a big advantage in applications.
Future Work
The tree search algorithm simply traverse every orientation and position regardless of the potential reward at each search branch. In the future work, we may use a function to evaluate the fitness of every orientation and position, and search in sorted fitness order to converge faster, thus more branches can be pruned to accelerate the algorithm. And for orders with more items, we may use distributed computing to reduce computation time.
Conclusion
In this paper, a novel bin design problem is proposed. Different from the classical bin packing problems, the decision variables to be optimized are the sizes of bins that are used to pack customer orders, and the objective is to minimize the total surface area of bins. Due to the complexity of the problem, a high-performance heuristic algorithm based on dynamic programming and depth-first tree search is developed. In the algorithm, depth-first tree search algorithm is used to search marginal bin types for each customer order, and based on search results, the number of customer orders that can be packed for each type of bin can be calculated, then a dynamic programming method can be applied to obtained the optimal combination of bin types. Numerical experiments’ results show that the heuristic algorithm outperforms a greedy search algorithm in terms of quality and efficiency. And financial analysis result show that the algorithm can save about $ 20 million a year. Our main contributions include: firstly, a novel bin design problem is proposed; secondly, an elaborate and effective heuristic algorithm is designed and implemented to solve the problem and numerical experiments and financial analysis based on real data are conducted to demonstrate the value of the algorithm.
Appendix
The Idea of Divide and Conquer
For a dynamic programming function as follows: , where .
We define as the time complexity of updating values in the th stage by values in the th stage, if the time complexity of each update is , then the total complexity is .
The basic process of divide and conquer method to update states is shown in Algorithm 5.
The recursive process will have levels, on level , we update times, each update has time complexity , because on level , . If we can reduce from to , the total time complexity of the process will be . The method to reduce time complexity will be discussed in next.
If we store the update information as a list of , which means that updating where by where , then the time complexity will be
.
The Idea of Convex Hull
Because the dynamic programming function in Section Dynamic Programming Method is a linear function with one independent variable (), so the process of updating values in the th stage by values in the th stage is equivalent to the following process: for each of the values, find the minimum output value from linear functions. The simple algorithm is to calculate the output value of each function and identify the minimum result. The total time complexity is . In this part, we show that the time complexity can be reduced to .
Let indicate the th linear function, where . As show in Fig. 7, we can calculate some intervals and their corresponding linear function. For any in one interval, the corresponding calculated by its corresponding function is always less than s calculated by other functions. For example, in Fig. 7, for any in , the line A will give minimum , and for any in , the obtained by line B is minimal. So if the intervals and their corresponding linear functions are calculated, binary search method can be used to determine which interval belongs to and the corresponding linear function will be used to calculate . The computation cost of binary search is , and values will be updated, so the total computation cost is .
To discuss the algorithm of calculating intervals and theirs corresponding linear functions, a data structure named ValidLinearFunction will be introduced. In the algorithm, ValidLinearFunction = , where denotes the linear function, denotes the lower bound of the interval, and denotes the upper bound. The interval of lines will be maintained when calculating. After a new line is added, we calculate it’s interval and update previous lines’ intervals by their intersection. As each line will be pushed or popped as most once, the time complexity is , and the computation cost of sorting slops of lines is . So the total computation cost is .
In the beginning of dynamic programming algorithm, the slopes of lines and the ’s () can be sorted once and used. So the time complexity can be reduced to .
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[Baker, Brown, and Katseff 1981] Baker, B. S.; Brown, D. J.; and Katseff, H. P. 1981. A 5/4 algorithm for two-dimensional packing. Journal of algorithms 2(4):348–368.
- 2[Baldi et al . 2014] Baldi, M. M.; Crainic, T. G.; Perboli, G.; and Tadei, R. 2014. Branch-and-price and beam search algorithms for the variable cost and size bin packing problem with optional items. Annals of Operations Research 222(1):125–141.
- 3[Bortfeldt and Mack 2007] Bortfeldt, A., and Mack, D. 2007. A heuristic for the three-dimensional strip packing problem. European Journal of Operational Research 183(3):1267–1279.
- 4[Bortfeldt 2006] Bortfeldt, A. 2006. A genetic algorithm for the two-dimensional strip packing problem with rectangular pieces. European Journal of Operational Research 172(3):814–837.
- 5[Caprara, Lodi, and Monaci 2005] Caprara, A.; Lodi, A.; and Monaci, M. 2005. Fast approximation schemes for two-stage, two-dimensional bin packing. Mathematics of Operations Research 30(1):150–172.
- 6[Coffman et al . 1980] Coffman, Jr, E. G.; Garey, M. R.; Johnson, D. S.; and Tarjan, R. E. 1980. Performance bounds for level-oriented two-dimensional packing algorithms. SIAM Journal on Computing 9(4):808–826.
- 7[Côté, Gendreau, and Potvin 2014] Côté, J.-F.; Gendreau, M.; and Potvin, J.-Y. 2014. An exact algorithm for the two-dimensional orthogonal packing problem with unloading constraints. Operations Research 62(5):1126–1141.
- 8[Crainic, Perboli, and Tadei 2008] Crainic, T. G.; Perboli, G.; and Tadei, R. 2008. Extreme point-based heuristics for three-dimensional bin packing. Informs Journal on computing 20(3):368–384.
