Three-dimensional packing optimization method and device

Through the three-dimensional packing optimization method, genetic algorithms are used to optimize the unloading combination and packing solution, the problem of low unloading efficiency in the existing technology is solved, and a more efficient and convenient unloading process is achieved.

CN118674343BActive Publication Date: 2025-02-28RIAMB (BEIJING) TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410574933.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-10
Publication Date
2025-02-28
Estimated Expiration
2044-05-10

AI Technical Summary

Technical Problem

In the prior art, unloading is convenient and efficient, especially when multiple merchants need to deliver, the placement of goods will reduce unloading efficiency and increase time-consuming.

Method used

A three-dimensional container optimization method is adopted to obtain parameter information of the load container, cargo container and unloading combination, and optimize it using genetic algorithm. The goal is to maximize the mutually exclusive unloading combination rate, space utilization rate and packing rate, thereby determining the packing order, location and placement direction of the cargo container.

Benefits of technology

Improve unloading efficiency and convenience. By optimizing the packing solution, the goods are easier to sort and handle when unloading, reducing the unloading time and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004832126370000131
    Figure BDA0004832126370000131
  • Figure HDA0004832126380000011
    Figure HDA0004832126380000011
  • Figure HDA0004832126380000012
    Figure HDA0004832126380000012
Patent Text Reader

Abstract

This invention relates to a three-dimensional packing optimization method and equipment, belonging to the field of packing technology. The method and equipment consider the ease of unloading during packing and perform three-dimensional packing optimization. The optimization objective is to achieve the optimal fitness function, resulting in a target packing scheme. The fitness function includes mutually exclusive unloading combination rate, space utilization rate, and packing rate. The target packing scheme includes the packing sequence, packing position, and placement direction of the containers, thereby improving unloading efficiency and ease of unloading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of packing, and in particular to a three-dimensional packing optimization method and equipment. Background Art

[0002] Logistics refers to the process of fulfilling the flow and storage of goods from the place of supply to the place of consumption in order to meet customer needs. The overall logistics process mainly includes transportation, warehousing, loading and unloading, packaging, circulation processing, distribution and logistics information. Among them, loading and unloading is one of the important links in logistics. Among the related technologies, three-dimensional packing technology is usually used to study the cargo loading method.

[0003] At present, when conducting three-dimensional packing optimization, the main packing optimization goals are to maximize the loading rate, maximize the value rate, minimize the transportation cost, etc. These indicators are aimed at maximizing the economic value of the whole vehicle before the transportation and distribution of goods. However, in the unloading link after the goods are transported to the destination, the convenience and efficiency of unloading from the container will also affect the economic benefits of the overall logistics system. In particular, when there are multiple merchants who need to deliver, if the required unloading items are placed too scattered, it will greatly reduce the unloading efficiency and increase the unloading time.

[0004] Therefore, how to improve the convenience and efficiency of unloading has become a technical problem that needs to be urgently solved in the existing technology. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a three-dimensional packing optimization method and equipment to overcome the current problems of poor unloading convenience and efficiency.

[0006] To achieve the above objectives, the present invention adopts the following technical solutions:

[0007] In one aspect, a three-dimensional packing optimization method is provided, comprising:

[0008] Respectively obtain parameter information of the cargo container, parameter information of the cargo box and the unloading combination;

[0009] Based on a genetic algorithm, according to the parameter information of the cargo container, the parameter information of the cargo box to be loaded and the required unloading combination information, three-dimensional packing optimization is performed with the optimal fitness function as the optimization target to obtain a target packing plan; wherein, the fitness function includes: mutually exclusive unloading combination rate, space utilization rate and packing rate; each mutually exclusive unloading combination is determined according to the required unloading combination information, and there is no common cargo box to be loaded between mutually exclusive unloading combinations; the target packing plan includes: the packing order, packing position and placement direction of the cargo box.

[0010] In another aspect, a three-dimensional packing optimization device is provided, characterized in that it includes a processor and a memory, wherein the processor is connected to the memory:

[0011] Wherein, the processor is used to call and execute the program stored in the memory;

[0012] The memory is used to store the program, and the program is at least used to execute any one of the three-dimensional packing optimization methods described above.

[0013] By adopting the technical solution provided in this embodiment, the convenience of unloading is taken into consideration during packing, and three-dimensional packing optimization is performed. The three-dimensional packing optimization is performed with the optimal fitness function as the optimization target to obtain a target packing plan; wherein, the fitness function includes: mutually exclusive unloading combination rate, space utilization rate and packing rate, and the target packing plan includes: the packing order, packing position and placement direction of the cargo box, so as to achieve the purpose of improving unloading efficiency and unloading convenience. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1 A schematic diagram of a flow chart of a three-dimensional packing optimization method provided by an embodiment of the present invention;

[0016] Figure 2 A schematic diagram of the structure of a three-dimensional packing optimization device provided by one embodiment of the present invention;

[0017] Figure 3 An individual schematic diagram provided for an embodiment of the present invention;

[0018] Figure 4 A schematic diagram of an individual coding provided by an embodiment of the present invention;

[0019] Figure 5 A schematic diagram of surface-to-surface contact adjacency and "pseudo" adjacency provided by an embodiment of the present invention;

[0020] Figure 6 An undirected graph of adjacent relationships between cargo boxes provided by one embodiment of the present invention;

[0021] Figure 7 A schematic diagram of a breadth-first search provided by an embodiment of the present invention;

[0022] Figure 8 A schematic diagram of a mutually exclusive relationship provided by an embodiment of the present invention;

[0023] Fig. 9 A schematic diagram of an individual coding provided by an embodiment of the present invention;

[0024] Fig.10 An undirected graph of adjacent relationships generated by a final optimal individual according to a packing result provided by an embodiment of the present invention;

[0025] Fig.11 A schematic diagram of a final packing result provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0027] As described in the background technology, logistics refers to the process of realizing the flow and storage of goods from the supply point to the consumption point in order to meet customer needs. The overall logistics process mainly includes transportation, warehousing, loading and unloading, packaging, circulation processing, distribution and logistics information.

[0028] Among them, loading and unloading is one of the important links in logistics. It involves the loading, transportation and unloading of goods. It is a bridge between warehousing (warehouse storage) and transportation (transportation from one location to another). Loading and unloading activities have a large workload, complex methods, and high costs. They take a long time in logistics activities, especially in the process of short-distance multi-destination logistics transportation. The start and end loading and unloading time is much longer than the actual transportation time. It can be seen that the speed and convenience of loading and unloading directly affect the efficiency of logistics and determine the overall economic benefits of logistics.

[0029] Packing is a sub-step in the loading and unloading process. It requires different types of goods to be placed in a certain way in the container to be loaded. Common containers to be loaded include flatbed trucks, aircraft cargo holds, port containers, etc., so as to facilitate the transportation and handling of goods in the later stage. This step not only involves how to maximize the use of the physical space of the container, but also involves reducing the number of transportation times, reducing logistics costs, and improving loading and unloading efficiency.

[0030] In related technologies, three-dimensional packing technology is usually used to study the cargo loading method. Three-dimensional packing technology is an optimization problem of packing order, placement direction, and placement strategy in the packing process. It uses algorithms and models to maximize the space utilization in a limited container while taking into account the safety of the cargo packing solution during transportation.

[0031] In the study of the three-dimensional packing problem of cargo loading, the research methods currently used can be mainly divided into deterministic methods and random search methods. Deterministic methods include wall-building method, integer programming method, and branch-and-bound method. However, this deterministic method is difficult to find the optimal solution in polynomial time when the variety and quantity of goods are complex and the calculation scale is large. For large-scale problems, the main method is to use heuristic rules combined with random search algorithms to form a hybrid optimization method, which can not only shorten the search time, but also jump out of the scope of local optimality to a certain extent. In terms of the optimization objectives of the packing algorithm, the common optimization objectives at present are mainly space utilization, value rate, and transportation cost. Maximizing the utilization rate of container space is the core optimization goal of the three-dimensional packing problem. It means to put as much cargo as possible into the container to make full use of the space; the highest value rate is to make the value of the cargo loaded in the whole vehicle as optimal as possible; the lowest transportation cost requires reducing the number of times and the number of containers required for transportation. However, the optimization objectives of the above packing schemes do not take into account unloading-related matters. All optimization objectives are to maximize the economic value of the whole vehicle before transportation, and do not take into account the global economic value impact of the convenience of unloading methods on the overall logistics system after the transportation arrives at the destination. However, in the unloading stage after the goods are transported to the destination, the convenience and efficiency of unloading from the container will also have an impact on the economic benefits of the overall logistics system. Especially when there are multiple merchants who need to deliver, if the required unloading items are placed too scattered, it will greatly reduce the unloading efficiency and increase the unloading time.

[0032] Therefore, how to improve the convenience and efficiency of unloading has become a technical problem that needs to be urgently solved in the existing technology.

[0033] Based on this, an embodiment of the present invention provides a three-dimensional packing optimization method, which takes unloading convenience into consideration and performs three-dimensional packing optimization to improve unloading efficiency and unloading convenience.

[0034] In this application, the terms related to loading and unloading are explained as follows:

[0035] Packing order: Goods are placed in a certain order based on specific factors such as size, shape, volume, etc. This placement order is called packing order.

[0036] Placement direction: The placement direction of the goods generally depends on the inherent properties of the goods, such as whether it can only be placed upside down, or whether it can be placed horizontally or vertically. There can be up to 6 rotation directions. During the packing process, ensure that the placement direction of all goods to be loaded meets the specified requirements and maximizes space utilization.

[0037] Placement location: The specific location inside the container where the item should be placed. This location is determined by the order and direction of the goods, and the space constraints inside the container.

[0038] Embodiment 1

[0039] Figure 1 A schematic diagram of a three-dimensional packing optimization method according to an embodiment of the present invention is shown in FIG. Figure 1 , the embodiment of the present invention may include the following steps:

[0040] Step S101, respectively obtain parameter information of the cargo container, parameter information of the cargo box and the unloading combination.

[0041] The goods can be loaded in a cargo box and transported by a cargo container through a transport vehicle. The cargo container can be any container used to carry goods for transportation, such as a carriage or a container.

[0042] The parameter information of the cargo container may be the dimension information that can be used to calculate the volume. For example, the cargo container is a cube. The dimension information of the cargo container is obtained: length, width, height, and Truck dimension = [L, W, H]. The parameter information of the cargo box may include dimension information and the number of cargo boxes to be loaded. Similarly, the cargo box may be a cube or other shapes. The cube is used as an example to illustrate that the cargo box may be of different types, and the size of each cargo box may be different. The number of cargo boxes may be defined as all_boxes = n. The dimension information of different types of cargo boxes, i.e., length, width, height, and volume:

[0043] boxes=[l1,w 1, h1,v1],[l2,w 2, h2,v2],…[l n ,w n, h n ,v n ].

[0044] The unloading combination is set according to the merchant's needs. For example, 1 A cargo box, 1 B cargo box, and 1 C cargo box can be a required unloading combination; or 2 A cargo boxes, 1 B cargo box, and 1 C cargo box can be a unloading combination. This is just an example.

[0045] Step S102: Based on a genetic algorithm, according to the parameter information of the cargo container, the parameter information of the cargo box to be loaded and the required unloading combination information, three-dimensional packing optimization is performed with the optimal fitness function as the optimization target to obtain a target packing plan; wherein, the fitness function includes: mutually exclusive unloading combination rate, space utilization rate and packing rate; each mutually exclusive unloading combination is determined according to the required unloading combination information, and there is no common cargo box to be loaded between the unloading combinations; the target packing plan includes: the packing order, packing position and placement direction of the cargo box.

[0046] Among them, mutually exclusive unloading combinations are mutually exclusive unloading combinations without a fixed paradigm. Mutually exclusive means that there cannot be a shared container between each unloading combination. If a container has been identified as being in one unloading combination, it cannot form an unloading combination with other containers. No fixed paradigm means that the placement of containers in the unloading combination is not restricted by fixed rules, as long as they are concentrated near one area and adjacent to each other. According to the actual packing conditions, the position of each container can be flexibly adjusted in order to make more efficient use of space.

[0047] By adopting the technical solution provided in this embodiment, the convenience of unloading is taken into consideration during packing, and three-dimensional packing optimization is performed. The three-dimensional packing optimization is performed with the optimal fitness function as the optimization target to obtain a target packing plan; wherein, the fitness function includes: mutually exclusive unloading combination rate, space utilization rate and packing rate, and the target packing plan includes: the packing order, packing position and placement direction of the cargo box, so as to achieve the purpose of improving unloading efficiency and unloading convenience.

[0048] Embodiment 2

[0049] Based on the above embodiments, the present application also provides a specific embodiment.

[0050] This embodiment may include the following steps:

[0051] Step S201: Initialize relevant parameters of the genetic algorithm.

[0052] In this application, you can initialize and set the population size Population, the maximum number of crossover mutation iterations Generation, the number of elite individuals selected for crossover in each round PC, the probability PM1 of the first stage forward and backward sequence mutation, the probability PM2 of the second stage single point mutation, and the rotations of the placement directions that the cargo box can adopt.

[0053] For example, in the present invention, the above parameters can be set to population number Population_number = 10, iteration number Generation = 500, crossover individual number PC = int (Population*0.8), first stage mutation probability PM1 = 0.2, second stage mutation probability PM2 = 0.02, and adjustable placement direction of goods Rotations = 6. It should be noted that the settings of various parameters here are only listed, not limited, and specific values ​​of other parameters can also be set according to needs.

[0054] Step S202: Encode according to the loading order of the cargo boxes and the placement direction of the corresponding cargo boxes when loaded, and obtain an initial population individual list, wherein the individuals in the population individual list include the loading order code and the placement direction code.

[0055] When encoding the initial population individuals, two codes are combined: the number of cargo boxes is set to all_boxes = n, and the number is k = 1, 2...n, then the overall coding length should be 2n, where the first code starts from the 1st bit and ends at the nth bit to represent the loading order of different cargo boxes, and the example structure is Seq = {3, n, ..., 2, 7}; the second code starts from the n+1th bit and ends at the 2nth bit to represent the placement direction of the corresponding cargo box when loaded, and the example structure is Dir = {2, 4, ..., 3, 5}. Among them, each placement direction of the cargo box can be encoded in advance, such as 1 for the first side facing down, 2 for the second side facing down, etc., to encode different placement directions. After obtaining the two codes, the two codes are merged to obtain an individual, and the same method is used to obtain a preset number of individuals as the initial ethnic individual list.

[0056] Specifically, step S202 may include the following steps:

[0057] Step S2021: merge all container numbers that can form a unloading combination into a first set, and merge other container numbers that cannot form a required unloading combination into a second set.

[0058] After obtaining the element serial numbers (for example, serial numbers) of different types of cargo boxes, the elements of the cargo boxes that can form a unloading combination are merged to obtain a first set; and the cargo box elements that cannot form a unloading combination are formed into a second set.

[0059] Step S2022: After shuffling the container numbers in the first set and the second set respectively, the shuffled first set and the second set are merged in the order of the first set first and the second set to obtain a sequential code.

[0060] The first set of cargo boxes that can form an unloading combination and the second set of other cargo boxes that cannot form an unloading combination are shuffled respectively and merged in the order of the first set first and then the second set to obtain the initialization packing sequence partial code.

[0061] Step S2023: set a placement direction mark for each cargo box, and obtain a placement direction code for each cargo box according to the placement direction mark.

[0062] For example, for a cubic container, each face-down placement can be marked, such as one face-down is coded 1 (i.e., marked as 1), the second face-down is coded 2, and so on. The cube codes can be 1, 2, 3, 4, 5, 6. Randomly select the elements between [1:6] as the placement direction corresponding to each sequential container to form the initial placement direction partial code.

[0063] Step S2024, concatenate the sequence code and the placement direction code to obtain initial population individuals.

[0064] The two codes are combined and spliced ​​to obtain the individual codes of the initial population.

[0065] Step S2025, cyclically shuffle the container numbers in the first set and the second set, and obtain a preset number of initial population individuals, and use the preset number of initial population individuals as the initial population individual list.

[0066] According to the preset number of population individuals, steps S2022-S2024 are used to obtain the population individual codes of that number, and all the population individual codes are used as the initial population individual list.

[0067] By adopting the technical solution provided in this embodiment, the first set and the second set are distinguished, and then the first set is shuffled and then the second set is merged to obtain a placement order code, so as to first load the cargo boxes that can form an unloading combination type into the container as much as possible, and then load the cargo boxes that cannot form an unloading combination after meeting the requirements.

[0068] Step S203: load the individuals in the population individual list according to the DBLF heuristic loading rule, and add the packing result code to the individuals.

[0069] Remaining space: In the three-dimensional packing algorithm, remaining space refers to the unoccupied container space after placing some goods. Initially, when nothing is placed, the remaining space is the space of the entire loading container. As new boxes are continuously placed, the remaining space will change according to the location, size, and type of the boxes.

[0070] Placement point: The specific location where a new cargo box can be placed in the remaining space. According to the convention, the placement point of the present invention is selected as the coordinate of the lower left rear corner. Generally, three placement point coordinates will be generated for each cargo box placed.

[0071] DBLF uses heuristic rules to place cargo boxes based on the principle of space segmentation. First, it evaluates and calculates the remaining space in the current container, selects the next cargo box to be placed and the determined placement method based on the encoding of the population individuals, and the algorithm selects the sub-remaining space that best matches the size of the current cargo to be loaded. Once it is determined that the new cargo box is placed, the remaining space in the container is updated.

[0072] The specific steps of DBLF loading rules are as follows: (1) Remaining space evaluation: Obtain the length, width, and height information of all remaining subspaces in the current container. i ,space w i ,space h i]; (2) Sort the remaining subspace: Sort the length, width, and height of the remaining space in ascending order; (3) Select the goods to be loaded: Obtain the size and placement direction information of the next goods to be loaded according to the packing order and placement direction encoding of the individuals in the population; (4) Match the remaining space with the goods to be loaded: Start traversing from the smallest remaining space, and if the remaining space that best matches the size of the goods to be loaded is found, proceed to step (5). If not found, jump back to step (3) and select the next goods for loading matching. (6) Update packing information: Add the size information of the current goods to be loaded to the packing result list, and update the number of packed goods. boxes , update the occupied space volume occupied volum (7) Space division: After placing the current cargo to be loaded, a new placement point coordinate is generated, and three new remaining subspaces are generated above, in front, and beside. (8) Space update: Delete the remaining space that has been loaded and add three newly placed remaining subspaces. (9) Determine whether to traverse and try to complete the loading of all cargoes one by one. If the traversal is completed, end the current individual loading and proceed to the next step. If it is not completed, jump back to step (3) to continue loading. (10) Obtain the final group of packing results result, the occupied space volume occupied volum , update the packed quantity boxes .

[0073] Step S204, obtaining the number of mutually exclusive unloading combinations without fixed paradigm as a sub-goal of genetic algorithm optimization.

[0074] The mutually exclusive unloading combination without fixed paradigm is that there is no common cargo box between each unloading combination, and the cargo boxes in each unloading combination are adjacent to each other. The definition of adjacent is as follows: close to each other is considered adjacent, a certain gap can also be considered adjacent, and the distance between two cargo boxes is also considered adjacent as long as it meets a certain Euclidean distance range. It can be understood that the "Euclidean distance range" with the cargo placement point as the center o and the diagonal range d is adjacent.

[0075] In the technical solution provided by the embodiment of the present invention, as many mutually exclusive unloading combinations as possible can be generated in the packing plan, so that the different types of goods to be unloaded are all in the surrounding areas, reducing the time for searching goods during the unloading process. Therefore, the present invention uses the mutually exclusive non-fixed unloading combination rate as the most important optimization target in the subsequent genetic algorithm genetic mutation.

[0076] Specifically, step S204 may include the following steps:

[0077] S2041. According to a preset adjacent relationship detection algorithm, adjacent boxes of each box in the packing result are detected to obtain an adjacent relationship set between the boxes.

[0078] In this application, the Nearby_detection adjacent relationship detection algorithm is used to detect the adjacent boxes in the top, bottom, left, right, front and back of each box in the packing result result to obtain the adjacent relationship set between the boxes.

[0079] Specifically, S2041 may include traversing the packing results to obtain the coordinates and size of the placement point of each cargo box; and judging whether two cargo boxes are adjacent to each other according to the coordinates of the cargo boxes in the packing results.

[0080] ① Traverse the packing results one by one to obtain the placement point coordinates (x, y, z) and dimensions (l, w, h) of each cargo box;

[0081] ② Based on the cargo box information obtained in the previous step, calculate the starting point to end point range of the loaded cargo box in the three directions of X-axis, Y-axis, and Z-axis; respectively: X-axis (x~x+l), Y-axis: (y~y+w), Z-axis: (z~z+h), and store the starting and ending point ranges of the three axes of all loaded cargo boxes.

[0082] ③ In turn, determine whether there is face-to-face adjacency between the two containers based on whether the starting and ending ranges of the loaded containers in the X, Y, and Z axes overlap with the ranges of other loaded containers in the packing results. At the same time, filter out pseudo-adjacent situations where only two sides overlap based on the overlapping range between the two containers.

[0083] Among them, one implementation method of step ③ may be:

[0084] <1> Traverse the XYZ axis start and end range of each cargo box and take the intersection operation with the length range of the cargo boxes other than the cargo box in the loading result <2> Determine whether the intersection between two containers in the three axes of XYZ is not 0. If so, continue to proceed downwards. If not, select the next container. <3> Determine whether the length of the intersection range between the two axes (XY, XZ, YZ) is not equal to 1. If so, it means that the two containers meet the face-to-face adjacency relationship, and the adjacency relationship of the two containers is stored. If not, it means that the two containers are in a pseudo-adjacency relationship, and the next container is selected for further determination. <4> Determine whether the length range of all cargo boxes in the packing result has been traversed. If not, return to the next step. <1> Continue to traverse the starting and ending range of the next cargo box.

[0085] ④ Output the final set of each loaded container and its neighboring containers. nearby_relation = {1:[2,3],2:[1,4]…}.

[0086] S2042. Take each cargo box in the packing result as a vertex set, and generate an adjacency matrix of the adjacent relationships between the cargo boxes according to the adjacent relationships between the cargo boxes.

[0087] Each cargo box in the packing result is taken as a vertex set, and the adjacency relationship matrix between the loaded cargo boxes is generated by combining the adjacent relationship between the cargo boxes. Specifically, step S2042 may include the following steps:

[0088] S20421. Traverse the packing results, convert each cargo box into a vertex number format in turn, and generate a vertex set of the packing results.

[0089] Define the vertex set of the packing result: Traverse the packing result result one by one, convert each loaded cargo into a vertex number form, and generate the vertex set of the packing result. Expressed as V = {A1, B1, ..., C3, A6}.

[0090] S20422. Determine the edges of the undirected graph based on the adjacent relationship between the boxes in the packing result.

[0091] According to the above algorithm, the adjacent relationship between each loaded cargo in the packing result result, that is, the set of edges, is obtained. According to the vertex form, it is converted into E = {A1: [B2, C3], B1: [A1, C4] ...}.

[0092] S20423. Determine the number of vertices according to the vertex set, and create a zero matrix of a preset size.

[0093] Initialize the adjacency matrix: Get the number of vertices V num , create a V num ×V num The zero matrix of .

[0094] S20424. Generate an adjacency matrix for each cargo box based on the adjacent relationship between the cargo boxes and the zero matrix.

[0095] Traverse the adjacent relationships between all cargo boxes in turn, and determine if cargo box i has an adjacent relationship with other cargo boxes j, then zero the matrix A ij and A ji The element position is set to 1, otherwise the corresponding position is set to 0. Generate an adjacency matrix of the connection relationship between each loading container.

[0096] S2043. Generate an undirected graph of the adjacency relationship between cargo boxes according to the cargo box vertex set and the cargo box adjacency matrix.

[0097] The container vertex set and container adjacency matrix are converted into an undirected graph of the adjacent relationship between loaded containers using the Nearby_map undirected graph creation algorithm.

[0098] Create an undirected graph: create an empty undirected graph G; draw an undirected graph of the adjacent relationship of the loaded cargo boxes: draw an undirected graph according to the cargo box vertex set and the cargo box adjacent relationship matrix in step S20421 and step S20424.

[0099] S2044. Obtain all possible repeated cargo box unloading combinations according to the undirected graph.

[0100] In this application, the create_allcombination repeated unloading combination generation algorithm is adopted to first generate all possible combinations of cargo boxes, and then determine one by one whether the types contained in the generated combinations meet the unloading combination requirements. When the types contained meet the requirements, the adjacent conditions are determined according to the cargo box vertices and adjacency matrix obtained in step S2042 in combination with the local breadth-first algorithm, and the set of all combinations that meet the conditions for forming an unloading combination is output.

[0101] Specifically, the following steps may be included:

[0102] According to the vertex set of the packing result, all possible combinations of preset number of cargo box nodes are generated; wherein the preset number is the number of cargo boxes in a unloading combination;

[0103] Based on the undirected graph, sequentially traverse the generated combinations of a preset number of cargo box nodes to determine whether the combination meets the unloading combination requirements;

[0104] If the unloading combination requirements are met, the breadth-first algorithm is used to determine whether a connected path can be formed between all nodes in the combination. If so, the combination is determined to be a unloading combination;

[0105] If the unloading combination requirement is not met, determine whether the next combination meets the unloading requirement combination.

[0106] Specifically, ① according to the set unloading combination such as (ABCC), obtain the number of cargo boxes contained in a set of unloading combinations and record it as k;

[0107] ② Combine the vertex set of the packing results obtained in step 3 to generate all possible combinations of k cargo box nodes;

[0108] ③ Traverse the generated k combinations of cargo box nodes in turn, and determine whether the combination meets the cargo type and quantity requirements of the unloading combination. If the conditions are met, continue to execute downwards. If the conditions are not met, take out the next combination for judgment;

[0109] ④ Use the breadth-first search (BFS) algorithm to determine whether a connected path can be formed between all nodes in the combination. If so, it proves that the combination can form a set of unloading combinations. If not, jump back to step ③ to take out the next combination for judgment;

[0110] ⑤After the traversal is completed, output all unloading combinations with repeated vertices combination = (A1 B2 C4 C3), (A1 B1C1 C2)... and the number of combinations count.

[0111] Wherein, step ④ may include:

[0112] <1> Select the starting node: Select any vertex in the combination as the starting node <2> Create a queue to track the nodes currently being visited, and create a visited collection to store the nodes that have been visited. <3> Visit the starting node: Set the starting node as visited and store it in the visited collection <4> If the current queue is not empty, remove a vertex from the queue <5> According to the adjacency relationship between the loading boxes, determine whether the currently visited vertex has an adjacency relationship with the vertices in the group other than the starting vertex. If there are other adjacent vertices in the group, continue to execute downward. If not, jump directly to the entry step. <7> <6> Add the adjacent vertices in the group to the visited set <7> When the queue is empty, determine whether all the cargo box vertices in the visited set are equal to all the vertices in the combination. If they are equal, it means that the combination can become a set of unloading combinations. If they are not equal, it means that the combination cannot become a set of unloading combinations.

[0113] S2045. Select the most feasible unloading combinations that can satisfy the requirement that cargo boxes in the combination are not repeated from all the possible repeated unloading combinations, and use the number of unloading combinations that meet the condition as the maximum number of mutually exclusive unloading combinations without a fixed paradigm.

[0114] The satisfy_combination mutually exclusive unloading combination screening algorithm is used to obtain the maximum number k of mutually exclusive unloading combinations that can satisfy the requirement that the cargo boxes in the combination are not repeated. Specifically, step S2045 may include the following steps:

[0115] All repeatable unloading combinations are taken as vertices, and the mutually exclusive relationships between all mutually exclusive unloading combinations are taken as connecting edges, so as to determine the adjacency matrix of the mutually exclusive relationships between all unloading combinations; wherein, the condition for judging whether the selected preset number of unloading combinations can become a mutually exclusive unloading set is: judging whether all the unloading combinations within the selected mutually exclusive set are mutually exclusive.

[0116] Specifically, the method for solving the adjacency matrix is ​​used again, except that in this embodiment, all repeatable unloading combinations are taken as vertices, and the mutually exclusive relationships between all mutually exclusive unloading combinations huchi2 are regarded as connecting edges (that is, the existence of connecting edges between two unloading combinations indicates mutual exclusion), forming an adjacency matrix of the mutually exclusive relationships between all unloading combinations. The condition for judging whether the selected k unloading combinations can become a mutually exclusive unloading set is: whether all unloading combinations within the determined mutually exclusive set are mutually exclusive, and there is no shared cargo box.

[0117] ① Define the vertex set of mutually exclusive unloading combinations: According to the result of step (3), all repeated unloading combinations are used as the vertex set for solving the mutually exclusive relationship between the combinations: huchi = {(A1 B2 C4 C3), (A2 B4 C1 C2)…} → → V huchi ={1, 2...}

[0118] ② Define the mutually exclusive relationship between each unloading combination: First, obtain all repeatable unloading combinations, and select the set of mutually exclusive unloading combinations according to whether there are repeated sharing of cargo box elements between the two unloading combinations, and regard them as the mutually exclusive connection relationship between the two unloading combinations, that is, the set of edges E huchi2 If there are no mutually exclusive unloading combinations, the algorithm ends directly and outputs the maximum number of mutually exclusive unloading combinations that can be formed, k = 1. huchi2 ={1:[2,3],2:[1,5,6]…}

[0119] Wherein, step ② may specifically include the following steps:

[0120] <1> According to the repeated unloading combination combination, generate a set of all possible pairwise repeated unloading combinations, denoted as combs2. <2> Traverse each pairwise combination in the set combs2 to determine whether there is a duplicate shared container element. If not, proceed to the next step. If there is a duplicate element, continue to pick the next pairwise combination in the set. <3> Store the pairwise combination into the huchi2 set <4> If the traversal is completed, the obtained huchi2 is output as the final set of mutually exclusive unloading combinations.

[0121] ③ Initialize the mutually exclusive adjacency matrix: Get the number of vertices V num , create a V num ×V num The zero matrix of .

[0122] ④ Obtain the adjacency matrix of the combined mutually exclusive relationship: traverse the adjacent relationships between all unloading subsets in turn, and determine if the unloading subset x has a mutually exclusive relationship with other unloading subsets y, then zero the matrix A xy and Ayx The element position is set to 1, otherwise the corresponding position is set to 0. Generate an adjacency matrix that can unload mutually exclusive combinations.

[0123] ⑤ Initially set the mutually exclusive combination iteration variable k = 3, and generate a set of all k-number of repeatable unloading combinations {(1,2,3), (1,3,4),…} from the repeated unloading combination combination, denoted as combsk.

[0124] ⑥ Determine one by one the corresponding element A of each repeatable unloading subset 1 and all other unloading subsets {2,3} in the combsk set on the pairwise mutually exclusive adjacency matrix 12 *A 13 …*A 1n Whether the product is 1, that is, whether all combinations in the unloading sub-set are mutually exclusive. If the product is equal to 1, it means that all internal unloading combinations are mutually exclusive and there is no shared container. Then the packing scheme can form a set of mutually exclusive unloading combinations with the current number of k, and continue to the next step; if it is equal to 0, it means that there is at least one pair of unloading combinations in the set that share containers. Take the next repeatable unloading sub-set from the combsk set to judge. If the traversal has been completed, the algorithm ends directly and outputs the maximum number of mutually exclusive unloading combinations that can be formed is k-1.

[0125] ⑦k=k+1 jump back to step ⑤ and continue calculation.

[0126] Step S205: construct an objective function guided by combined unloading according to the mutually exclusive non-fixed paradigm unloading combination rate, space utilization rate, and packing rate, and calculate the fitness value of each individual in the population.

[0127] That is to say, the objective function in this application is to obtain the mutually exclusive non-fixed paradigm unloading combination rate, space utilization rate, and cargo box loading rate, and the three sub-indicators form a fitness function, so that the genetic algorithm can use the fitness function as a target for iterative optimization. Therefore, the unloading-oriented target (fitness function) of the present invention includes the unloading combination rate index function, the space utilization rate index function, and the cargo box loading rate index function, which are three sub-indicator functions.

[0128] Individual i objective function fitness i The calculation method is as follows:

[0129]

[0130] in:

[0131] i is the index of the individual in the population, fitness i is the fitness value set of the objective function of individual i, occupiedvolum Represents the space occupied by the box, container volum Expressed as the total volume of the container, packed boxes Expressed as the number of boxes, all boxes Expressed as the number of all cargo boxes to be loaded, comb max Indicates the maximum number of mutually exclusive unloading combinations that can be formed by the initial boxes to be loaded, A,…,N are the box size types included in the unloading combination, num A ,…,num N M is the quantity specified for the corresponding box type in the unloading combination. A ,…,M N It indicates the number of boxes of specified type in the total boxes to be loaded, and k indicates the maximum number of mutually exclusive unloading combinations that can be formed in the loading plan.

[0132] By traversing all individuals in the population one by one, we can finally obtain the fitness value of each individual in the population.

[0133] Step S206: Calculate the non-dominated ranking Rank and the crowding degree CD of the individuals in the population according to the fitness value of each individual and the non-dominated ranking genetic rule, and update the individual code according to the calculation result.

[0134] According to the values ​​of the three fitness functions of each individual in the parent population (mutually exclusive combination rate, space utilization rate, and packing rate), the improved NSGA-II (non-dominated sorting genetic algorithm) is used to calculate the non-dominated sorting Rank and crowding degree CD of the individuals in the population.

[0135] In this application, based on the non-dominated sorting genetic rule, the sorting priority of the mutually exclusive unloading combination rate is taken as the first, and when the mutually exclusive combination rates are the same, the space utilization rate and the packing rate are sorted and compared in turn, and the non-dominated sorting Rank and the congestion CD of the individuals in the population are calculated, and the individual codes are updated according to the calculation results. It can be understood that such a setting makes packing guided by unloading and improves the unloading efficiency.

[0136] Specifically, a specific implementation of step S206 may be:

[0137] Steps to apply the improved NSGA-II algorithm to the population:

[0138] (1) Define a set to store the dominance rank and crowding distance CD of each individual solution.

[0139] (2) Initialization operation: Assign two attributes to each individual solution: Sp represents whether it dominates other solutions, and Np represents whether it is dominated by other solutions.

[0140] (3) According to the relationship between the values ​​of the three objective functions of each individual and other individuals in the fitness set, determine whether there is a dominance relationship between the two, and find the individual Np = 0 that is not dominated by any other solution as the individual with the highest priority of rank = 1.

[0141] (4) The other individuals are ranked according to the number of Np dominated by other solutions, and the dominance level is configured layer by layer in a hierarchical manner: rank = 0, 1, 2, ...

[0142] (5) For individuals in the same non-dominated level rank, use the crowding distance to sort them again. (6) Add Rank and CD indicators to the population individuals

[0143] Among them, step (3) is how to judge whether there is a dominance relationship between two solutions:

[0144] ① Obtain the three objective function values ​​of the current individual solution and the three objective function values ​​of other solutions.

[0145] ② First, compare the size relationship of the third indicator, the mutually exclusive unloading combination rate. If it is greater, continue to the next step of comparison; if the current individual is smaller than other solutions, the algorithm ends directly, and the output is that the individual solution is dominated by other individual solutions, and the serial number of the other dominated individual solutions is added to Np.

[0146] ③Then compare the first indicator, the size relationship of space utilization. If it is greater than, continue to the next step of comparison; otherwise, end the algorithm, output that the individual solution is dominated by other individual solutions, and add the serial numbers of the other dominated individual solutions to Np.

[0147] ④Finally, compare the third indicator, the packing rate. If it is greater than , it means that the current individual solution completely dominates other solutions, and the other dominated solutions are added to Sp; otherwise, the algorithm ends and outputs that the individual solution is dominated by other individual solutions, and the serial numbers of the dominated other individual solutions are added to Np.

[0148] ⑤End the algorithm and complete the comparison of the dominance relationship between the two solutions.

[0149] Step S207: Sort the parent individuals according to the non-dominated sorting and the crowding degree to determine the elite individuals and the ordinary individuals.

[0150] Comprehensively rank the parent individuals and adopt an elite strategy: According to the Rank non-dominated level and CD crowding distance of each individual in the population, the parent individuals of the target are comprehensively quantitatively ranked from best to worst, and individuals with population*0.8 are selected as elite individuals, and the remaining individuals with population*0.2 are selected as ordinary individuals, and the elite individuals are saved.

[0151] Step S208: performing individual crossover and mutation according to the elite individuals and ordinary individuals to obtain updated individuals.

[0152] Crossover and mutation of individuals: Perform random partial matching and crossover operations on the two segments of the packing order and placement direction codes of the selected elite individuals. Use two stages of random reversal and random mutation for mutation. In the first stage, the two segments of the packing order and placement direction codes are swapped in order according to the probability of PM1. In the second stage, the placement direction code is randomly mutated according to PM2.

[0153] In genetic algorithms, the crossover operation is to generate new individual solutions, which is achieved by exchanging partial fragments of two parent individuals; the mutation operation is to increase population diversity by randomly changing the gene at a certain position, thereby preventing the algorithm from converging to the local optimum too early.

[0154] The crossover process:

[0155] (1) Parent selection: Randomly select two individuals from the elite individuals.

[0156] (2) Determine the intersection point: Randomly Select a point as the intersection point M.

[0157] (3) Exchange gene fragments: Cross the fragments of the first individual (1 to M) and the fragments of the second individual (M+1 to packed_boxes) in the two selected parents.

[0158] (4) Fill in the missing parts after the sequence is replaced. (Since some gene fragments are packed better and some fragments are worse, in the crossover, the better combination fragments can be used for crossover according to a certain probability).

[0159] The process of mutation:

[0160] (1) Traverse each offspring individual one by one and generate a random number between (0 and 1). If the probability of the generated random number is less than PM1, the order of the coding between the order and direction in the offspring individual gene is randomly reversed. If it is greater than PM1, directly proceed to step (2) for judgment.

[0161] (2) Generate a random number between (0 and 1) again, traverse the placement direction code of the current individual, and judge bit by bit. If the probability of the generated random number is less than PM2, the position code is mutated to a random value between [1 and 6].

[0162] (3) When all individuals are traversed, the mutation process ends and the offspring individuals after the mutation are completed are returned.

[0163] Step S209, obtaining the packing result, fitness value, Rank level and CD crowding distance of the updated individual, and adding these indicators to the packing solution code of the new individual.

[0164] The DBLF heuristic loading algorithm used in step S204, the calculation formula of the three sub-index functions in step S207, and the NSGA-II non-dominated sorting algorithm in step S206 are called to obtain the packing result, fitness value, Rank level and CD crowding distance of the new individual offspring respectively, and these indicators are added to the packing scheme code of the new individual.

[0165] Step S210: Merge the individual and the updated individual to obtain a merged set, and select a target population individual set from the merged set. Determine whether the number of iterations of the target population individual set meets the loop condition. If not, iteratively calculate the fitness value set of each individual in the population to update the target population individual set; if so, use the target population individual set as an individual packing solution; and select a target packing solution from the individual packing solutions.

[0166] Among them, the individual is the parent population individual, and the updated individual is the elite individual after the crossover mutation operation. The parent population individual and the elite individual after the crossover mutation operation are merged, and the next generation of children are selected from them as the target population individuals. Specific steps for selecting the next generation of children are as follows: (1) The parent individuals and the children individuals after the crossover mutation are merged to form a new set. (2) According to the Rank non-dominated hierarchy and CD crowding distance in the individual loading plan, the merged new population set is sorted in order. (3) The top 2 / 3 excellent individuals are selected, and the remaining 1 / 3 individuals are randomly selected (the purpose is to jump out of the local optimum) to form a new offspring population set. (4) The algorithm ends and the current new offspring population individual set is output.

[0167] Determine whether the current number of iterations meets the condition for exiting the loop: if the number of iterations meets the condition, output the population individual after the final iteration, and if the condition is met, continue to execute the next step; if the condition is not met, jump back to step S205.

[0168] Obtain the final packing solution: among the individuals in the population that have been iterated to the last generation, select the individual solution with non-dominated level rank = 1 and the largest congestion CD distance as the comprehensive optimal solution considering the mutually exclusive unloading combination rate, space utilization rate, and packing rate, as the final packing solution.

[0169] Based on a general inventive concept, the present invention also provides a three-dimensional packing optimization device for implementing the above method embodiment. Figure 2This is a schematic diagram of the structure of a three-dimensional packing optimization device provided by an embodiment of the present invention. The three-dimensional packing optimization device of this embodiment includes a processor 21 and a memory 22, and the processor 21 is connected to the memory 22. The processor 21 is used to call and execute the program stored in the memory 22; the memory 22 is used to store the program, and the program is at least used to execute the three-dimensional packing optimization method in the above embodiment.

[0170] The specific implementation scheme of the three-dimensional packing optimization device provided in the embodiments of the present application can refer to the implementation scheme of the three-dimensional packing optimization method in any of the above embodiments, which will not be repeated here.

[0171] In order to explain the technical solution provided by the present invention in detail, the present invention also provides a verification example:

[0172] Step 1: Use the dataset information that meets the current container (cargo container) and cargo box size standards, and set the container size to 360cm×180cm×210cm. Set the non-fixed paradigm unloading combination required for the current unloading to the 1A1B1C combination form. There are 18 goods in the dataset, including three different types of goods, type A (80cm×60cm×100cm), type B (200cm×80cm×60cm), and type C (80cm×60cm×100cm), 6 each. At most, 18÷3=6 combinations of 1A1B1C non-fixed unloading combinations should be formed, that is, the maximum number of mutually exclusive unloading combinations that can be formed by the initial cargo box is comb. max = 6. Refer to Table 1, which is an information table of each cargo box, including the cargo number (ie, serial number), size information, placement direction, and cargo type of each cargo box.

[0173] Table 1 is the information table for each cargo box

[0174]

[0175] Step 2: Perform corresponding initialization settings according to the genetic algorithm in the content of the invention.

[0176] Population number Population_number=10, iteration number Generation=500, crossover individual number PC=int(Population*0.8), first stage mutation probability PM1=0.2, second stage mutation probability PM2=0.02, placement direction Rotations=6.

[0177] Step 3: Encode according to the loading order of the cargo boxes and the placement direction of the corresponding cargo boxes when loaded, and obtain an initial population individual list, wherein the individuals in the population individual list include the loading order code and the placement direction code.

[0178] In the present application, the cargo box types that can form an unloading combination are preferentially coded: all cargo box numbers that can form an unloading combination are combined into a set 1, and other types of cargo boxes that cannot form an unloading combination are formed into another set 2. The two sets are shuffled separately and then merged in the order of first set 1 and then set 2.

[0179] For example, the unloading combination defined in this embodiment includes three types of cargo boxes, ABC, so all 18 cargo boxes of the three types ABC are picked out to form a set; but if in addition to the three types of cargo boxes ABC, there are also cargo box types such as D and E that cannot form the specified unloading combination in the embodiment, then after the ABC that can form the unloading combination are picked out to form a set, the remaining cargo box types such as DE that cannot form the specified unloading combination must be formed into another set.

[0180] Purpose: This is to first load the container with the types of cargo boxes that can form a discharge combination, and then load the cargo boxes that cannot form a discharge combination. It is worth noting that this step is an original coding method for the discharge-oriented packing algorithm of the present invention.

[0181] According to this embodiment case, 10 initial individual packing solutions with balanced ABC cargo types can be formed in the end. Figure 3 A schematic diagram of an individual provided by an embodiment of the present invention, see Figure 3 , where for each individual box packing order is the first 18 bits and the placement direction is the last 18 bits.

[0182] {{Individual 1:{order':[18,14,13,15,10,2,5,3,4,8,9,1,17,12,11,16,7,6],

[0183] 'rotate':[6,2,5,6,5,5,1,2,4,3,4,1,1,5,4,1,5,1]}}

[0184] …

[0185] {Individual 10:{'order':[17,11,2,5,3,15,1,16,4,6,12,18,9,13,10,14,7,8],

[0186] 'rotate':[2,6,5,3,2,1,6,2,3,5,4,5,6,3,4,4,4,2]}}}.

[0187] Step 4: Load the individuals in the population individual list according to the DBLF heuristic loading rule, and add the packing result code to the individuals. That is, load the individuals according to the DBLF heuristic cargo loading rule, obtain the packing result, occupied container volume, and packing quantity of each individual, and add the packing result to the individual code.

[0188] Take the first individual among the 10 individuals in the population as an example to illustrate: after using the DBLF heuristic cargo loading method, the packing result is obtained. The packing result is in the format of [x, y, z, l, w, h]. The first three codes in the format are the coordinates of the placement point of the lower right rear corner of the cargo box, and the last three codes are the size of the cargo box. For example, [240, 80, 0, 60, 100, 120] means that the coordinates of the lower right rear corner of the cargo box are placed at (240, 80, 0), and the size of the cargo box is (60, 100, 120), which belongs to type B cargo. Figure 4 A schematic diagram of an individual coding provided by an embodiment of the present invention, see Figure 4 , which is a specific example of the first individual encoding. At this step, the encoding of the individual has added the boxing result.

[0189] Individual 1:{'order':[18,14,13,15,10,2,5,3,4,8,9,1,17,12,11,16,7,6],

[0190] 'rotate':[6,2,5,6,5,5,1,2,4,3,4,1,1,5,4,1,5,1],

[0191] 'result':[[0,0,0,80,100,60],[0,0,60,60,100,80],[0,100,0,80,60,10 0],[80,0,0,80,100,60],[160,0,0,120,60,100],[80,100,0,80,60,200],[ 160,60,0,60,80,200],[220,60,0,60,120,100],[280,0,0,80,60,200],[160,0,100,100,60,80],[220,60,100,60,120,100],[280,60,0,80,60,200]]}

[0192] Step 5: Obtain the number of mutually exclusive unloading combinations without fixed paradigm as the sub-goal of genetic algorithm optimization, that is, as the core variable of the genetic algorithm's mutually exclusive unloading combination rate target.

[0193] Purpose: Get the number of mutually exclusive unloading combinations without fixed paradigm for each individual packing solution in the population

[0194] (1) Iterate 10 individuals one by one and first obtain the set of adjacent relationships between each individual container;

[0195] Still taking the first individual as an example, the first individual is loaded with 12 cargo boxes. We need to find out whether there are any adjacent cargo boxes on the six sides of each cargo box, and if there are any adjacent cargo boxes, what are the adjacent cargo boxes. Calculate the starting point and end point range of all cargo boxes in the three directions of X, Y, and Z axes. For example: to determine which cargo boxes are near the first loaded cargo box, compare the starting and end point range of the first cargo box in the three axes with the starting and end points of the other 11 loaded cargo boxes. If two of the axes have overlapping parts, they are considered to be generally adjacent on these two axis planes.

[0196] It is worth noting that such a judgment may result in a pseudo-adjacent situation, where only two oblique sides are adjacent. Figure 5 A schematic diagram of surface-to-surface contact adjacency and "pseudo" adjacency provided by an embodiment of the present invention, see Figure 5 , only two adjacent oblique sides are "pseudo" adjacent; Box 1 and Box 4 are face-to-face connected, not "pseudo" adjacent. Therefore, it is necessary to find face-to-face adjacency again in the obtained generalized adjacent boxes. The biggest difference between pseudo adjacency and face-to-face adjacency is that the overlap range of the starting and ending points of the two boxes is only 1 point, so the algorithm filters out the points whose overlap range of the starting and ending points is 1, and thus obtains the final face-to-face adjacent points.

[0197] Taking the first individual as an example, each loading box is finally converted into a serial number to indicate the adjacent {1:[2,3,4],2:[1,3],3:[1,2,6],4:[1,5,6,7],5:[4,7,8,9,10],6:[3,4,7],7:[4,5,6,8,10,11],8:[5,7,11,12],9:[5,12],10:[5,7,11],11:[7,8,10,12],12:[8,9,11]}. The above result indicates that the first loading box is adjacent to the second, third, and fourth boxes.

[0198] (2) Take each box in the packing result as a vertex and combine it with the adjacent relationship set to generate the loading box adjacency relationship matrix.

[0199] The purpose of this step is to transform the problem of finding the maximum number of mutually exclusive unloading combinations into the field of undirected graphs in graph theory. The core idea of ​​the algorithm is to first rewrite the placement plan of the loaded cargo box 'result':[[0,0,0,80,100,60],[0,0,60,60,100,80],…,[280,60,0,80,60,200]]} into the form of A1A2…B1B2… according to the size type of the cargo box, and display it as the vertices in the undirected graph (so that the display is convenient and intuitive), and then use the adjacent relationship of each vertex cargo box obtained in the previous step as the connecting edge to generate the adjacency matrix of the cargo box adjacent relationship and draw the adjacent relationship graph.

[0200] Continuing with the example of Article 1:

[0201] Known neighbor relations:

[0202] {1:[2,3,4],2:[1,3],3:[1,2,6],4:[1,5,6,7],5:[4,7,8,9,10],6:[3,4,7],7:[4,5,6,8,10,11],8:[5,7,11,12],9:[5,12],10:[5,7,11],11:[7,8,10,12],12:[8,9,11]}

[0203] The vertices are:

[0204] ['A1','A2','A3','A4','B1','C1','C2','B2','C3','A5','B3','C4']

[0205] Through the algorithm in the invention content, the adjacency matrix can be obtained:

[0206] [[0,1,1,1,0,0,0,0,0,0,0,0],[1,0,1,0,0,0,0,0,0,0,0,0],[1,1,0,0,0,1,0,0,0,0,0,0],[1,0,0,0,1,1,1,0,0,0,0,0],[0,0,0,1,0,0,1,1,1,1,0,0],[0,0,1,1,0,0,1,0,0,0,0,0] ,[0,0,0,1,1,1,0,1,0,1,1,0],[0,0,0,0,1,0,1,0,0,0,1,1],[0,0,0,0,1,0,0,0,0,0,0,1],[0,0,0,0,1,0,1,0,0,0,1,0],[0,0,0,0,0,0,1,1,0,1,0,1,0],[0,0,0,0,0,0,0,1,1,0,1,0]]

[0207] Figure 6 An undirected graph of adjacent relationships between cargo boxes is provided in one embodiment of the present invention.

[0208] (3) Then generate all possible random combinations of three vertices, such as (A1, B2, C3) and (A1, A3, B4), and determine one by one whether the types contained in the random combination meet the unloading combination requirements; if the types contained meet the unloading combination requirements, use the breadth-first algorithm based on the adjacency relationship of the cargo boxes to determine whether the adjacent conditions are met. If so, output this combination; if not, do not output it.

[0209] Continuing with the example of the first individual, it is known that the result loading part 'result' in the individual: [[0,0,0,60,100,80],……,[240,80,0,60,100,120]] has been rewritten into the vertex form of ['A1','B1','C1','A2','A3','B2','A4','B3','A5','B4','A6','B5','B6']. Each time, 3 elements are randomly selected directly from the vertex combination, regardless of whether their types meet the requirements of the unloading combination. For example, (A1, A2, C1), (A4, B1, C1), (A1, C2, B1)... Then, first determine whether the types contained in the combination generated by this random selection meet the requirements of the unloading combination. The unloading combination requirement of this experiment is (ABC), so (A1, A2, C1) does not meet the requirements because there are 2 A types but no B type. (A4, B1, C1)(A1, C2, B1) meets the requirements.

[0210] After that, it is determined again whether there is an adjacent relationship between the combined cargo boxes. The local breadth-first (BFS) search algorithm is used to start the search from any vertex in the combination according to the adjacent relationship matrix between cargo boxes. For example, starting from A4 in the combination (A4, B1, C1), B1 is searched first and it is found that there is an adjacent relationship between cargo box A4 and cargo box B1 in the adjacency matrix, which is a passage. There is no cargo box adjacent to B1, so it returns to A4 to search again and finds that C1 is also adjacent to A4, and there is no adjacent to other cargo boxes after C1. Therefore, the final search result is (A4, B1, C1) meets the conditions, while (A1, C2, B1) starts from A1 and only C2 is adjacent in the search combination, and there is no other cargo box adjacent to C2, so the final search result is (A1, C2) does not meet the conditions.

[0211] The first individual should eventually obtain 10 combinations that meet the unloading combination types and adjacent relationships: ('A4','B1','C1'),('A4','B1','C2'),('A4','B1','C3'),('A4','C2','B2'),('A4','C2','B3'),('B1','C2','A5'),('B1','C3','A5'),('C2','B2','A5'),('C2','A5','B3'),('A5','B3','C4').

[0212] (4) From all repeatable unloading combinations, select the unloading combinations that can form the most mutually exclusive ones. All repeatable unloading combinations are used as vertices, and the relationship between mutually exclusive unloading combinations can be used as connecting edges to form a mutually exclusive relationship adjacency matrix. The mutually exclusive adjacency matrix is ​​used to determine whether all combinations in the selected set of unloading combinations with a number of k are mutually exclusive and there is no shared cargo box. If so, the maximum number of unloading combinations that can be formed is output as k. If not, the output result is k-1.

[0213] The purpose of this step is to find the number of mutually exclusive unloading combinations. Therefore, finding mutually exclusive unloading combinations requires that there should be no common cargo box vertices between any two combinations. Figure 7 A schematic diagram of a breadth-first search provided by an embodiment of the present invention, see Figure 7 , (A4, B1, C1) and (A4, B2, C2), (A5, B1, C2) have shared cargo boxes between the three combinations, so they cannot form a set of mutually exclusive unloading combinations and cannot coexist. However, (A4, B1, C1) (A5, B3, C4) do not have shared cargo boxes, so they can form a set of mutually exclusive unloading combinations. Therefore, according to the above ideas, each unloading combination is marked with a serial number and converted into a vertex form. First, find the set of unloading combinations that can be mutually exclusive, and use the relationship between them as a mutually exclusive relationship to generate the adjacency matrix of the mutually exclusive relationship (two combinations are mutually exclusive if they have a connecting edge).

[0214] Continuing with the example of individual 1,

[0215] Vertex (1-10): [1,2,3,4,5,6,7,8,9,10]

[0216] Pairwise mutually exclusive relationships are used as connecting edges:

[0217] [[1,8],[1,9],[1,10],[2,10],[3,8],[3,9],[3,10],[4,7],[4,10],[5,7]]

[0218] Mutually exclusive adjacency matrix:

[0219] [[0,0,0,0,0,0,0,1,1,1],[0,0,0,0,0,0,0,0,0,1],[0,0,0,0,0,0,0,1,1,1],[0,0,0,0,0,0,1,0,0,1],[0,0,0,0,0,0,1,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,1,1,0,0,0,0,0],[1,0,1,0,0,0,0,0,0,0],[1,0,1,0,0,0,0,0,0,0],[1,1,1,1,0,0,0,0,0,0]]

[0220] Figure 8 A schematic diagram of a mutually exclusive relationship provided by an embodiment of the present invention.

[0221] Then use the corresponding algorithm to determine which combinations are mutually exclusive, for example Figure 8 In the left picture, we can judge whether the three combinations [1,4,6] are mutually exclusive. We only need to judge whether [1 4][1 6][4 6] have no commonality. According to the mutually exclusive relationship adjacency matrix, if A 14 =1 means that the unloading combinations 1 and 4 are not mutually exclusive. Therefore, if [1 4][1 6][4 6] are not mutually exclusive, then we can use the adjacency matrix A 14 *A 16 *A 46 =1 judges that they are mutually exclusive; once the product = 0, it means that there is a shared cargo box vertex between at least one pair of unloading combinations.

[0222] Traversing the current unloading combination set, it is found that all 3 unloading combination sets such as [1 4 6] have commonality, indicating that there is no mutually exclusive unloading combination set with k = 3 and the number of 3. Then the final output is that there is a mutually exclusive combination set with k = 3-1 = 2 and the number of 2

[0223] Step 6: Use the three sub-objective functions of space utilization, packing rate, and mutually exclusive unloading combination rate to solve the fitness value of each individual in the population, and add the set of fitness values ​​to the individual loading plan.

[0224] This step is to use the mutually exclusive unloading combination rate obtained in step 5, together with the two sub-goals of space utilization and packing rate to form a fitness function. The calculation method of the mutually exclusive unloading combination rate is: the maximum number of mutually exclusive unloading combinations k that can be formed obtained in step 5 is divided by the maximum number of unloading combinations comb that can be formed by the boxes to be loaded max Converted into mutually exclusive unloading combination rates.

[0225] Take the first individual as an example: According to the formula in the invention content, we can finally get the fitness value set 'fitness' = [61.73, 66.67, 20.0], where the first value is the container space utilization rate 61.73, the second value is the packing rate 12÷18×100=66.67, and the sixth value is the mutually exclusive unloading combination rate. The result is 33.3%. The fitness value of each individual is also added to the individual solution, as shown below:

[0226] Instance 1:

[0227] {'order':[18,14,13,15,10,2,5,3,4,8,9,1,17,12,11,16,7,6],'rotate':[6,2,5 ,6,5,5,1,2,4,3,4,1,1,5,4,1,5,1],'result':[[0,0,0,80,100,60],[0,0,60,60, 100,80],[0,100,0,80,60,100],[80,0,0,80,100,60],[160,0,0,120,60,100],[80 ,100,0,80,60,200],[160,60,0,60,80,200],'fitness':[61.73,66.67,45,33.3]}

[0228] Step 7: Use the improved NSGA-II algorithm combined with the set of fitness of each individual to calculate the non-dominated sorting Rank and crowding distance CD for each individual, and then add the rank level and crowding distance CD to the individual code to form the most complete individual code.

[0229] In order to highlight the unloading orientation in the Rank sorting process, the mutually exclusive unloading combination rate sub-indicator is taken as the primary sorting consideration. When the mutually exclusive unloading combination rates of two individuals are the same, the space utilization rate and the packing rate are compared in turn.

[0230] Explanation: The NSGA-II algorithm is a classic algorithm for solving multi-objective optimization problems. Through the algorithm's non-dominated hierarchical sorting Rank and the crowding distance CD scoring mechanism between targets, it can provide the most balanced high-quality solution among multiple targets. After the improvement, the desired result is that the sorting score is more inclined to the mutually exclusive unloading combination rate, but at the same time, the space rate and packing rate are also better.

[0231] This step is to use the NSGA-II algorithm to quantify, rate, and score the three sub-indicators of space utilization, packing rate, and maximum mutually exclusive unloading combination rate for each individual in the population. For example, for the following two individuals, the algorithm will prioritize comparing the mutually exclusive unloading combination index of 33.3%>16.7%, so the first individual can dominate the second individual, and the first individual has a higher priority than the second individual. If the mutually exclusive unloading combination rates of the two are equal, then compare the space utilization and packing rates, and perform non-dominated rank sorting. When the rank levels are the same, the crowding distance is used to compare the distances of individuals of the same level to see how good they are compared to other individuals. (If the individuals can be distinguished by rank level, there is no need to calculate the CD crowding distance)

[0232] Purpose: In the next step 8, we want to sort the individuals and select the individual solutions with the best mutually exclusive unloading combination sub-indicator, and the best space utilization and packing rate sub-indicators.

[0233] Individual 1: fitness = [61.73, 66.67, 49, 33.3]

[0234] Individual 2: fitness = [59.96, 72.22, 50, 16.7]

[0235] Fig. 9 A schematic diagram of an individual coding provided by an embodiment of the present invention. Fig. 9 , after being solved by the algorithm, we finally get the individual's non-dominated hierarchy Rank and crowding distance CD, and add them to the individual to form the most complete individual solution.

[0236] See also Fig. 9 , the box with serial number (i.e., serial number) 18, in the 5th placement direction, has a position and size of [0,0,0,80,100,60] when loaded into the container; the box with serial number 1, in the 1st placement direction, has a position and size of [280,60,0,80,60,120] when loaded into the container, and so on. After all the boxes are assembled, the space utilization rate is 61.73%, the packing rate is 66.67%, the unloading combination rate is 33.3%, the non-dominated level is 1, and the crowding distance is 5000.

[0237] Step 8: Sort the parent individuals according to Rank level and CD distance to obtain population individuals with priority order and high-quality individuals with the most balanced indicators. Select the top 8 individuals as elite individuals and the remaining 2 individuals as ordinary individuals, and output the elite individuals.

[0238] Step 9: Randomly select two individuals from the elite individuals and perform cross-matching of some fragments with the random crossover point M as the boundary to generate new individuals. Repeat this process until 10 new crossover individuals are generated. After that, for the new individuals generated after the crossover, the packing order and the front-to-back order of the placement direction are swapped with a probability of PM1=0.2, and the placement direction is randomly mutated with a probability of PM2=0.02, and finally 10 new individuals after the crossover mutation are generated.

[0239] Step 10: Use the DBLF heuristic loading algorithm in step 5, the objective function calculation formula in step 6, and the NSGA-II algorithm in step 7 to obtain the packing result, fitness value, Rank level, and CD crowding distance of the new individual offspring, respectively, and add these indicators to the encoding of the new individual to form a complete individual packing plan.

[0240] Step 11: Merge the new individual offspring with the original individual population, sort the merged individuals again, select the top 6 excellent individuals, and randomly select the other 4 individuals to form a 10-individual solution for the new generation population.

[0241] Step 12: Determine whether the number of crossover and mutation iterations of the genetic algorithm meets the loop conditions; if the iteration completion conditions are met, jump out of the iteration loop and output the individual packing solution; if not, jump back to step 8.

[0242] Step 13: Select the individual solution with rank = 1 and the largest congestion CD distance from the obtained population individual packing solutions as the comprehensive optimal packing solution considering the mutually exclusive unloading combination rate, space utilization rate, and packing rate.

[0243] The final experimental results after 1000 iterations are as follows:

[0244] Table 2 shows the average accuracy of individuals with Rank=1 in each generation after 1000 iterations.

[0245] Evaluation indicators AccuracyAvg Mutually exclusive unloading combination rate 94.43% Space Utilization 93.47% Loading rate 98.14%

[0246] Fig.10 An undirected graph of adjacent relationships generated by a final optimal individual according to a packing result provided by an embodiment of the present invention; Fig.11 A schematic diagram of a final packing result provided by an embodiment of the present invention; see Figure 10-11 ,In the final packing result, the number of mutually exclusive unloading combinations is optimized to 6, and the mutually exclusive unloading combination rate is optimized to 100%.

[0247] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0248] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0249] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0250] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0251] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0252] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0253] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0254] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0255] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A three-dimensional packing optimization method, characterized in that: include: Respectively obtain parameter information of the cargo container, parameter information of the cargo box and the unloading combination; Based on the genetic algorithm, according to the parameter information of the cargo container, the parameter information of the cargo box to be loaded and the required unloading combination information, a three-dimensional packing optimization is performed with the optimal fitness function as the optimization target to obtain a target packing scheme; wherein the fitness function includes: mutually exclusive unloading combination rate, space utilization rate and packing rate; each mutually exclusive unloading combination is determined according to the required unloading combination information, and there is no common cargo box to be loaded between mutually exclusive unloading combinations; the target packing scheme includes: the packing order, packing position and placement direction of the cargo box; The genetic algorithm is based on the parameter information of the cargo container, the parameter information of the cargo box to be loaded and the required unloading combination information, and the three-dimensional packing optimization is performed with the optimal fitness function as the optimization target to obtain the target packing solution, including: Initialize the relevant parameters of the genetic algorithm; Encoding is performed according to the loading order of the cargo boxes and the placement direction of the corresponding cargo boxes when they are loaded, and an initial population individual list is obtained, wherein the individuals in the population individual list include the loading order code and the placement direction code; Loading the individuals in the population individual list according to the DBLF heuristic loading rule, and adding the packing result code to the individuals; Obtaining the number of mutually exclusive unloading combinations without a fixed paradigm as a sub-goal of genetic algorithm optimization; wherein the mutually exclusive unloading combinations without a fixed paradigm do not have a common cargo box between each unloading combination, and the cargo boxes in each unloading combination are adjacent to each other; According to the mutually exclusive unloading combination rate, space utilization rate and packing rate, an objective function oriented to combined unloading is constructed to calculate the fitness value set of each individual in the population; According to the fitness value of each individual and the non-dominated sorting genetic rule, the non-dominated sorting and crowding degree of individuals in the population are calculated, and the individual codes are updated according to the calculation results; Sort the parent individuals according to non-dominated sorting and crowding degree to determine elite individuals and ordinary individuals; Perform individual crossover and mutation on the elite individuals and the common individuals to obtain updated individuals; Acquire the data of the updated individual, the data including the packing result, fitness value, non-dominated sorting level and crowding distance, and add the data of the updated individual to the packing scheme code of the new individual; Merging the individual and the updated individual to obtain a merged set, and selecting a target population individual set from the merged set; Determine whether the number of iterations of the target population individual set meets the loop condition, if not, iteratively calculate the fitness value set of each individual in the population to update the target population individual set; If satisfied, the target population individual set is used as the individual packing solution; A target binning solution is selected from the individual binning solutions.

2. The method according to claim 1, characterized in that The encoding is performed according to the loading order of the cargo boxes and the placement direction of the corresponding cargo boxes when they are loaded, and an initial list of population individuals is obtained, including: All container numbers that can form a unloading combination are combined into a first set, and other container numbers that cannot form an unloading combination are combined into a second set; After scrambling the container numbers in the first set and the second set respectively, the scrambled first set and the second set are merged in the order of the first set first and the second set to obtain a sequential code; Set a placement direction mark for each cargo box, and obtain the placement direction code of each cargo box according to the placement direction mark; splicing the sequence code and the placement direction code to obtain initial population individuals; The container numbers in the first set and the second set are cyclically disrupted to obtain a preset number of initial population individuals, and the preset number of initial population individuals are used as the initial population individual list.

3. The method according to claim 1, characterized in that The method of obtaining the number of mutually exclusive unloading combinations without a fixed paradigm includes: According to the preset adjacent relationship detection algorithm, the adjacent boxes of each box in the packing result are detected to obtain the adjacent relationship set between the boxes; Take each box in the packing result as a vertex set, and generate an adjacency matrix of the adjacent relationships between the boxes according to the adjacent relationships between the boxes; Generate an undirected graph of the adjacent relationship between cargo boxes according to the cargo box vertex set and the cargo box adjacency matrix; Obtain all possible repeated cargo box unloading combinations according to the undirected graph; The maximum number of feasible unloading combinations that can satisfy the condition that the cargo boxes in the combination are not repeated is selected from all the possible repeated cargo box unloading combinations, and the number of unloading combinations that meet the condition is taken as the maximum number of mutually exclusive unloading combinations without fixed paradigm.

4. The method according to claim 3, characterized in that The method of detecting the adjacent boxes of each box in the packing result according to the preset adjacent relationship detection algorithm to obtain the adjacent relationship set between the boxes includes: Traverse the packing results to obtain the placement point coordinates and dimensions of each box; Determine whether two boxes are adjacent to each other based on the coordinates of the boxes in the packing results.

5. The method according to claim 3, characterized in that: The method takes each cargo box in the packing result as a vertex set and generates an adjacency matrix of the adjacent relationships between the cargo boxes according to the adjacent relationships between the cargo boxes, including: Traverse the packing results, convert each box into a vertex number, and generate a vertex set of the packing results; Determine the edges of the undirected graph based on the adjacent relationship between the boxes in the packing results; Determine the number of vertices according to the vertex set, and create a zero matrix of a preset size; According to the adjacent relationship between the cargo boxes and the zero matrix, an adjacency matrix of each cargo box is generated.

6. The method according to claim 5, characterized in that The step of obtaining all possible repeated cargo box unloading combinations according to the undirected graph includes: According to the vertex set of the packing result, all possible combinations of preset number of cargo box nodes are generated; wherein the preset number is the number of cargo boxes in a unloading combination; Based on the undirected graph, sequentially traverse the generated combinations of a preset number of cargo box nodes to determine whether the combination meets the unloading combination requirements; If the unloading combination requirements are met, the breadth-first algorithm is used to determine whether a connected path can be formed between all nodes in the combination. If so, the combination is determined to be a unloading combination; If the unloading combination requirement is not met, determine whether the next combination meets the unloading requirement combination.

7. The method according to claim 6, characterized in that The screening method of the mutually exclusive unloading combination without fixed paradigm includes: All repeatable unloading combinations are taken as vertices, and the mutually exclusive relationships between all mutually exclusive unloading combinations are taken as connecting edges, so as to determine the adjacency matrix of the mutually exclusive relationships between all unloading combinations; wherein, the condition for judging whether the selected preset number of unloading combinations can become a mutually exclusive unloading set is: judging whether all the unloading combinations within the selected mutually exclusive set are mutually exclusive.

8. The method according to claim 1, characterized in that The method of performing non-dominated sorting and crowding calculation on individuals in the population according to the fitness value of each individual and the non-dominated sorting genetic rule, and updating the coding of the individuals according to the calculation results, includes: Based on the non-dominated sorting genetic rule, the sorting priority of the mutually exclusive unloading combination rate is taken as the first. When the mutually exclusive combination rates are the same, the space utilization rate and the packing rate are sorted and compared in turn. The non-dominated sorting and crowding degree calculation are performed on the individuals in the population, and the individual codes are updated according to the calculation results.

9. A three-dimensional packing optimization device, characterized in that: The invention comprises a processor and a memory, wherein the processor is connected to the memory: Wherein, the processor is used to call and execute the program stored in the memory; The memory is used to store the program, and the program is at least used to execute the three-dimensional packing optimization method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Hybrid adaptive genetic algorithm for three-dimensional multi-box flexible boxing

    CN116644807A

  • Encasement method and device, electronic equipment and storage medium

    CN117557177A