Three-dimensional encasement method based on black wing-based hybrid heuristic algorithm

By combining the Black-winged Kite hybrid heuristic algorithm with the hyperplane-region constraint mechanism, the problem of low efficiency of 3D packing algorithms in the transportation of special goods is solved, and an efficient and safe packing scheme optimization is achieved.

CN122066027APending Publication Date: 2026-05-19XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610145043.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-02
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing 3D packing algorithms struggle to simultaneously achieve high efficiency, accuracy, and robustness when dealing with fragile, perishable, and other special goods. Furthermore, traditional methods are inefficient in solving complex packing scenarios and cannot balance space utilization and cargo safety.

Method used

We employ a hybrid heuristic algorithm based on black-winged kites, combining population iterative optimization and heuristic decoding with a hyperplane-region constraint mechanism to achieve the optimal solution to the three-dimensional bin packing problem.

Benefits of technology

It significantly improves the safety and space utilization of special cargo transportation, enhances the solution efficiency and robustness of the algorithm, and can quickly escape local optima and approach the global optimum.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122066027A_ABST
    Figure CN122066027A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional boxing method based on a Heiwen hybrid heuristic algorithm. The three-dimensional boxing method comprises the following steps that S1, data are obtained, a three-dimensional coordinate system is established, and a to-be-packaged goods list is constructed; s2, randomly generating an initial black wing plinary population, encoding individuals by using real number vectors and initializing parameters to represent a potential boxing scheme; s3, decoding the real number vector into an actual packing scheme by using a heuristic algorithm, constructing a geometric feasible region through a hyperplane-region constraint mechanism, stipulating that special articles must completely fall into the protection region, and meanwhile, prohibiting common cargoes from entering the protection region; s4, if the current number of iterations does not reach the preset maximum value, updating the global optimal solution; otherwise, obtaining a global optimal solution and decoding; s5, after a result is recorded, iteration is stopped when a preset condition is met, and finally, an optimal boxing scheme is obtained through decoding; according to the method, population iteration optimization is carried out by utilizing the black wing plinual algorithm, and decoding is carried out in combination with the heuristic algorithm, so that the solution of the three-dimensional packing optimal scheme of the container is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of container loading methods, and more specifically to a three-dimensional container loading method based on the Black-winged Kite hybrid heuristic algorithm. Background Technology

[0002] In the current era of rapid development in the logistics industry, the layout of cargo packaging directly determines logistics and transportation costs. However, many problems still exist in cargo packaging, especially regarding the spatial layout of fragile and perishable goods, for which research is almost nonexistent. Traditional 3D packaging algorithms mainly focus on maximizing space utilization and improving loading efficiency, neglecting the safety and specific layout requirements of fragile and perishable goods during transportation. An unreasonable spatial layout may lead to damage to special goods during transport, resulting in unnecessary losses. Therefore, how to improve space utilization and loading efficiency while developing optimized spatial layout schemes suitable for special goods, providing dedicated placement space for specific items, is a critical issue that urgently needs to be addressed in the current logistics field.

[0003] The 3D bin packing problem is a classic combinatorial optimization problem and an NP-hard problem. While research on 3D bin packing algorithms has flourished in recent decades, existing algorithms still struggle to balance efficiency and space utilization when dealing with real-world, complex scenarios involving diverse goods of varying sizes and multiple constraints. Currently, 3D bin packing algorithms are broadly categorized into three types: exact algorithms, heuristic algorithms, and metaheuristic algorithms. Exact algorithms, while capable of finding the optimal solution, often struggle to achieve feasible solutions within a given timeframe for large-scale problems. Heuristic algorithms are fast and can quickly find feasible solutions, but they are prone to getting trapped in local optima, leading to unstable results and low space utilization. Metaheuristic algorithms, while possessing strong global search capabilities, suffer from slow search speeds, high time consumption, and low operational efficiency. When dealing with real-world, complex scenarios involving diverse goods of varying sizes and multiple constraints, these traditional methods fail to simultaneously meet the practical requirements of high efficiency, high accuracy, and robustness. Therefore, developing a 3D bin packing algorithm that combines high efficiency, accuracy, and robustness remains a core challenge that urgently needs to be overcome in the field of 3D bin packing research. Summary of the Invention

[0004] The purpose of this invention is to provide a three-dimensional container packing method based on the Black-winged Kite hybrid heuristic algorithm. By using the Black-winged Kite algorithm for population iterative optimization and combining it with heuristic algorithm decoding, the optimal solution for three-dimensional container packing can be obtained.

[0005] To achieve the above objectives, the present invention provides the following technical solution: A three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm includes the following steps: S1. Obtain basic data information of containers and cargo to be loaded, establish a three-dimensional coordinate system based on the basic data information of containers, and construct a list of cargo to be loaded based on the basic data information of cargo to be loaded. S2. Randomly generate an initial black-winged kite population, encode each black-winged kite individual with a real number vector, and initialize the parameters of the black-winged kite algorithm; where each black-winged kite individual represents a potential packing scheme. S3. Use a heuristic algorithm to decode the real number vector into the actual packing scheme; calculate the fitness value of each individual in the initial black-winged kite population, and record the minimum fitness value as the initial global optimal solution; S4. Determine if the current iteration count has reached the preset maximum value; if not, iterate and optimize each individual black-winged kite in the black-winged kite population, execute attack and migration behaviors to update the individual's position, perform boundary correction, and call the heuristic algorithm to decode and calculate the fitness value, then perform fitness evaluation. If the fitness is better after updating the individual's position, update the global optimal solution, record the iteration history and output the current iteration result; if yes, obtain the global optimal solution and decode to obtain the optimal packing scheme. S5. After recording the iteration history and outputting the current iteration result, determine whether the fitness value is lower than the preset threshold for 10 consecutive times. If not, re-determine whether the current iteration count has reached the preset maximum value and whether the fitness value is lower than the preset threshold for 10 consecutive times. If yes, stop the iteration, obtain the global optimal solution, and decode to obtain the optimal bin packing scheme.

[0006] According to specific embodiments provided by the present invention, the present invention has the following technical effects compared to the prior art: This invention constructs a three-dimensional coordinate system and cargo list based on container and cargo data, laying the foundation for the digitization and precision of packing schemes. By randomly generating an initial population with real-number vector encoding and combining it with a heuristic algorithm to decode abstract vectors into specific packing schemes, it maintains population diversity while ensuring the feasibility of the solution and the satisfaction of physical constraints. During the iteration process, attack and migration behaviors are performed, supplemented by boundary correction, which effectively balances the algorithm's global exploration and local development capabilities, enabling it to quickly escape local optima and approach the global optimum. By setting a dual termination condition of the maximum number of iterations and the fitness value being below a preset threshold for 10 consecutive times, it ensures that the algorithm has sufficient search time to converge to a high-quality solution and can stop iterating in time when the solution meets the accuracy requirements, significantly reducing redundant calculations. Thus, while ensuring the highest space utilization or minimum remaining space of the optimal packing scheme, it greatly improves the solution efficiency and practicality. Attached Figure Description

[0007] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0008] The following description, in conjunction with the accompanying drawings, further illustrates a three-dimensional bin packing method based on a hybrid heuristic algorithm of the black-winged kite according to the present invention; Figure 1 This is the overall flowchart of the three-dimensional bin packing method based on the black-winged kite hybrid heuristic algorithm in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the container and cargo placement locations in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of six possible placement directions of goods in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the maximum remaining space division method in Embodiment 1 of the present invention; wherein (a) is a schematic diagram of the initial state when no goods are placed in the container and 3 regularized remaining subspaces are generated; (b) is a schematic diagram of the generation of 5 new subspaces when goods are placed in existing subspaces. Figure 5 This is a schematic diagram of the angular distance between the maximum remaining space and the container in Embodiment 1 of the present invention; Figure 6 This is a schematic diagram of the block bonding method in Embodiment 1 of the present invention; Figure 7 This is a schematic diagram of the three-dimensional packing layout under the hyperplane constraint condition set along the x-axis in Embodiment 1 of the present invention; Figure 8 The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm in Embodiment 2 of the present invention is shown in the three-dimensional bin packing effect diagram and iteration curve diagram of a random case in each category of the BR weakly heterogeneous dataset; where (a)-(g) are the three-dimensional bin packing effect diagram and iteration curve diagram of BR1-BR7 ​​respectively; Figure 9 The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm in Embodiment 2 of the present invention is shown in the three-dimensional bin packing effect diagram and iteration curve diagram of a random case in each category of the BR strongly heterogeneous dataset; where (a)-(h) are the three-dimensional bin packing effect diagram and iteration curve diagram of BR8-BR15 respectively; Figure 10 This is a test result diagram of the three-dimensional packing method based on the Black-winged Kite hybrid heuristic algorithm in the order data of Embodiment 3 of the present invention; Figure 11This is a 3D rendering of the 3D container loading method using the Black-winged Kite hybrid heuristic algorithm in Embodiment 4 of the present invention, showing the loading of special goods and general goods into separate containers in a real container loading case. Detailed Implementation

[0009] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0010] To better understand the purpose, structure, and function of this invention, the invention will be described in further detail below with reference to the accompanying drawings.

[0011] like Figure 1 As shown, this invention provides a three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm, comprising the following steps: S1. Obtain basic data information of containers and cargo to be loaded, establish a three-dimensional coordinate system based on the basic data information of containers, and construct a list of cargo to be loaded based on the basic data information of cargo to be loaded. This embodiment specifically involves: the basic data information of the container including the length, width, and height of the container body, and establishing a three-dimensional coordinate system with the length direction of the container as the positive x-axis, the width direction as the positive y-axis, the height direction as the positive z-axis, and the smallest vertex of the container as the origin O. Figure 2 As shown; In step S1, the basic data information of the goods to be loaded includes: the number of types of goods to be loaded, the size, quantity, and volume of each type of goods, as well as the six possible orientations in which the goods to be loaded can be placed, and a list of goods to be loaded is constructed, such as... Figure 3 As shown, specifically: Assuming the container space utilization rate is The objective function is then set as space utilization. Maximize, the specific expression is: (1) Each item to be loaded must meet the following condition, as shown in the expression: (2) The permitted orientation of goods to be loaded must meet the following conditions, as shown in formula (3): (3) in, The quantity of goods already loaded. and These are the length, width, and height of the container body and the cargo, respectively. , , and The first The maximum and minimum coordinates of each cargo in the loading plan. In Information on the six possible orientations for goods to be loaded.

[0012] S2. Randomly generate an initial black-winged kite population, encode each black-winged kite individual with a real number vector, and initialize the parameters of the black-winged kite algorithm; where each black-winged kite individual represents a potential packing scheme. In this embodiment, an initial black-winged kite population is randomly generated. Each individual black-winged kite in the population is considered as a solution to the packing scheme. A continuous real number vector x of length nvars is used to encode the solution to the problem. The value of each element x[k] in the vector determines the selection of the block to be placed in the subsequent decoding stage. The value range of each element x[k] is [popmin,popmax]. The parameters of the Black-Winged Kite algorithm include: number of iterations, population size, variable value range [popmin, popmax], variable dimension naves, and probability parameter p. The initial parameters of the Black-Winged Kite algorithm are specifically set as follows: population size is 30, number of iterations is 100, variable dimension naves is the number of goods to be loaded, variable value range [popmin, popmax] = [0, 1-(1e-4)], and probability parameter P is 0.9.

[0013] S3. Use a heuristic algorithm to decode the real number vector into the actual packing scheme; calculate the fitness value of each individual in the initial black-winged kite population, and record the minimum fitness value as the initial global optimal solution; The heuristic algorithm in S3 includes: S3.1 Obtain basic data information and real number vectors of the container and the cargo to be loaded; S3.2 Construct and initialize the remaining space list. Initially, the remaining space is the space of the entire container. As the loading process proceeds, the remaining space is initially divided into several remaining subspaces according to the six-way maximum space partitioning strategy. The maximum remaining space method refers to placing goods into a container and then dividing the space around the goods in six directions (up, down, left, right, front, and back) to create a regularized subspace around the goods that reaches the theoretical maximum placement volume in all three dimensions. For example... Figure 4 As shown in (a), initially, the container is empty, and the entire container space constitutes the initial maximum remaining space. If a cuboid-shaped item is placed in the container, the space will be divided along the three principal dimensions of the item, ultimately generating three regularized remaining subspaces. Each subspace maintains a cuboid shape and reaches its maximum achievable volume in its corresponding dimension. Figure 4As shown in (b), as the packing process proceeds, when the goods are placed in an existing subspace, a six-directional recursive partitioning will be triggered. Taking the blue goods in the figure as an example, five new subspaces will be generated around them.

[0014] S3.3 When packing begins, determine if the remaining space list is empty: if yes, output the result directly; if no, sort the remaining subspaces according to the Manhattan distance method and select the first remaining subspace as the place to be packed goods. In this embodiment, determining whether the remaining space list is empty includes the following steps: Step 3.3.1: Based on the state of the data structure storing the remaining space information, determine whether the remaining space list is empty. If the determination result is "yes", output the result directly. Step 3.3.2: If the judgment result is "no", calculate the Manhattan distance between each vertex in each remaining maximum subspace and the corresponding vertex of the container, select the smallest value as the angular distance of the space, sort these spaces in ascending order of angular distance, and then select the first remaining subspace in the remaining space list for placement. The method for calculating the Manhattan distance is shown in formula (4). Figure 5 As shown.

[0015] (4) in, Let the Manhattan distance be between points A1 and B1. Let A1 be the coordinates. Let B1 be the coordinates; S3.4. Use the block combination method to traverse the list of goods to be loaded, prioritize the combination of similar goods to generate candidate blocks, and add them to the candidate block list in descending order of volume; In this embodiment, generating candidate blocks includes the following steps: Step 3.4.1: Based on the given list of remaining space and list of goods to be loaded, first obtain the size information of the space to be placed, then iterate through each item. For each item, iterate through its feasible placement directions. Check whether the space requirements are met based on the size of the item after rotation. If the size of the item after rotation meets the space requirements, then proceed to the exploration stage of combining different items into blocks. Step 3.4.2: During block generation, prioritize combining similar goods to generate blocks. Try different combinations of quantities and orientations for similar goods, then select blocks that can be reasonably placed within the limited space as candidate blocks. Add these candidate blocks to the candidate block list sequentially, sorting them in descending order of volume. Figure 6 As shown.

[0016] S3.5 For the space to be placed, determine whether the candidate block list is empty. If so, delete the space from the remaining space list and continue the loop. If not, use the block selection and placement strategy to determine the block to be placed and the best placement position, update the remaining space list and the list of goods to be loaded, until the remaining space list is empty.

[0017] This embodiment is specifically as follows: In S3.5, the block selection and placement strategy includes the following steps: S3.5.1 Calculate the evaluation value of each block in the candidate block list and sort them from highest to lowest evaluation value. The expression is as follows: (5) (6) (7) (8) in, The total volume of the goods. For the volume of a single item, For the quantity of goods, For the utilization rate of space blocks, Let the volume of the block be... The volume of the space to be placed. To maximize the utilization of remaining space, This represents the occupied volume of the remaining space. The amount of remaining space. The first The length, width, and height of the remaining space. As an evaluation value; S3.5.2. Based on the candidate block list, the real number vector is mapped to the candidate block list, and the continuous real number vector values ​​are converted into block selection index values, thereby determining the block to be placed; the specific mapping formula is shown in (9): (9) in, The block index selected during the k-th iteration. This is the k-th element of the encoding vector. The number of candidate blocks generated in the current iteration. This indicates a round-down operation; S3.5.3. Based on the spatial boundary and hyperplane constraints, the feasible placement range is trimmed to obtain the placeable planar range of the candidate block, such as... Figure 7 As shown; S3.5.4 Perform differentiated region traversal according to the goods category, and complete the selection of candidate placement points for each candidate block in the corresponding region; S3.5.5. Based on all the candidate placement points that meet the conditions, select the position closer to the side wall of the container along the x-axis to determine the optimal placement position. The specific formula is as follows: (10) in, This represents the set of all feasible placement locations that meet the conditions. For optimal placement, for The coordinates of the position where the minimum value is obtained. This represents the minimum coordinate of the block to be placed on the x-axis. This represents the minimum distance from the current position to the side wall of the container. Let x be the length of the container in the x-direction. The dimension of the block to be placed is in the x-direction.

[0018] In S3.5.4, the method for verifying the candidate placement point of each candidate block includes: boundary inspection, contact surface inspection, and legality inspection of the hyperplane-region constraint mechanism; The boundary check is used to ensure that the candidate block is completely placed inside the space; The contact surface inspection is used to ensure the integrity of the goods and maintain the stability of the packing layout by comparing the contact area ratio of the candidate blocks with a preset contact rate threshold. The validity check of the hyperplane-region constraint mechanism includes: hyperplane constraint and forced placement region constraint; wherein the hyperplane constraint is used to check whether all vertices of the candidate block are within the feasible region of the container (e.g., Figure 7 As shown in the figure, the mandatory placement area constraint is used to stipulate that special items must be completely placed within the protected area, while ordinary goods are prohibited from entering the protected area.

[0019] The specific expression for the boundary check is as follows: (11) in, The starting coordinates of the space to be placed are . Let be the starting coordinates of the block to be placed. The dimensions of the space to be placed are: length, width, and height. The dimensions are the length, width, and height of the block to be placed.

[0020] The expression for the contact surface inspection is as follows: (12) in, Let be the area of ​​the intersection of the spatial plane and the block plane. The area of ​​the block's base. This is a preset threshold for the proportion of contact area; The specific formula for verifying the hyperplane constraint is as follows: (13) in, Indicates compared to the first A hyperplane can be placed on either the positive or negative side. They are the first The coefficients of each hyperplane, Let be the coordinates of one of the vertices of the cargo; The mandatory area placement constraints include: protected areas reserved for special items. Nature Reserve The specific test formula is as follows: (14) If items If it belongs to a special category, it must fall entirely within the protected area, as shown in the following expression: (15) If items If it belongs to the ordinary category, it must not fall within the protected area, as shown in the following expression: (16) in, This refers to the minimum coordinate value of the region on the x, y, z axes. This refers to the maximum coordinate value of the region on the x, y, and z axes. This refers to the smallest vertex coordinate of a special item. This refers to the coordinates of the smallest vertex of a regular object. This refers to the length, width, and height of a special object along the x, y, and z axes. This refers to the length, width, and height of a regular object along the x, y, and z axes. This is the tolerance parameter.

[0021] In this embodiment, the hyperplane-region constraint mechanism, consisting of hyperplane constraints and forced region placement constraints, precisely characterizes the feasible region inside the container through hyperplane constraints, and applies forced region placement constraints to further distinguish the spatial positions of special items from ordinary items. The combined effect of these two types of constraints forms a well-defined and rationally partitioned safe placement domain, effectively meeting the protection needs of special items in complex loading scenarios. The synergy between this mechanism and the Black-winged Kite hybrid heuristic algorithm is reflected in the fact that this constraint mechanism uses the block placement legality check of the heuristic strategy as the execution carrier to perform compliance screening on all candidate solutions (encoded vectors) generated by the Black-winged Kite algorithm through attack and migration behaviors, ensuring that the placement position of each block satisfies the geometric hyperplane and region partitioning requirements. This ensures that during the iterative optimization process, the placement of goods is always confined to a legally feasible region, avoiding local optimum traps while maintaining strict safety boundaries, ultimately achieving a balance between optimization performance and constraint satisfaction.

[0022] The applicability of the hyperplane-region constraint mechanism in this embodiment can be extended to various application scenarios with differentiated spatial attributes, such as the division of isolation zones in dangerous goods transportation, multi-temperature zone loading of cold chain and ambient temperature goods, attribute-driven storage location layering in warehousing systems, robot safety work domain limitation in automated picking systems, and priority control of multiple categories of materials in emergency deployment. Furthermore, by adjusting the parameters in the constraint model... This mechanism controls the boundary spacing between different areas, flexibly adapting to various operational needs and environmental changes, enabling customized spatial control and optimization. Its innovation lies in the organic combination of hyperplane constraints and regional rules, effectively ensuring the legal placement and optimal space utilization of various item categories in complex environments. Therefore, this mechanism not only meets the protection needs of special items but also provides a transferable and scalable unified constraint framework for optimizing spatial layouts in multiple scenarios with different risk levels, environmental requirements, or operational strategies.

[0023] The block selection and placement strategy in this embodiment is as follows: After the block to be placed is placed into the space to be placed, the remaining space list is updated. The newly added space generated in each direction after the block is placed is calculated and added to the remaining space list. Then, dominated spaces are deleted, that is, some remaining subspaces are completely contained in other remaining subspaces, or spaces that are not better than other spaces in any dimension. Secondly, spaces with no goods to place are deleted. That is, by obtaining the size information of the smallest goods, the smallest goods are tried to be placed in the space. If they cannot be placed, the space is deleted. Update the list of goods to be loaded: Remove information about goods that have already been placed from the list of goods to be loaded.

[0024] S4. Determine if the current iteration count has reached the preset maximum value; if not, iterate and optimize each individual black-winged kite in the black-winged kite population, execute attack and migration behaviors to update the individual's position, perform boundary correction, and call the heuristic algorithm to decode and calculate the fitness value, then perform fitness evaluation. If the fitness is better after updating the individual's position, update the global optimal solution, record the iteration history and output the current iteration result; if yes, obtain the global optimal solution and decode to obtain the optimal packing scheme. In step S4, the iterative optimization process for each individual black-winged kite in the black-winged kite population includes the following steps: S4.1 In each iteration, an attack is performed on each individual black-winged kite in the black-winged kite population. A random perturbation strategy is adopted, and different update strategies are selected based on a random number r and a specific probability p=0.9. An adaptive search strategy is used, utilizing a decay factor. The mathematical model for updating the position of individuals in the population involves a large perturbation search in the early stage and a small perturbation refinement in the later stage to avoid getting trapped in local optima too early. The model simulates the attack behavior of black-winged kites to update the position. (17) (18) in, and These represent the positions of individuals in the population before and after the update, respectively. It is a random number between [0,1]. It is a probability parameter that controls the two update methods, where T is the total number of iterations and t is the number of iterations completed so far; S4.2. Perform migration behavior on each individual black-winged kite in the black-winged kite population. Use Cauchy distribution perturbation and leader information, combined with the fitness value of each individual in the population and the reference individual, to determine the direction of the behavior. Determine whether the current individual is inferior to the reference individual; if so, move towards the optimal solution; if not, move away from the optimal solution to avoid over-clustering and retain some diversity. The specific expression for fitness is: (19) in, For fitness, For space utilization; The migration behavior of guiding relatively superior individuals within the population to gradually approach the high-quality solution region and quickly move towards the global optimum is characterized by the following mathematical model: (20) (twenty one) in, and These represent the positions of individuals in the population before and after the update, respectively. Indicates the current individual position fitness value, The fitness value represents the fitness value at a random location. Represents the Cauchy mutation; S4.3 During iterative optimization, since vector elements may appear outside the range [popmin,popmax]=[0,1-(1e-4)], a truncation method is used to correct them. When the real number variable x exceeds the set limit [lb,ub], all vector elements will be correctly corrected within that value range. Therefore, the correction of elements exceeding the limit should be forced to an upper limit value ub or a lower limit value lb. Vector x needs to be flattened into a one-dimensional array for processing. The values ​​of all elements less than lb are set to lb, and the values ​​of all elements greater than ub are set to lb. The specific formula is as follows:

[0025] (twenty two) in, For the revised The values ​​[lb, ub] are preset boundary values, where lb = popmin, ub = popmax; S4.4 If the updated individual fitness value is better, then replace the original individual's position and fitness value, and update the current optimal solution (i.e., the individual with the smallest fitness value).

[0026] S5. After recording the iteration history and outputting the current iteration result, determine whether the fitness value is lower than the preset threshold for 10 consecutive times. If not, re-determine whether the current iteration count has reached the preset maximum value and whether the fitness value is lower than the preset threshold for 10 consecutive times. If yes, stop the iteration, obtain the global optimal solution, and decode to obtain the optimal bin packing scheme.

[0027] In this embodiment, two stopping conditions are preset: first, when the fitness value of the optimal solution obtained in 10 consecutive iterations is lower than a certain preset threshold, the algorithm is considered to have converged and the iteration stops; second, when the number of iterations reaches a preset maximum value, the iteration stops. After the iteration is completed, the global optimal solution is obtained, and the corresponding bin packing scheme is obtained by decoding. The space utilization rate of the scheme is output and its three-dimensional bin packing effect diagram is drawn. At the same time, the convergence trajectory of the algorithm is recorded and the convergence curve is drawn.

[0028] This embodiment specifically addresses the following issues: To resolve the limitations of existing packing algorithms in handling complex real-world 3D packing problems involving diverse goods of varying sizes and multiple constraints, which simultaneously fail to provide fast solutions and stable output, and lack assurance regarding the safety of special goods during transport, this invention proposes a 3D packing method based on a hybrid heuristic algorithm using the Black-winged Kite algorithm. This method first transforms the 3D packing problem into a real-number array that the algorithm can process using the Black-winged Kite algorithm. An initial Black-winged Kite population is randomly generated, with each individual Black-winged Kite represented by a real-number array in the form of an encoded vector. Each element in the vector corresponds to the selection index value of the subsequent block to be placed. Secondly, based on a preset heuristic algorithm... The encoded real-valued vector is decoded into an actual packing scheme. Specifically, this involves operations such as block combination, spatial partitioning, and optimization to ensure that goods are efficiently and legally placed into containers, realizing the process from the initial space to the final placement scheme. The fitness value of each individual black-winged kite in the initial black-winged kite population is calculated, and the minimum value is recorded as the initial global optimum. Then, an iterative optimization process is performed, traversing each individual black-winged kite in the population. The individual positions are updated by simulating the attack and migration behaviors of black-winged kites to reduce the situation of getting trapped in local optima and achieve a dynamic balance between global and local search capabilities. Boundary correction and fitness evaluation are performed on the updated individuals. Finally, the global optimum is obtained, and the complete packing scheme is obtained through the decoding process.

[0029] Compared with the prior art, this embodiment also has the following technical effects: 0. The three-dimensional packing method based on the black-winged kite hybrid heuristic algorithm of this invention proposes a hyperplane-region constraint mechanism to address the transportation needs of special goods such as fragile, perishable, and temperature-sensitive goods. By constructing a dedicated protective plane in three-dimensional space, a dedicated space is reserved for special goods in the packing plan, avoiding the squeezing, collision and environmental interference of goods, and significantly improving the safety and reliability of special goods transportation.

[0030] 2. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm of the present invention combines the local space optimization capability of the heuristic strategy with the global search capability of the Black-winged Kite algorithm. In the heuristic algorithm, high-quality solutions generated by heuristic strategies such as block combination, residual space partitioning and spatial layout optimization are used as the initial population of the Black-winged Kite algorithm. Subsequently, during iterative optimization, the Black-winged Kite algorithm achieves a dynamic balance between global and local search through attack and migration behaviors, avoids getting trapped in local optima, accelerates global convergence, and significantly improves the robustness and solution efficiency of the algorithm.

[0031] 3. The three-dimensional packing method based on the black-winged kite hybrid heuristic algorithm of the present invention proposes a solution framework based on real number encoding and block mapping. In the encoding and decoding process, the entire three-dimensional packing problem is mapped to a continuous vector space that the algorithm can compute, realizing automatic decoding and real-time optimization of the packing scheme, thereby improving the space utilization of the container and effectively enhancing the robustness of the algorithm under multiple constraints and complex cargo conditions.

[0032] 4. The three-dimensional bin packing method based on the black-winged kite hybrid heuristic algorithm of the present invention addresses the problems of high complexity in handling three-dimensional bin packing problems and the huge amount of computation caused by algorithm iteration. During the iterative optimization process, it uses caching, locking and other techniques to complete concurrent operation in a multi-threaded environment. It reduces unnecessary repeated calculations with a small amount of additional memory space, improves the algorithm running speed, and meets the needs of bin packing tasks of different scales and complexities.

[0033] Example 2 This embodiment provides a process for testing and verifying the three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm in Embodiment 1: The BR benchmark dataset was used as the test dataset for Example 1. It contains 15 types of cargo data, BR1 to BR15, with BR1 to BR7 being weakly heterogeneous examples and BR8 to BR15 being strongly heterogeneous examples. The diversity and richness of the dataset effectively reflect the algorithm's performance. Figure 8 As shown, Figure 8 Table 1 shows the 3D bin packing effect and iteration curve of the 3D bin packing method based on the Black-winged Kite hybrid heuristic algorithm in this embodiment, which is used to randomly select one case in each category of the BR weak heterogeneous dataset (BR1-BR7). The test data of the BR weak heterogeneous dataset (BR1-BR7) is shown in Table 1. Figure 9 Table 2 shows the 3D bin packing effect and iteration curve of the 3D bin packing method based on the Black-winged Kite hybrid heuristic algorithm in this embodiment, using a random case from each category of the BR strong heterogeneous dataset (BR8-BR15). The test data of the BR strong heterogeneous dataset (BR8-BR15) is shown in Table 2.

[0034] Table 1

[0035] Table 2 Example 3 This embodiment provides another process for testing and verifying the three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm in Embodiment 1: Cargo data from Zhao Yufei's master's thesis at Jilin University, "Research on Loading Optimization of Air Freight Aircraft in my country's Express Delivery Enterprises," was used for a case study. The container dimensions were 318×224×163 mm. The order contained seven types of cargo, with specific dimensions and quantities shown in Table 3. All cargo was general cargo, and the space utilization rate tested by this algorithm was 95.78%. Figure 10 As shown, Figure 10 This is a diagram showing the effect of testing the 3D packing method based on the Black-winged Kite hybrid heuristic algorithm in this embodiment on order data from a master's thesis entitled "Research on Loading Optimization of Air Freight Aircraft in my country's Express Delivery Enterprises".

[0036] Table 3

[0037] Example 4 This embodiment provides another process for testing and verifying the three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm in Embodiment 1: To further verify the robustness of the 3D packing method based on the Black-winged Kite hybrid heuristic algorithm in Embodiment 1 of this invention under complex packing scenarios and the effectiveness of the hyperplane-region constraint mechanism, a packing case of a chain supermarket (hereinafter referred to as Supermarket A) was used for testing. Supermarket A needs to purchase various goods daily, including food, daily necessities, etc., with numerous categories and varying sizes, fully reflecting the complexity of actual packing tasks. The dimensions of the transport truck used by the supermarket are 6800mm × 2400mm × 2600mm. The specific item data for this case is shown in Table 4, which includes parameters for special goods (canned fruit) and various general goods. It is worth noting that the parameters for all types of goods are based on the actual dimensions after packaging to ensure that the packing simulation is closer to the real logistics transportation environment. Figure 11 As shown, Figure 11 This is a 3D rendering of the 3D container loading method based on the Black-winged Kite hybrid heuristic algorithm in a real container loading case, illustrating the loading of special and general cargo into separate containers.

[0038] Table 4

[0039] The above description of the disclosed embodiments enables those skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm, characterized in that, Includes the following steps: S1. Obtain basic data information of containers and cargo to be loaded, establish a three-dimensional coordinate system based on the basic data information of containers, and construct a list of cargo to be loaded based on the basic data information of cargo to be loaded. S2. Randomly generate an initial black-winged kite population, encode each black-winged kite individual with a real number vector, and initialize the parameters of the black-winged kite algorithm; where each black-winged kite individual represents a potential packing scheme. S3. Use a heuristic algorithm to decode the real number vector into the actual packing scheme; calculate the fitness value of each individual in the initial black-winged kite population, and record the minimum fitness value as the initial global optimal solution; S4. Determine if the current iteration count has reached the preset maximum value; if not, iterate and optimize each individual black-winged kite in the black-winged kite population, execute attack and migration behaviors to update the individual's position, perform boundary correction, and call the heuristic algorithm to decode and calculate the fitness value, then perform fitness evaluation. If the fitness is better after updating the individual's position, update the global optimal solution, record the iteration history and output the current iteration result; if yes, obtain the global optimal solution and decode to obtain the optimal packing scheme. S5. After recording the iteration history and outputting the current iteration result, determine whether the fitness value is lower than the preset threshold for 10 consecutive times. If not, re-determine whether the current iteration count has reached the preset maximum value and whether the fitness value is lower than the preset threshold for 10 consecutive times. If yes, stop the iteration, obtain the global optimal solution, and decode to obtain the optimal bin packing scheme.

2. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm according to claim 1, characterized in that, In step S1, the basic data information of the goods to be loaded includes: the number of types of goods to be loaded, the size, quantity, and volume of each type of goods, and the six possible orientations for the goods to be loaded, specifically: Assuming the container space utilization rate is The objective function is set as space utilization. Maximize, the specific expression is: (1) Each item to be loaded must meet the following condition, as shown in the expression: (2) The permitted orientation of goods to be loaded must meet the following conditions, expressed as follows: (3) in, The quantity of goods already loaded. and These are the length, width, and height of the container body and the cargo, respectively. , , and The first The maximum and minimum coordinates of each cargo in the loading plan. In Information on the six possible orientations for goods to be loaded.

3. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm according to claim 1, characterized in that, The heuristic algorithm in S3 includes: S3.1 Obtain basic data information and real number vectors of the container and the cargo to be loaded; S3.2 Construct and initialize the remaining space list. Initially, the remaining space is the space of the entire container. As the loading process proceeds, the remaining space is initially divided into several remaining subspaces according to the six-way maximum space partitioning strategy. S3.3 When packing begins, determine if the remaining space list is empty: if yes, output the result directly; if no, sort the remaining subspaces according to the Manhattan distance method and select the first remaining subspace as the place to be packed goods. S3.

4. Use the block combination method to traverse the list of goods to be loaded, prioritize the combination of similar goods to generate candidate blocks, and add them to the candidate block list in descending order of volume; S3.5 For the space to be placed, determine whether the candidate block list is empty. If so, delete the space from the remaining space list and continue the loop. If not, use the block selection and placement strategy to determine the block to be placed and the best placement position, update the remaining space list and the list of goods to be loaded, until the remaining space list is empty.

4. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm according to claim 3, characterized in that, In S3.3, the expression for the Manhattan distance method is specifically as follows: (4) in, Let the Manhattan distance be between points A1 and B1. Let A1 be the coordinates. Let B1 be the coordinates.

5. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm according to claim 3, characterized in that, In S3.5, the block selection and placement strategy includes the following steps: S3.5.1 Calculate the evaluation value of each block in the candidate block list and sort them from highest to lowest evaluation value. The expression is as follows: (5) (6) (7) (8) in, The total volume of the goods. For the volume of a single item, For the quantity of goods, For the utilization rate of space blocks, Let the volume of the block be... The volume of the space to be placed. To maximize the utilization of remaining space, This represents the occupied volume of the remaining space. The amount of remaining space. The first The length, width, and height of the remaining space. As an evaluation value; S3.5.

2. Based on the candidate block list, the real number vector is mapped to the candidate block list, and the continuous real number vector values ​​are converted into block selection index values, thereby determining the block to be placed; the specific mapping formula is shown in (9): (9) in, The block index selected during the k-th iteration. This is the k-th element of the encoding vector. The number of candidate blocks generated in the current iteration. This indicates a round-down operation; S3.5.

3. Based on the spatial boundary and hyperplane constraints, the feasible placement range is trimmed to obtain the placeable plane range of the candidate block; S3.5.4 Perform differentiated region traversal according to the goods category, and complete the selection of candidate placement points for each candidate block in the corresponding region; S3.5.

5. Based on all the candidate placement points that meet the conditions, select the position closer to the side wall of the container along the x-axis to determine the optimal placement position. The specific formula is as follows: (10) in, This represents the set of all feasible placement locations that meet the conditions. For optimal placement, for The coordinates of the position where the minimum value is obtained. This represents the minimum coordinate of the block to be placed on the x-axis. This represents the minimum distance from the current position to the side wall of the container. Let x be the length of the container in the x-direction. The dimension of the block to be placed is in the x-direction.

6. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm according to claim 5, characterized in that, In S3.5.4, the method for verifying the candidate placement point of each candidate block includes: boundary inspection, contact surface inspection, and legality inspection of the hyperplane-region constraint mechanism; The boundary check is used to ensure that the candidate block is completely placed inside the space; The contact surface inspection is used to ensure the integrity of the goods and maintain the stability of the packing layout by comparing the contact area ratio of the candidate blocks with a preset contact rate threshold. The validity check of the hyperplane-region constraint mechanism includes: hyperplane constraint and forced placement region constraint; wherein the hyperplane constraint is used to check whether all vertices of the candidate block are within the feasible region of the container, and the forced placement region constraint is used to stipulate that special items must fall completely within the protected area, while prohibiting ordinary goods from entering the protected area.

7. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm according to claim 6, characterized in that, The specific expression for the boundary check is as follows: (11) in, The starting coordinates of the space to be placed are . Let be the starting coordinates of the block to be placed. The dimensions of the space to be placed are: length, width, and height. The dimensions are the length, width, and height of the block to be placed.

8. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm according to claim 6, characterized in that, The expression for the contact surface inspection is as follows: (12) in, Let be the area of ​​the intersection of the spatial plane and the block plane. The area of ​​the block's base. This is a preset threshold for the proportion of contact area; The specific formula for verifying the hyperplane constraint is as follows: (13) in, Indicates compared to the first A hyperplane can be placed on either the positive or negative side. They are the first The coefficients of each hyperplane, Let be the coordinates of one of the vertices of the cargo; The mandatory area placement constraints include: protected areas reserved for special items. Nature Reserve The specific test formula is as follows: (14) If items If it belongs to a special category, it must fall entirely within the protected area, as shown in the following expression: (15) If items If it belongs to the ordinary category, it must not fall within the protected area, as shown in the following expression: (16) in, This refers to the minimum coordinate value of the region on the x, y, z axes. This refers to the maximum coordinate value of the region on the x, y, and z axes. This refers to the smallest vertex coordinate of a special item. This refers to the coordinates of the smallest vertex of a regular object. This refers to the length, width, and height of a special object along the x, y, and z axes. This refers to the length, width, and height of a regular object along the x, y, and z axes. This is the tolerance parameter.

9. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm according to claim 1, characterized in that, In step S4, the iterative optimization process for each individual black-winged kite in the black-winged kite population includes the following steps: S4.1 In each iteration, an attack is performed on each individual black-winged kite in the black-winged kite population. A random perturbation strategy is adopted, and different update strategies are selected based on a random number r and a specific probability p=0.

9. An adaptive search strategy is used, utilizing a decay factor. The location of individuals in the population is initially searched with large perturbations, and later refined with small perturbations. S4.

2. Perform migration behavior on each individual black-winged kite in the black-winged kite population. Use Cauchy distribution perturbation and leader information, and combine the fitness value of each individual in the population with that of the reference individual to obtain the direction of the behavior. Determine whether the current individual is inferior to the reference individual. If so, move towards the optimal solution; if not, move away from the optimal solution. S4.3 Flatten the vector x into a one-dimensional array. If an element is less than the value lb, set it to lb; if it is greater than the value ub, set it to ub. S4.4 If the updated individual fitness value is better, then replace the original individual's position and fitness value, and update the current optimal solution.

10. The three-dimensional bin packing method based on the Black-winged Kite hybrid heuristic algorithm according to claim 9, characterized in that, In S4.1, the mathematical model for simulating black-winged kite attack behavior to update the position is as follows: (17) (18) in, and These represent the positions of individuals in the population before and after the update, respectively. It is a random number between [0,1]. It is a probability parameter that controls the two update methods, where T is the total number of iterations and t is the number of iterations completed so far; In S4.2, the expression for fitness is specifically as follows: (19) in, For fitness, For space utilization; In S4.2, the mathematical model for migration behavior is specifically as follows: (20) (21) in, and These represent the positions of individuals in the population before and after the update, respectively. Indicates the current individual position fitness value, The fitness value represents the fitness value at a random location. Represents the Cauchy mutation; In S4.3, the expression for flattening vector x into a one-dimensional array is specifically as follows: (22) in, For the revised The values ​​are [lb, ub], which are preset boundary values, where lb = popmin and ub = popmax.