The 3rd Yangtze River Delta University Mathematical Modeling Competition in 2023] Detailed mathematical modeling process of A-question express package packing optimization problem

insert image description here

Related Links

[The 3rd Yangtze River Delta University Mathematical Modeling Contest in 2023] A 20-page complete paper and code on optimization of express package packing

1 topic

In 2022, China will deliver more than 100 billion packages a year, accounting for more than half of the global express delivery volume. In recent years, the number of new packages in China every year is equivalent to the number of packages in the entire United States in one year. Ten years ago, China was still the country with the most expensive logistics costs. At present, China has established the most powerful and advanced express logistics system in the world. . In the packaging process of the package, it is very important to select the appropriate packaging consumables. Due to the large number of packages, a slight reduction in the cost of consumables for each package can also bring great economic benefits. Figure 1 is some physical cartons, and Figure 2 is a schematic diagram of some kind of three-dimensional packing.

insert image description here

Fig.1 Carton styleFig.2 Three-dimensional packing diagram

Order data and consumable data are given in Appendix 1, Packing Data. With the above background in mind, ask your team to complete the following questions:

Question 1: For the order data and consumable data given in the packing data in Appendix 1, for each order, use boxes or bags to pack them respectively. Please design a suitable loading plan, requiring the less consumables to be used, the better. When the number of consumables is the same, the smaller the total volume of the consumables, the better. Gives the total number of uses for each consumable and the total volume of the consumable.

Question 2: According to the data in Appendix 1, it is now necessary to optimize the size of consumables. Please give an optimization plan for the size of consumables. It is required that the number of consumables after optimization remains the same, but the size of the consumables is changed; for the items successfully loaded in question 1, the number of boxes or bags used in the optimized solution should be minimized; the total volume cannot exceed the total volume of the original solution; At the same time, the smaller the total volume of consumables, the better. The specific size of each consumable after optimization, the total number of usage and the total volume of the consumable are given.

Question 3: The above two questions assume that the goods and consumables are rigid. If the goods and consumables are flexible or can be slightly squeezed, please complete questions 1 and 2 again. According to the actual situation, when considering the stretching of consumables here, the length, width and height shall not exceed 5% of the original size.

hint:

1. It is necessary to give a plan for box packing (all boxes are used as consumables), bag packing (all bags are used as consumables), and two consumables are used at the same time.
2. The length, width, and height of the items can be interchanged arbitrarily. For example, the first item in case1 can be regarded as 170 in length, 110 in width, and 27 in height, or 110 in length, 170 in width, and 27 in height.
3. When using a bag to store items, the judging standard that can be loaded is to meet the following two conditions at the same time: bag length + bag height ≥ item length + item height; bag width + bag height ≥ item width + item height.
4. In the packing data in Appendix 1, the same case number is regarded as the same order, the items of the same order can be packed in the same box (bag), and the items of different orders must be packed in different boxes (bags).
5. For a certain order item in the packing data in Appendix 1, if the consumables cannot be loaded anyway, this item does not need to be considered.
6. The weight of consumables is not considered for the time being.
7. Table 1 is an example of an order form, and Table 2 is a consumable information table. For more detailed data, see Appendix 1.

Table 1 Partial order table (example)

case L (long) W (width) H (high) num
1 170 110 27 7
1 210 200 30 1
2 105 105 100 2
2 135 110 110 5
3 208 140 18 5
3 90 90 75 1
4 115 65 35 1
5 250 190 53 3
6 140 140 48 2
6 225 80 35 2
7 292 166 87 1
7 320 240 70 1
8 228 148 26 2

Table 2 Consumables information table

consumable name consumable type long Width high weight
Ordinary No. 1 bag bag 250 190 1 10
Ordinary No. 2 bag bag 300 250 1 8
Ordinary No. 3 bag bag 400 330 1 15
Ordinary No. 4 bag bag 450 420 1 23
Ordinary No. 1 self-operated carton box 165 120 55 45
Ordinary No. 2 self-operated carton box 200 140 70 67
Ordinary No. 3 self-operated carton box 200 150 150 103
Ordinary No. 4 self-operated carton box 270 200 90 132
Ordinary No. 5 self-operated carton box 300 200 170 179

2 ideas

2.1 Question 1

This is a three-dimensional bin packing algorithm problem in goal programming. According to the order data in the attachment 1.csv file, the following information can be obtained:

  • Each order has multiple products, and each product is different in length, width, height and quantity.
  • Each order requires the use of a certain number of consumables.
  • Each consumable comes in a variety of different sizes and weights.

In order to more efficiently calculate the amount of boxes required for each order, 3D modeling software can be used to simulate the use of boxes and bags of different sizes and shapes. The approximate modeling process is as follows:

  1. First, all products need to be normalized according to their length, width, and height, so that all products have the same size unit. For example, the length, width, and height of all products can be divided by a standard length (such as 170mm) to obtain the normalized size.
  2. Then you need to determine what size and shape box or bag is best for each product, and how many you need to use. This process can optimize the algorithm according to the actual situation, and the following factors can be considered:
  • Is the box or bag sized to hold the product?
  • Will the box or bag be shaped to accommodate the shape of the product?
  • Can I meet the consumable quantity requirements when using a single box or bag?
  • If multiple boxes or bags are used, are they sized and shaped to maximize space?
  • If using multiple boxes or bags, is there any overlap between them, resulting in wasted space?
  1. For each order, the total quantity and total volume of the boxes or bags it needs to be used needs to be calculated. The exact calculation method depends on the chosen optimization strategy. In general, the following two strategies can be considered:
    • Greedy Algorithm: Choose the product combination that can minimize the number of consumables each time, and try to use the most suitable box or bag to load them. If the current combination cannot meet the requirements for the quantity of consumables, continue to select other product combinations until a suitable combination is found or there are no more options. The advantage of this strategy is that it is faster, but there may be combinations that cannot meet the requirements for the number of consumables.
    • Dynamic programming algorithm: pre-calculate the quantity and volume of consumables for all possible combinations, and then gradually select the appropriate combination and boxes or bags according to actual needs. The advantage of this strategy is that it can ensure that all consumable quantity requirements are met, but the calculation is relatively large.

2.2 Question 2

I split Attachment 1 into two csv files. For the follow-up explanation, order data.csv and all consumable data.csv data, the following optimization scheme can be used to change the size of consumables, while minimizing the number of boxes or bags used, and The total volume cannot exceed the total volume of the original protocol. The modeling process for this problem is as follows.

  1. Determine the goals and constraints of the optimization scheme: reduce the number of boxes or bags used, the total volume cannot exceed the total volume of the original scheme, and the smaller the total volume of consumables, the better.
  2. Establish a mathematical model: define a function f ( d 2 ) f(d_2)f(d2) , which means put all products into the sized 2 d_2d2The minimum space required in a box or bag.
  3. Design algorithm: According to the above mathematical model, design an algorithm to calculate the optimal d 2 d_2d2size. Specifically, methods such as a greedy algorithm or a dynamic programming algorithm may be used for calculation.
  4. Implementation algorithm: implement the designed algorithm into the program, and call the program to calculate the optimal d 2 d_2d2size.
  5. Analyze algorithm performance: perform performance analysis on the algorithm, including the evaluation of time complexity, space complexity, etc., to determine whether the algorithm meets the requirements.
  6. Continuously optimize the algorithm: If the performance of the algorithm is not satisfactory, the algorithm can be optimized to improve its efficiency and accuracy.

2.3 Question 3

(1) Problem 1 Improvement

Based on the greedy algorithm or dynamic programming algorithm, considering the flexible properties of consumables, after normalizing the size of each product, calculate the minimum volume of the product that can be placed in a box or bag under different sizes. If the shape of the product is flexible or slightly extrudable, then when the product is placed in a box or bag of size k, the length, width and height do not exceed 0.5 × k 0.5\times k0.5×k limit.

(2) Improvement of problem 2

On the basis of the original model, consider the flexible properties of goods and consumables, that is, when the goods or consumables are flexible or slightly extruded, the length, width and height should be limited to 5% of the original size when calculating the occupied space within. For each product, divide its length, width, and height by d 2 d_2d2, get three proportional coefficients r 1 , r 2 , r 3 r_1, r_2, r_3r1,r2,r3, and then multiply them together to get the occupied space.

3 Modeling scheme

3.1 Question 1

The following is a 3D bin packing algorithm using a greedy algorithm for each order, with the goal of reducing the number of consumables and optimizing the total volume of consumables:

  1. First, all products need to be normalized by size so that all products have the same size unit. For example, for a product whose length, width, and height are 170mm, 110mm, and 27mm respectively, it can be normalized to a size of 170mm×110mm×27mm.

  2. Then, you need to calculate the total quantity and total volume of boxes or bags you need to use for each order. The exact calculation method depends on the chosen optimization strategy.

  3. For each order, a three-dimensional greedy algorithm can be used for box packing. Specific steps are as follows:

. . . Please download the complete document
and the following is the specific description of the mathematical formula:

d p [ i ] [ j ] [ k ] dp[i][j][k] d p ​​[ i ] [ j ] [ k ] means the firstiiChoose size jjfrom i productsThe product of j is put into sizekkThe optimal solution for boxes or bags of k , where dp [ i ] [ j ] [ k ] dp[i][j][k]d p ​​[ i ] [ j ] [ k ] is defined as follows:

. . . slightly, please download the full document

3.2 Question 2

For the part of the order data given in the packing data Attachment 1.csv and all consumables data Attachment 2.csv data, mathematical models can be used to optimize the size of consumables to reduce the number of boxes or bags used and the total volume cannot exceed the original plan The smaller the total volume and the total volume of consumables, the better the goal.
Suppose the size of each consumable in the original plan is d 1 d_1d1, the quantity is n 1 n_1n1, the total volume is V 1 V_1V1;The size of each consumable in the optimized scheme is d 2 d_2d2, the quantity is still n 2 n_2n2, the total volume is V 2 V_2V2. The following questions need to be solved:

. . . strategy, please download the full document
After one of the above conditions is met, the optimal

3.3 Question 3

(1) Improving problem one idea

On the basis of the greedy algorithm, considering the flexible properties of consumables, after normalizing the size of each product, calculate the minimum volume of the product that can be placed in a box or bag under different sizes. If the shape of the product is flexible or slightly extrudable, then when the product is placed in a box or bag of size k, the length, width and height do not exceed 0.5 × k 0.5\times k0.5×k limit.

The specific mathematical model is as follows:

. . . slightly, please download the full document

(2) Problem 2 Improvement Ideas

  1. On the basis of the original model, consider the flexible properties of goods and consumables, that is, when the goods or consumables are flexible or slightly extruded, the length, width and height should be limited to 5% of the original size when calculating the occupied space within.

  2. For each product, divide its length, width, and height by d 2 d_2d2, get three proportional coefficients r 1 , r 2 , r 3 r_1, r_2, r_3r1,r2,r3, and then multiply them together to get the occupied space. The specific mathematical model is as follows:
    . . . slightly, please download the full document

4 How to obtain the complete document

Look at the bottom of my Zhihu article.

zhuanlan.zhihu.com/p/628512849

Guess you like

Origin blog.csdn.net/weixin_43935696/article/details/130616389