Three-dimensional packing optimization method and system using differential evolution method
By combining differential evolution with ternary tree search, a sequence of feasible solutions is generated and optimized, which solves the problem of low container space utilization in the three-dimensional packing problem and achieves efficient loading scheme optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-13
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies struggle to find the optimal solution to the three-dimensional container loading problem within a reasonable timeframe, especially when considering container loading schemes under complex constraints, resulting in low container space utilization.
A sequence of feasible solutions is generated by combining differential evolution with a ternary tree search method. The solution is then searched using a differential evolution algorithm to optimize container utilization and cargo loading quantity. Boundary constraints and decoding optimization are performed using a ternary tree model.
It improves the space utilization of containers, can find near-optimal loading solutions in a short time, and is applicable to container loading problems under various complex constraints.
Smart Images

Figure CN115204028B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cargo packing optimization technology, and in particular to a three-dimensional packing optimization method and system using differential evolution. Background Technology
[0002] In the process of cargo transportation, efficient cargo transportation has high economic value in logistics. Loading cargo with near-optimal cargo loading schemes can reduce the costs incurred in the entire cargo transportation process and effectively increase the profits of enterprises. Therefore, how to maximize the loading capacity of containers has become an increasingly important issue. In the process of constantly pursuing the completion of more cargo loading and transportation with less expenditure and less time cost, how to maximize the utilization of container loading is a key issue.
[0003] Container loading problems can be categorized in different ways depending on the conditions. For example, based on the number of containers, problems can be divided into single-container loading problems and multi-container loading problems; based on the type of goods, problems can be divided into single-configuration loading, weakly heterogeneous loading, and strongly heterogeneous loading; based on the shape of the goods, goods can be divided into regularly shaped goods and irregularly shaped goods; and based on the loading situation, problems can be divided into offline loading and online loading.
[0004] In addition to the limitations of length, width, height, and volume in the actual packing process, there are many other constraints, such as: space constraints for cargo placement, stability constraints for cargo, center of gravity constraints of the container after loading, cargo loading sequence constraints, stability constraints, and non-overlapping constraints. These constraints all affect the solution to the problem.
[0005] The three-dimensional container loading problem takes the length, width, height, volume and other factors of the container as constraints, and aims to load square goods of any size into the container as much as possible to maximize the space utilization of the container. Summary of the Invention
[0006] To overcome the aforementioned shortcomings, the present invention aims to provide a three-dimensional container loading optimization method using differential evolution. This method utilizes a ternary tree search method to generate a sequence of feasible solutions. Based on this sequence, the feasible solutions are transformed and used as the initial solution for the differential evolution algorithm. Finally, the differential evolution algorithm is used to search for feasible solutions to obtain the optimal container utilization rate and the corresponding cargo loading quantity and container loading scheme. Furthermore, a three-dimensional container loading optimization system using differential evolution is also provided.
[0007] The technical solution of this invention to solve its technical problem is:
[0008] A three-dimensional bin packing optimization method applying differential evolution includes the following steps:
[0009] Step S1: Obtain information data on the container and the goods to be loaded, and establish a ternary tree decomposition model;
[0010] Step S2: Simulate packing using a ternary tree decomposition model;
[0011] Step S3: Use a ternary tree decomposition model to generate a set of suboptimal solutions, use the differential evolution algorithm to search for them, and at the same time, apply boundary constraints during the search process and record the corresponding container loading schemes.
[0012] Step S4: Perform a selection operation to calculate the fitness of an individual, so that the best individual fitness and the corresponding container loading scheme are selected during the iteration process, thereby outputting the optimal container utilization rate and the corresponding cargo loading quantity.
[0013] As an improvement to the present invention, step S1 includes the following steps:
[0014] Step S11: Obtain the size information of the container and the information of the goods to be loaded, and classify the size information of the container into the space to be loaded.
[0015] Step S12: Encode the information of the goods to be loaded and classify them into the loading sequence; at the same time, classify and count the quantity of the goods to be loaded.
[0016] Step S13: Establish a ternary tree decomposition model.
[0017] As a further improvement of the present invention, step S2 includes the following steps:
[0018] Step S21: Simulate packing. Take a space to be loaded from the set of spaces to be loaded, and then take the goods to be loaded from the sequence of spaces to be loaded. Put the goods to be loaded into the space to be loaded. If the space to be loaded cannot hold the goods to be loaded, put the space to be loaded into the discarded space set, and then take the next space to be loaded from the set of spaces to be loaded. If the space to be loaded can hold the goods to be loaded, remove the goods to be loaded from the sequence of spaces to be loaded and register them in the loaded sequence.
[0019] Step S22: Traverse the set of spaces to be loaded, count the quantity of each type of goods in the loaded sequence, and if the quantity of a type of goods reaches the maximum, skip that type of goods in the subsequent loading process.
[0020] Step S23: Traverse the elimination space set and count the quantity of each type of goods in the loaded sequence. If the quantity of a type of goods reaches the maximum, skip that type of goods in the subsequent loading process.
[0021] Step S24: After loading is complete, organize the data and iterate through the data in the loaded sequence to count the loading quantity of each type of cargo and calculate the space utilization rate of the container.
[0022] As a further improvement of the present invention, in step S22, the types of goods are traversed to determine which type of goods the retrieved loading space can hold. If it is determined that the retrieved loading space can hold a certain type of goods, the retrieved loading space is decomposed and removed, and the decomposed space is added to the loading space set and the goods that can be loaded are added to the loaded sequence. If it is determined that the retrieved loading space cannot hold any type of goods, the retrieved loading space is removed, and another loading space is retrieved until the loading space set is empty.
[0023] As a further improvement of the present invention, in step S23, the types of goods are traversed to determine which type of goods the retrieved loading space can hold. If it is determined that the retrieved loading space can hold a certain type of goods, the retrieved loading space is decomposed and removed, and the decomposed space is added to the loading space set and the goods that can be loaded are added to the loaded sequence. If it is determined that the retrieved loading space cannot hold any type of goods, the retrieved loading space is removed, and another loading space is retrieved until the elimination space set is empty.
[0024] As a further improvement of the present invention, step S3 includes the following steps:
[0025] Step S31: Initialize the differential evolution algorithm parameters and simultaneously read the size information of the container and the cargo;
[0026] Step S32: Use a ternary tree model to generate a set of suboptimal solutions as the initial population for the differential evolution algorithm, and calculate the fitness of the initial population.
[0027] Step S33: After the mutation and crossover operation, the population is further optimized and its boundaries are restricted using a tritree model;
[0028] Step S34: Select a mutation strategy to perform mutation operations on the target individual to generate a mutated individual.
[0029] As a further improvement of the present invention, step S4 includes the following steps:
[0030] Step S41: Perform crossover operations on the mutated individuals and the target individuals to produce experimental individuals. Use a ternary tree decomposition model to impose boundary condition constraints on the experimental individuals and record the corresponding container loading schemes.
[0031] Step S42: Perform the selection operation. If the experimental individual is superior to the target individual, the experimental individual replaces the target individual to perform the next generation of evolution.
[0032] Step S43: Repeat step S34 until the termination condition is met, and output the optimal container utilization rate and the corresponding cargo loading quantity and loading plan.
[0033] A three-dimensional bin packing optimization system applying differential evolution method, comprising:
[0034] The acquisition module is used to acquire information data about the container and the goods to be loaded, and to establish a ternary tree decomposition model;
[0035] The simulation module is used to simulate bin packing using a ternary tree decomposition model.
[0036] The search constraint module is used to generate a set of suboptimal solutions using a ternary tree decomposition model, search using a differential evolution algorithm, and simultaneously impose boundary constraints during the search process, recording the corresponding container loading schemes.
[0037] The optimization module is used to calculate the fitness of an individual, so that the best individual fitness and the corresponding container loading scheme are selected during the iteration process, thereby outputting the optimal container utilization rate and the corresponding cargo loading quantity.
[0038] In this invention, a feasible solution sequence is generated using a ternary tree search method. Based on this, the feasible solution sequence is transformed and regarded as the initial solution of the differential evolution algorithm. Finally, the differential evolution algorithm is used to search for feasible solutions to obtain the optimal container utilization rate and the corresponding cargo loading quantity and container loading scheme. Attached Figure Description
[0039] For ease of explanation, the present invention will be described in detail below with reference to the preferred embodiments and accompanying drawings.
[0040] Figure 1 This is a flowchart illustrating the steps of the present invention;
[0041] Figure 2 This is a flowchart of step S2 of the present invention. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0043] The Container Loading Problem (CLP) is a problem widely involved in the industrial field. Container loading is a combinatorial optimization problem with complex constraints. The solution is complex and computationally intensive. The Three-Dimensional Bin Packing Problem (3D-BPP) is a typical problem in container loading and is a strongly NP-hard problem, which is extremely difficult to solve in practical applications.
[0044] Fanslau and Bortfeldt categorized the solution to the 3D Container Loading Problem (CLP) into traditional heuristic methods, metaheuristic methods, and tree search methods. CLP is a combinatorial optimization problem with complex constraints, and its solution is complex and computationally intensive. Although researchers have employed various methods to study this problem, they have been unable to find the optimal solution within a reasonable timeframe. Therefore, heuristic methods and intelligent optimization methods have become the preferred approaches for solving the 3D container loading problem.
[0045] Yu Mingzheng et al. proposed a two-layer heuristic genetic method to solve the bin packing problem. First, a heuristic method based on spatial partitioning is used to generate the initial solution of the genetic method. Then, the genetic method is divided into two layers from the two search directions of breadth and depth to improve the stability of the method and reduce the gap between the calculated solution and the optimal solution.
[0046] Zhang Defu et al. proposed a hybrid simulated annealing evolution method to solve the three-dimensional bin packing problem by combining a block loading-based heuristic method with a simulated annealing method. The block loading method is used to generate the loading sequence, and then the simulated annealing method is used to search for the optimal solution in the encoding space.
[0047] Wang Suxin et al. proposed an improved crow search method to solve the 3D bin packing problem. The method incorporates a multi-probability random walk strategy and a solution repair strategy, which improves the global optimization capability of the method.
[0048] Chen Li et al. proposed a hybrid genetic-simulated annealing method to solve the three-dimensional bin packing problem, which improved the genetic method to solve the premature convergence problem and the time problem of the simulated annealing method, and has good applicability to the three-dimensional bin packing problem.
[0049] However, current technologies for solving the container loading problem have not yet achieved the possibility of efficient container loading.
[0050] like Figures 1 to 2 As shown, this invention provides a three-dimensional bin packing optimization method using differential evolution, comprising the following steps:
[0051] Step S1: Obtain information data on the container and the goods to be loaded, and establish a ternary tree decomposition model;
[0052] Step S2: Simulate packing using a ternary tree decomposition model;
[0053] Step S3: Use a ternary tree decomposition model to generate a set of suboptimal solutions, use the differential evolution algorithm to search for them, and at the same time, apply boundary constraints during the search process and record the corresponding container loading schemes.
[0054] Step S4: Perform a selection operation to calculate the fitness of an individual, so that the best individual fitness and the corresponding container loading scheme are selected during the iteration process, thereby outputting the optimal container utilization rate and the corresponding cargo loading quantity.
[0055] This invention proposes a differential evolution algorithm based on a hybrid search strategy to solve the three-dimensional container loading problem, based on the ternary tree search method and the differential evolution algorithm. First, a feasible solution sequence is generated using the ternary tree search algorithm. Then, the feasible solution sequence is transformed and regarded as the initial solution of the differential evolution algorithm. Finally, the improved differential evolution algorithm is used to search for feasible solutions to obtain the optimal container utilization rate and the corresponding cargo loading quantity and container loading scheme.
[0056] Within this invention, the Differential Evolution Algorithm (DE) is a highly efficient intelligent optimization algorithm, characterized by its simple structure, ease of implementation, fast convergence, and strong robustness. The standard DE algorithm consists of four basic steps: initialization, mutation, crossover, and selection. The mutation, crossover, and selection steps are repeated in subsequent DE iterations until the termination condition is met.
[0057] A ternary tree is a classic tree structure in data structures. Suppose there is a non-empty ternary tree (Tree) containing three branch child nodes. If its child nodes are not empty, then each branch node also has three branch child nodes. Using the method of traversing the ternary tree structure to decompose the space effectively avoids the phenomenon of space interference, but it cannot handle more complex constraints. The ternary tree model simplifies the possibilities of space solutions and reduces complexity, but at the same time, it also abandons some possibilities of obtaining better solutions. In contrast, the method of maximizing the remaining space decomposition considers as many loading schemes as possible, but the complexity may also grow exponentially.
[0058] Step S1 includes the following steps:
[0059] Step S11: Obtain the size information of the container and the information of the goods to be loaded, and classify the size information of the container into the space to be loaded.
[0060] Step S12: Encode the information of the goods to be loaded and classify them into the loading sequence; at the same time, classify and count the quantity of the goods to be loaded.
[0061] Step S13: Establish a ternary tree decomposition model.
[0062] Specifically, step S1 includes the following sub-steps:
[0063] 1.1 Read the container size information and the information of the goods to be loaded, such as the size and quantity of each type of goods, and read the container size information into the space set to be loaded [SC], which is used as the initial space to be loaded;
[0064] 1.2 Generate a number for each type of goods based on the quantity of each type of goods. This number represents the number of each type of goods that needs to be loaded into the container. Encode the randomly generated information of the goods to be loaded to generate a loading sequence [LS]. Assume that the value of the LS sequence is , indicating that LS contains 3 types of goods, of which there are 2 of the first type of goods, 3 of the second type of goods, and 3 of the third type of goods. The order of the numbers represents the loading order of the goods. Before loading, count the quantity of each type of goods. If the quantity of a certain type of goods is greater than the maximum value, then modify it to the maximum value. Otherwise, there is no impact, and proceed to the next step.
[0065] Within this invention, step S2 includes the following steps:
[0066] Step S21: Simulate packing. Take a space to be loaded from the set of spaces to be loaded, and then take the goods to be loaded from the sequence of spaces to be loaded. Put the goods to be loaded into the space to be loaded. If the space to be loaded cannot hold the goods to be loaded, put the space to be loaded into the discarded space set, and then take the next space to be loaded from the set of spaces to be loaded. If the space to be loaded can hold the goods to be loaded, remove the goods to be loaded from the sequence of spaces to be loaded and register them in the loaded sequence.
[0067] Step S22: Traverse the set of spaces to be loaded, count the quantity of each type of goods in the loaded sequence, and if the quantity of a type of goods reaches the maximum, skip that type of goods in the subsequent loading process.
[0068] Step S23: Traverse the elimination space set and count the quantity of each type of goods in the loaded sequence. If the quantity of a type of goods reaches the maximum, skip that type of goods in the subsequent loading process.
[0069] Step S24: After loading is complete, organize the data and iterate through the data in the loaded sequence to count the loading quantity of each type of cargo and calculate the space utilization rate of the container.
[0070] In step S22, the types of goods are traversed to determine which type of goods the retrieved loading space can hold. If it is determined that the retrieved loading space can hold a certain type of goods, the retrieved loading space is decomposed and removed. At the same time, the decomposed space is added to the loading space set and the goods that can be loaded are added to the loaded sequence. If it is determined that the retrieved loading space cannot hold any type of goods, the retrieved loading space is removed and another loading space is retrieved until the loading space set is empty.
[0071] Additionally, in step S23, the types of goods are traversed to determine which type of goods the retrieved loading space can hold. If it is determined that the retrieved loading space can hold a certain type of goods, the retrieved loading space is decomposed and removed. At the same time, the decomposed space is added to the loading space set and the goods that can be loaded are added to the loaded sequence. If it is determined that the retrieved loading space cannot hold any type of goods, the retrieved loading space is removed and another loading space is retrieved until the elimination space set is empty.
[0072] Specifically, step S2 includes:
[0073] 2.1. Start loading and simulate the container loading process. Loading begins according to the ternary tree model. A space to be loaded is taken from SC, and the goods to be loaded are taken from LS. These goods are then loaded into this space according to the loading rules. The length, width, and height of each goods must be parallel to the three axes of the container. If the space cannot hold the goods, it is placed in the discarded space [ES], and a space to be loaded is taken from SC. If the space can hold the goods, the goods' sequence number is removed from LS and placed into the loaded sequence [Pack_in]. The loaded space is divided into three subspaces (top, left, and right) according to the rules, and this space is removed from SC. These three new subspaces are then placed into SC. If LS is fully loaded or there are no spaces to be loaded in SC, Step 3 is complete; otherwise, this step is repeated. When Step 2.1 is completed, if LS is empty, Step 2.2 is performed; if SC is empty, Step 2.3 is performed.
[0074] 2.2. Traverse SC. During each traversal, count the quantity of each type of goods in Pack_in. If the loaded quantity of a type of goods reaches the maximum, skip that type of goods in the subsequent loading process. Then traverse the types of goods and determine which type of goods can be loaded into this space. If a certain type of goods can be loaded, decompose and remove this space, add the decomposed space to SC, and put the loadable goods into Pack_in. If this space cannot be loaded with any type of goods, remove it and take a space until SC is empty.
[0075] 2.3. Traverse ES. During each traversal, count the quantity of each type of goods in Pack_in. If the loaded quantity of a type of goods reaches the maximum, skip that type of goods in the subsequent loading process. Then traverse the types of goods and determine which type of goods can be loaded into this space. If a certain type of goods can be loaded, decompose and remove this space, add the decomposed space to SC, and put the goods that can be loaded into Pack_in. If this space cannot be loaded with any type of goods, remove it and take a space until ES is empty.
[0076] 2.4 After loading is complete, organize the data, iterate through the data in Pcak_in, and finally calculate the loading quantity of each type of cargo and the space utilization rate of the container.
[0077] Within this invention, step S3 includes the following steps:
[0078] Step S31: Initialize the differential evolution algorithm parameters and simultaneously read the size information of the container and the cargo;
[0079] Step S32: Use a ternary tree model to generate a set of suboptimal solutions as the initial population for the differential evolution algorithm, and calculate the fitness of the initial population.
[0080] Step S33: After the mutation and crossover operation, the population is further optimized and its boundaries are restricted using a tritree model;
[0081] Step S34: Select a mutation strategy to perform mutation operations on the target individual to generate a mutated individual.
[0082] Specifically, step 3 includes the following operations:
[0083] 3.1 Initialize the differential evolution (DE) algorithm parameters, such as the number of iterations, crossover operator, mutation operator, etc., and read the dimensions of the container and the cargo;
[0084] 3.2. A set of suboptimal solutions is generated using a ternary tree model as the initial population for the differential evolution algorithm, and the fitness of the initial population is calculated.
[0085] 3.3 After the mutation and crossover operations, the population is further optimized and bounded by a ternary tree model, so that the choice of mutation strategy has little impact on the performance of the current algorithm. A mutation strategy can be randomly selected or a mutation and crossover strategy can be designed by ourselves.
[0086] 3.4. The improved mutation strategy is used to mutate the target individual, generating mutated individuals. This improves the mutation process of the differential evolution algorithm, preventing the generation of small or negative population individuals during mutation, thus making the algorithm applicable to the bin packing problem. The mutation formula is as follows:
[0087] ;
[0088] 3.5. Perform cross-operations on the mutated individuals and the target individuals to produce test individuals. To prevent the number of test individuals from exceeding the maximum quantity of each type of cargo, use a ternary tree search to impose boundary conditions on the test individuals and record the corresponding container loading schemes. Calculate the fitness of this individual so that the optimal individual fitness and the corresponding container loading scheme can be recorded during the iteration process.
[0089] Within this invention, step S4 includes the following steps:
[0090] Step S41: Perform crossover operations on the mutated individuals and the target individuals to produce experimental individuals. Use a ternary tree decomposition model to impose boundary condition constraints on the experimental individuals and record the corresponding container loading schemes.
[0091] Step S42: Perform the selection operation. If the experimental individual is superior to the target individual, the experimental individual replaces the target individual to perform the next generation of evolution.
[0092] Step S43: Repeat step S34 until the termination condition is met, and output the optimal container utilization rate and the corresponding cargo loading quantity and loading plan.
[0093] Specifically, step S4 includes:
[0094] 4.1 Perform crossover operations on the mutated individuals and the target individuals to produce test individuals. To prevent the number of test individuals from exceeding the maximum quantity of each type of cargo, use a ternary tree search to impose boundary conditions on the test individuals and record the corresponding container loading schemes. Calculate the fitness of this individual so that the best individual fitness and the corresponding container loading scheme can be recorded during the iteration process.
[0095] 4.2. Perform the selection operation. If the experimental individual is superior to the target individual, then the experimental individual replaces the target individual to perform the next generation of evolution.
[0096] 4.3 Repeat step 3.3 until the termination condition is met, and output the optimal container utilization rate and the corresponding cargo loading quantity; In this invention, fitness is used as a measure of the quality of each individual in the current population in the differential evolution algorithm. The fitness function used in this invention is as follows:
[0097] ,
[0098] in The quantity representing the type of goods; Represents the volume of each type of goods; This represents the quantity of each type of cargo loaded into the container; These represent the length, width, and height of the container, respectively.
[0099] When the differential evolution algorithm performs a selection operation, the fitness value determines whether to replace individuals in the initial population with individuals from the new population for the next evolution.
[0100] Within this invention, for the three-dimensional bin packing problem in practical applications, the constraints to be considered vary depending on the application background. This invention imposes the following constraints on the problem under study:
[0101] (1) The shape of both the cargo and the container is rectangular or square;
[0102] (2) Goods can only be placed facing forward;
[0103] (3) There is no limit to the weight of the goods, and the situation where the bottom layer of goods is crushed is not taken into consideration;
[0104] (4) The goods must be placed parallel to the axis of the container and there must be no overlap between the goods;
[0105] (5) The dimensions of the goods must be smaller than the dimensions of the container, that is, the items to be packed into the container must be completely packed into the container.
[0106] This invention also provides a three-dimensional bin packing optimization system applying differential evolution, comprising:
[0107] The acquisition module is used to acquire information data about the container and the goods to be loaded, and to establish a ternary tree decomposition model;
[0108] The simulation module is used to simulate bin packing using a ternary tree decomposition model.
[0109] The search constraint module is used to generate a set of suboptimal solutions using a ternary tree decomposition model, search using a differential evolution algorithm, and simultaneously impose boundary constraints during the search process, recording the corresponding container loading schemes.
[0110] The optimization module is used to calculate the fitness of an individual, so that the best individual fitness and the corresponding container loading scheme are selected during the iteration process, thereby outputting the optimal container utilization rate and the corresponding cargo loading quantity.
[0111] This invention is compared with the Particle Swarm Optimization (PSO) method, the traditional Differential Evolution method, the Simulated Annealing (SA) method, and the Ant Colony Optimization (ACO) method through experiments.
[0112] This invention does not use a random method to generate the initial population, but instead uses a ternary tree model. When handling boundary conditions, it does not use traditional upper and lower bounds to handle the boundaries of experimental individuals; instead, it uses a ternary tree model to determine whether the generated solutions can form a correct binning sequence. This invention sets parameters such as the maximum number of iterations, crossover probability, and scaling factor, as shown in Table 1 below:
[0113] Table 1 Algorithm Parameter Table
[0114]
[0115] The present invention was tested, and the container dimensions used in this test set all conform to international standards. The test case includes 7 documents for the container of the specified size. Each file contains 100 datasets, and the types of goods to be packed are the same in each dataset. In this section, the invention relates to various types of goods. Five test cases were randomly selected from each of the four files for testing. Since the search process was random each time, each test case was run 10 times individually, and the best result from the 10 runs was selected and displayed. The results of each test case are shown in Table 2 below:
[0116] Table 2 File test results:
[0117]
[0118] Each test case in the file contains three types of goods, with varying quantities of each type. In the experiment, test cases 1, 2, 32, 53, and 84 were randomly selected. Among them, the container utilization rate of test cases 32 and 84 reached over 80%, and the container utilization rate of the other three test cases also reached around 80%, as shown in Table 3 below:
[0119] Table 3 File test results:
[0120]
[0121] Each test case in the file contains 5 types of goods, with varying quantities of each type. In the experiment, test cases 20, 40, 77, 86, and 97 were randomly selected. Except for test case 20, the container utilization rate of the other test cases all reached over 80%, with test cases 77 and 97 reaching over 84% and test case 20 reaching over 79%.
[0122] Table 4 File test results
[0123]
[0124] Each test case in the file contains 8 types of goods, with varying quantities of each type. In the experiment in the document, test cases 7, 17, 40, 57 and 78 were randomly selected. Among them, the container utilization rate of test case 78 reached 83%, the effect of test case 57 was poor, only 79%, and the effect of the remaining test cases reached more than 79%.
[0125] Table 5 File test results:
[0126]
[0127] Each test case in the file contains 10 categories of goods, with varying quantities in each category. The experiment in the document randomly selected test cases 7, 17, 40, 57, and 83. The container utilization rate of each test case was relatively poor, with only test case 7 having the highest utilization rate of 77.66%. This shows that as the cargo size increases, the container utilization rate gradually decreases.
[0128] During the above experiments, it was found that the encoding method of the ternary tree approach was difficult to solve for each test case in the file in batches, and the solution time was too long. Therefore, the invention optimized the encoding method for model solving by applying the present invention to encode individual boxes, assigning each box a unique code. This encoding method not only reduces the number of iterations during runtime, but is also more suitable for cases like Bischoff and Ratcliff test cases where the number of goods to be loaded is not large. For example, if there are 20 boxes to be loaded, they are encoded as follows: Then, the sequence is randomly shuffled, and the shuffled sequence is the loading order. Then, the optimal solution is searched using a ternary tree model and differential evolution algorithm.
[0129] This invention will each The 100 test cases in the file are considered as one large test case. The average of the 100 test cases in the file was used as the result of the large test cases, and each large test case was run 10 times and the average was used for method comparison. The results are shown in Tables 6, 7 and 8 below:
[0130] Table 6: Comparison of Results
[0131]
[0132] Table 7 Comparison of Results:
[0133]
[0134] Table 8. Comparison of Results:
[0135]
[0136] The results in Tables 6 to 8 above demonstrate the superior performance of this invention in solving the three-dimensional packing problem.
[0137] This invention utilizes a ternary tree model to generate a set of suboptimal solutions as the initial population for a differential evolution algorithm. The differential evolution algorithm searches for feasible solutions to the problem. During the search process, a ternary tree search model is used to impose boundary constraints on the population after crossover. This invention reduces the number of searches, improves search capability, and accelerates convergence speed, demonstrating feasibility and superiority in handling three-dimensional container loading problems. This invention can be widely applied to container loading and warehouse cargo storage problems at docks, ports, and other locations.
Claims
1. A three-dimensional packing optimization method using a differential evolution method, characterized by, It comprises the following steps: Step S1, obtaining information data of containers and goods to be loaded, and establishing a ternary tree decomposition model; Step S2, simulating loading by using the ternary tree decomposition model; Step S3, generating a set of suboptimal solutions by using the ternary tree decomposition model, searching by using the differential evolution algorithm, and performing boundary constraint in the searching process, and recording the corresponding container loading scheme, Wherein, step S3 comprises the following steps: Step S31, initializing the differential evolution algorithm parameters and reading the size information of the container and the size information of the goods; Step S32, generating a set of suboptimal solutions by using the ternary tree model as the initial population of the differential evolution algorithm, and calculating the fitness of the initial population; Step S33, optimizing the population after mutation and crossover operation by using the ternary tree model and performing boundary restriction; Step S34, selecting a mutation strategy to mutate the target individual to generate a mutated individual; Step S4, performing selection operation, calculating the fitness of the individual, selecting the best individual fitness and the corresponding container loading scheme in the iteration process, and outputting the optimal container utilization rate and the corresponding goods loading quantity.
2. The method according to claim 1, wherein, Step S1 comprises the following steps: Step S11, obtaining the size information of the container and the information of the goods to be loaded, and classifying the size information of the container into a set of to-be-loaded spaces; Step S12, encoding the information of the to-be-loaded goods and classifying the to-be-loaded goods into a to-be-loaded sequence, and classifying and counting the number of the to-be-loaded goods; Step S13, establishing a ternary tree decomposition model.
3. The method according to claim 2, wherein, Step S2 comprises the following steps: Step S21, simulating loading, taking out a to-be-loaded space from the to-be-loaded space set, and taking out the current goods to be loaded from the to-be-loaded sequence, and loading the taken-out current goods to be loaded into the taken-out to-be-loaded space, if the taken-out to-be-loaded space cannot accommodate the taken-out current goods to be loaded, then the taken-out to-be-loaded space is put into the eliminated space set, and the next to-be-loaded space is taken out from the to-be-loaded space set; if the taken-out to-be-loaded space can accommodate the taken-out current goods to be loaded, then the taken-out current goods to be loaded are removed from the to-be-loaded sequence and recorded in the loaded sequence; Step S22, traversing the to-be-loaded space set, counting the number of each type of goods in the loaded sequence, and skipping the type of goods if the loaded number of the type of goods reaches the maximum; Step S23, traversing the eliminated space set, counting the number of each type of goods in the loaded sequence, and skipping the type of goods if the loaded number of the type of goods reaches the maximum; Step S24, completing loading, sorting data, traversing the data in the loaded sequence, counting the loading quantity of each type of goods, and calculating the space utilization rate of the container.
4. The method according to claim 3, wherein, In step S22, the category of the goods is traversed to determine which category of goods can be loaded into the removed to-be-loaded space. If it is determined that the removed to-be-loaded space can be loaded into a category of goods, the removed to-be-loaded space is decomposed and removed, and the decomposed space is added to the to-be-loaded space set and the loadable goods are added to the loaded sequence. If it is determined that the removed to-be-loaded space cannot be loaded into any category of goods, the removed to-be-loaded space is removed, and another to-be-loaded space is taken until the to-be-loaded space set is empty.
5. The method according to claim 3, wherein, In step S23, the category of the goods is traversed to determine which category of goods can be loaded into the removed to-be-loaded space. If it is determined that the removed to-be-loaded space can be loaded into a category of goods, the removed to-be-loaded space is decomposed and removed, and the decomposed space is added to the to-be-loaded space set and the loadable goods are added to the loaded sequence. If it is determined that the removed to-be-loaded space cannot be loaded into any category of goods, the removed to-be-loaded space is removed, and another to-be-loaded space is taken until the to-be-loaded space set is empty.
6. The method according to claim 3, wherein, Step S4 includes the following steps: Step S41, performing a crossover operation on the variation individual and the target individual to produce a trial individual, performing boundary condition limitation on the trial individual using the ternary tree decomposition model, and recording the corresponding container loading scheme; Step S42, performing a selection operation. If the trial individual is better than the target individual, the trial individual replaces the target individual to perform the next generation evolution; Step S43, repeating step S34 until the termination condition is met, and outputting the optimal container utilization rate and the corresponding goods loading quantity and loading scheme.
7. A three-dimensional packing optimization system using differential evolution method for implementing the method of claim 6, characterized in that, Comprise: An acquisition module for acquiring information data of containers and goods to be loaded, and establishing a ternary tree decomposition model; A simulation module for simulating container loading using the ternary tree decomposition model; A search constraint module for generating a set of suboptimal solutions using the ternary tree decomposition model, searching using a differential evolution algorithm, performing boundary constraint during the search process, and recording the corresponding container loading scheme; A preferred module for calculating the fitness of individuals, selecting the best individual fitness and the corresponding container loading scheme in the iteration process, and outputting the optimal container utilization rate and the corresponding goods loading quantity.