Three-dimensional boxing optimization method and device and computer equipment
By constructing a virtual surface model and performing multi-dimensional constraint verification, the placement of workpieces in the material frame is optimized, solving the problems of workpiece overturning and low space utilization in traditional three-dimensional packing algorithms. This achieves a high degree of fit between the packing scheme and production requirements, as well as safety, and improves packing efficiency and integrated collaborative optimization.
Patent Information
- Application Number
- CN202511973730.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-07
AI Technical Summary
Existing 3D packing algorithms ignore the support area required for workpiece placement and the load-bearing capacity of the material frame when considering geometric size matching. This makes it easy for the packing scheme to cause workpiece tipping or damage during actual handling. Furthermore, it is difficult to match with downstream sorting or delivery needs, resulting in low space utilization. Moreover, it is disconnected from upstream cutting plans and downstream sorting scheduling, leading to a mismatch between the packing scheme and the actual production cycle.
By constructing a virtual surface model to dynamically manage the placeable areas and candidate placement points of different height layers within the material frame, and combining multi-dimensional constraint verification and iterative optimization strategies, considering the physical stability of the workpiece and the business flow, the placement scheme of the workpiece in the material frame is optimized to ensure that the packing scheme matches the actual production needs.
It improves the utilization rate of bin space, avoids secondary rework and safety risks caused by misaligned flow and insufficient support, and realizes integrated collaborative optimization of three-dimensional packing and production scheduling. The output packing plan can directly guide downstream sorting execution.
Smart Images

Figure CN121810147A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent manufacturing technology, and in particular to a three-dimensional packing optimization method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] In the manufacturing process, three-dimensional packing is a key link connecting processing and material handling. Especially in industries such as steel processing and metal manufacturing, how to efficiently and stably pack workpieces of different sizes, shapes and weights into standardized material frames directly affects production efficiency and logistics costs.
[0003] The limitations of traditional 3D packing algorithms are as follows: First, they typically only consider geometric matching, ignoring physical constraints such as the support area required for workpiece placement and the load-bearing capacity of the packing frame, which can easily lead to workpiece tipping or damage during actual handling. Second, the algorithm model is disconnected from the business rules of the production site (such as workpiece flow and batch grouping requirements), which can easily result in solutions that do not meet the downstream sorting or delivery needs, causing rework. Third, its spatial representation is relatively simple, making it difficult to accurately describe the remaining space after irregularly shaped workpieces are placed, resulting in low space utilization. In addition, the algorithm's optimization strategy is relatively simple, easily getting trapped in local optima and unable to adapt to complex and ever-changing order combinations. Finally, existing algorithms often run independently, disconnected from upstream cutting plans and downstream sorting scheduling, forming a segmented operation mode, which leads to a mismatch between the packing solution and the actual production cycle.
[0004] While relying on human experience for scheduling and packing planning offers some flexibility, it is inefficient, slow to respond, and the quality of the solutions is inconsistent. Furthermore, it is difficult for humans to coordinate and optimize under multiple constraints, which can easily lead to overlooking some aspects and producing non-compliant solutions.
[0005] Therefore, there is an urgent need for a three-dimensional packing optimization method, device, computer equipment, computer-readable storage medium, and computer program product that can simultaneously consider geometric layout and physical stability, and can control processes such as material cutting and sorting. Summary of the Invention
[0006] Therefore, it is necessary to provide a three-dimensional packing optimization method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can simultaneously consider geometric layout and physical stability and can constrain processes such as material feeding and sorting, in order to address the above-mentioned technical problems.
[0007] Firstly, this application provides a three-dimensional bin packing optimization method, including:
[0008] Obtain workpiece parameters, material frame parameters, and business constraint parameters of associated downstream processes, and construct a virtual surface model for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points of different height layers within the material frame.
[0009] The workpieces are sorted according to the business constraint parameters, and candidate placement schemes are determined for each workpiece in the virtual surface model of the available material frame based on the sorting results.
[0010] Based on the preset optimization objective, the optimal placement scheme is selected from the candidate placement schemes, and a multi-dimensional constraint verification is performed on the optimal placement scheme.
[0011] If the optimal placement scheme passes the verification, the workpiece placement operation is performed, and the virtual surface model and constraint state of the relevant material frame are dynamically updated.
[0012] The process iteratively executes the steps of workpiece sorting, candidate scheme determination, scheme selection and verification, and placement update until all workpieces have been processed, and outputs the final packing scheme containing the specific placement position of each workpiece in the corresponding material box.
[0013] In one embodiment, the step of constructing a virtual surface model for each material frame, the virtual surface model being used to dynamically manage the placeable areas and candidate placement points at different heights within the material frame, includes:
[0014] Create an initial virtual surface for each material frame, set the height of the initial virtual surface to zero, and set the two-dimensional available area of the initial virtual surface to be consistent with the bottom boundary of the material frame;
[0015] Add the preset set of coordinate points in the internal space of the material frame as the initial candidate placement points of the initial virtual surface;
[0016] After the workpiece is successfully placed, a new virtual surface is created at the height of the top of the workpiece;
[0017] Based on the three-dimensional contour of the placed workpiece, calculate the projection position points of each vertex at the bottom of the workpiece on the new virtual surface.
[0018] The projected location point is added as a new candidate placement point to the candidate placement point set of the new virtual surface, and the effective placement area of the new virtual surface is recalculated based on all candidate placement points and the material frame boundary.
[0019] In one embodiment, the multidimensional constraint verification includes a supporting constraint verification; performing multidimensional constraint verification on the optimal placement scheme includes:
[0020] Based on the placement posture and position coordinates of the workpiece in the optimal placement scheme, determine the projected polygon formed by the bottom of the workpiece under the placement posture;
[0021] Identify the supporting structure surface covered by the projected polygon within the material frame space, the supporting structure surface including the bottom surface of the material frame and the upper surface of the placed workpiece;
[0022] Calculate the effective contact area between the projected polygon and the surface of the supporting structure;
[0023] Compare the effective contact area with the total area of the projected polygon;
[0024] Determine whether the ratio of the effective contact area to the total area of the projected polygon is not lower than a preset support area threshold in order to perform support constraint verification.
[0025] In one embodiment, the multidimensional constraint verification includes business flow constraint verification; performing multidimensional constraint verification on the optimal placement scheme includes:
[0026] Obtain the flow direction identifier carried by the workpiece, which is associated with the downstream sorting exit or delivery path;
[0027] Get the current flow direction status of the material box;
[0028] If the current flow direction identifier indicates that the material frame is empty, assign the flow direction identifier of the workpiece to the material frame;
[0029] If the current flow direction indicator status indicates that the material box is not empty, verify whether the flow direction indicator of the workpiece is consistent with the flow direction indicator of the material box;
[0030] If the flow direction identifiers of the two are consistent, the business flow direction constraint verification of the optimal placement scheme is deemed to have passed.
[0031] In one embodiment, the multidimensional constraint verification includes geometric interference verification; performing multidimensional constraint verification on the optimal placement scheme includes:
[0032] Based on the placement position and three-dimensional dimensions of the workpiece in the optimal placement scheme, calculate the spatial envelope occupied by the workpiece in the material frame coordinate system;
[0033] Verify whether the maximum outer contour of the spatial envelope in each direction does not exceed the internal boundary of the material frame in the corresponding dimension, in order to determine whether the boundary constraint is satisfied;
[0034] Obtain the set of spatial envelopes occupied by all placed workpieces within the material frame;
[0035] Calculate whether there is an intersection between the spatial envelope of the current workpiece and the spatial envelope of each already placed workpiece in the set, in order to determine whether the overlap constraint is satisfied.
[0036] In one embodiment, selecting the optimal placement scheme from the candidate placement schemes based on a preset optimization objective includes:
[0037] For each candidate placement scheme, calculate the first evaluation parameter and the second evaluation parameter respectively; the first evaluation parameter is the maximum value of all workpiece vertices in the height direction in the material frame after executing the candidate placement scheme; the second evaluation parameter is the remaining space volume obtained by subtracting the total volume of all placed workpieces from the internal volume of the material frame after executing the candidate placement scheme.
[0038] According to the lexicographical order optimization rule, the set of schemes that minimize the maximum height of the material frame is selected from all candidate placement schemes with the goal of minimizing the first evaluation parameter.
[0039] When the set of solutions contains multiple candidate placement solutions, the solution that maximizes the remaining space volume of the material frame is selected from the set of solutions with the goal of maximizing the second evaluation parameter, and determined as the optimal placement solution.
[0040] In one embodiment, the method further includes:
[0041] If none of the material frames at the candidate placement point can accommodate the next workpiece, select the target material frame from the multiple material frames currently located at the candidate placement point and remove it from the candidate placement point;
[0042] Select a new material frame from the available material frame resources and move it to the available position of the candidate placement point;
[0043] Initialize a virtual surface model for the new material frame and use it as the currently available material frame to redetermine candidate placement schemes.
[0044] In one embodiment, the output of the final packing scheme further includes:
[0045] Establish a solution pool containing at least one feasible packing scheme, and select the currently best evaluated solution from the solution pool as the benchmark solution;
[0046] A local search operation is performed on the baseline solution to generate a new solution. The local search operation includes swapping the placement and orientation of two workpieces in the same bin, or moving at least one workpiece from the current bin to another bin with the capacity to accommodate it.
[0047] Perform the multidimensional constraint verification on the new solution;
[0048] Calculate the global objective function value of the new solution, which comprehensively represents the bin space utilization rate and the total number of bins used;
[0049] The global objective function value of the new solution is compared with the global objective function values of all solutions in the solution pool. If the new solution is better, the new solution replaces the solution with the worst global objective function value in the solution pool.
[0050] Repeat the iterative process of local search, constraint verification, function value calculation and solution pool update until the preset optimization termination condition is met, and output the solution with the best global objective function value in the solution pool as the final bin packing scheme.
[0051] Secondly, this application also provides a three-dimensional packing optimization apparatus, comprising:
[0052] The acquisition module is used to acquire workpiece parameters, material frame parameters and business constraint parameters of related downstream processes, and to build a virtual surface model for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points of different height layers within the material frame.
[0053] The candidate placement scheme determination module is used to sort the workpieces according to the business constraint parameters, and determine the candidate placement scheme for each workpiece in the virtual surface model of the available material frame based on the sorting results.
[0054] The candidate placement scheme verification module is used to select the optimal placement scheme from the candidate placement schemes based on a preset optimization objective, and to perform multi-dimensional constraint verification on the optimal placement scheme.
[0055] The update module is used to perform workpiece placement operations when the optimal placement scheme passes the verification, and to dynamically update the virtual surface model and constraint state of the relevant material frame;
[0056] The packing scheme determination module is used to iteratively execute the steps of workpiece sorting, candidate scheme determination, scheme selection and verification, and placement update until all workpieces have been processed, and outputs the final packing scheme containing the specific placement position of each workpiece in the corresponding material box.
[0057] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0058] Obtain workpiece parameters, material frame parameters, and business constraint parameters of associated downstream processes, and construct a virtual surface model for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points of different height layers within the material frame.
[0059] The workpieces are sorted according to the business constraint parameters, and candidate placement schemes are determined for each workpiece in the virtual surface model of the available material frame based on the sorting results.
[0060] Based on the preset optimization objective, the optimal placement scheme is selected from the candidate placement schemes, and a multi-dimensional constraint verification is performed on the optimal placement scheme.
[0061] If the optimal placement scheme passes the verification, the workpiece placement operation is performed, and the virtual surface model and constraint state of the relevant material frame are dynamically updated.
[0062] The process iteratively executes the steps of workpiece sorting, candidate scheme determination, scheme selection and verification, and placement update until all workpieces have been processed, and outputs the final packing scheme containing the specific placement position of each workpiece in the corresponding material box.
[0063] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0064] Obtain workpiece parameters, material frame parameters, and business constraint parameters of associated downstream processes, and construct a virtual surface model for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points of different height layers within the material frame.
[0065] The workpieces are sorted according to the business constraint parameters, and candidate placement schemes are determined for each workpiece in the virtual surface model of the available material frame based on the sorting results.
[0066] Based on the preset optimization objective, the optimal placement scheme is selected from the candidate placement schemes, and a multi-dimensional constraint verification is performed on the optimal placement scheme.
[0067] If the optimal placement scheme passes the verification, the workpiece placement operation is performed, and the virtual surface model and constraint state of the relevant material frame are dynamically updated.
[0068] The process iteratively executes the steps of workpiece sorting, candidate scheme determination, scheme selection and verification, and placement update until all workpieces have been processed, and outputs the final packing scheme containing the specific placement position of each workpiece in the corresponding material box.
[0069] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0070] Obtain workpiece parameters, material frame parameters, and business constraint parameters of associated downstream processes, and construct a virtual surface model for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points of different height layers within the material frame.
[0071] The workpieces are sorted according to the business constraint parameters, and candidate placement schemes are determined for each workpiece in the virtual surface model of the available material frame based on the sorting results.
[0072] Based on the preset optimization objective, the optimal placement scheme is selected from the candidate placement schemes, and a multi-dimensional constraint verification is performed on the optimal placement scheme.
[0073] If the optimal placement scheme passes the verification, the workpiece placement operation is performed, and the virtual surface model and constraint state of the relevant material frame are dynamically updated.
[0074] The process iteratively executes the steps of workpiece sorting, candidate scheme determination, scheme selection and verification, and placement update until all workpieces have been processed, and outputs the final packing scheme containing the specific placement position of each workpiece in the corresponding material box.
[0075] The aforementioned 3D packing optimization method, apparatus, computer equipment, computer-readable storage medium, and computer program products, by constructing a hierarchically dynamically managed virtual surface model, achieve a refined description of the placement areas and candidate placement points at different heights within the material box. This solves the technical challenges of traditional methods being unable to adapt to irregularly shaped workpieces and accurately describe the remaining space. By deeply integrating the business constraint parameters of downstream processes into the entire process of workpiece sorting, scheme generation, and verification, it ensures that the packing scheme is highly consistent with actual production needs, effectively avoiding secondary rework and safety risks caused by misalignment of flow directions and insufficient support. Through preset optimization objectives and multi-dimensional constraint verification mechanisms, combined with iterative optimization and scheme selection strategies, while satisfying physical stability and business rules, it significantly improves the utilization rate of the material box space and the overall optimization of the loading scheme. The final output is a packing scheme that can directly guide downstream sorting execution, achieving integrated collaborative optimization of 3D packing and production scheduling. Attached Figure Description
[0076] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0077] Figure 1 This is a flowchart illustrating a three-dimensional bin packing optimization method in one embodiment;
[0078] Figure 2 This is a flowchart illustrating the three-dimensional bin packing optimization method in another embodiment;
[0079] Figure 3This is a flowchart illustrating the three-dimensional bin packing optimization method in yet another embodiment;
[0080] Figure 4 This is a structural block diagram of a three-dimensional packing optimization device in one embodiment;
[0081] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0082] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0083] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0084] In one exemplary embodiment, such as Figure 1 As shown, a three-dimensional bin packing optimization method is provided, including the following steps S102 to S110. Wherein:
[0085] Step S102: Obtain workpiece parameters, material frame parameters, and business constraint parameters of related downstream processes, and construct a virtual surface model for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points of different height layers within the material frame.
[0086] Specifically, workpiece parameters not only include physical attributes such as length, width, height, and weight, but more importantly, they include flow information that identifies its production line exit, such as sorting point A or production line B. Frame parameters define the physical boundaries of the loading container, typically including its internal net dimensions and maximum safe load. Business constraint parameters related to downstream processes are logical conditions extracted from the Manufacturing Execution System (MES) that quantify rules on the production floor. Examples include a minimum support area ratio (e.g., not less than 60%) set to ensure workpieces remain stable during transport, or grouping rules requiring workpieces within the same frame to flow in the same direction for easier sorting.
[0087] The virtual surface in the virtual surface model is not a real physical surface, but an abstract data layer used for spatial calculations. For each material frame, the system first creates an initial virtual surface in its internal coordinate system that coincides with the bottom surface of the material frame. The height of this surface is set to zero, and its available area on the two-dimensional plane (i.e., the placement range) is initialized to be completely consistent with the inner wall boundary of the bottom surface of the material frame. At the same time, at least one candidate placement point is preset on this initial surface, usually a corner point of the inner wall of the material frame (such as the coordinate origin) is selected as the initial placement position.
[0088] Step S104: Sort the workpieces according to the business constraint parameters, and determine the candidate placement scheme for each workpiece in the virtual surface model of the available material frame based on the sorting results.
[0089] Specifically, workpieces with the same flow direction identifier are prioritized to ensure they can be grouped together to meet downstream sorting batch requirements; or, workpieces with urgent delivery dates are given higher priority to ensure they are loaded into the material frames to be transferred first. In addition, the physical characteristics of the workpieces are often incorporated into the sorting strategy, such as using volume descending order or weight descending order rules to prioritize the placement of large or heavy workpieces.
[0090] The algorithm iterates through all unfilled (available) material frames and further iterates through all active virtual surfaces (i.e., the most recently generated, not fully occupied surface) of each available material frame. For each traversed virtual surface, the algorithm reads its set of candidate placement points. For each candidate placement point, combined with the dimensions of the workpiece to be placed, the algorithm calculates the space occupied by the workpiece in the length, width, and height directions if that point is used as the placement reference for a specific corner of the workpiece (e.g., the lower left rear corner). This generates a candidate placement scheme, which explicitly includes the specific material frame, the specific virtual surface layer, the specific placement point coordinates, and the placement direction of the workpiece.
[0091] Step S106: Based on the preset optimization objective, select the optimal placement scheme from the candidate placement schemes and perform multi-dimensional constraint verification on the optimal placement scheme.
[0092] Specifically, the preset optimization objective is to sort by lexicographical priority. In detail, the algorithm calculates two core evaluation metrics for each candidate placement scheme: the first metric is the maximum vertical height of all items in the bin after implementing the scheme; the second metric is the total volume of remaining space in the bin after implementing the scheme. During the selection process, the system first compares the first metric of all schemes, selecting those that minimize the increase in the bin's final height, forming an optimal subset. If multiple schemes still exist in this subset, their second metric is further compared, selecting the scheme that maximizes the volume of remaining space in the bin. Through this two-level selection mechanism, the optimal placement scheme for the current situation is finally determined.
[0093] Next, multi-dimensional constraint verification needs to be performed on the selected optimal placement scheme. Multi-dimensional constraint verification can include physical constraints and business constraints.
[0094] Physical constraints include: boundary constraints, meaning that the entire volume of the workpiece must be strictly within the internal dimensions of the bin under the specified position and orientation; overlap constraints, meaning that geometric calculations confirm that the workpiece has no volume overlap with any other workpieces already placed in the bin; support constraints, which is a key physical verification, requiring the calculation of the effective contact area between the bottom of the workpiece and the supporting surface below, and confirming that this effective contact area reaches a preset proportion (e.g., more than 60%) of the workpiece's own bottom area to prevent the workpiece from tipping over or being damaged during transportation due to insufficient support; and weight constraints, meaning that after adding this workpiece, the total weight of all workpieces in the bin must not exceed the bin's rated maximum load capacity.
[0095] Business constraints include flow constraints, which require verifying whether the flow direction identifier of the workpiece is consistent with the flow direction identifiers of all workpieces already loaded in the target bin, so as to ensure that the goods in the same bin can go to the same sorting exit and avoid subsequent splitting.
[0096] Step S108: If the optimal placement scheme passes the verification, perform the workpiece placement operation and dynamically update the virtual surface model and constraint state of the relevant material frame.
[0097] Specifically, when a candidate placement scheme is selected as the optimal scheme, the parameters determined in the scheme (including the target material box, the specific virtual surface layer, the three-dimensional coordinates of the placement point, and the workpiece placement direction) are formed into a placement record. Since the placement operation immediately changes the spatial state of the material box, the relevant data model needs to be dynamically updated to reflect the latest reality. Dynamic updates mainly involve two aspects:
[0098] First, the virtual surface model of the relevant material box is updated. A completely new virtual surface is generated at the height determined by the highest point of the top contour of the workpiece. The two-dimensional usable area needs to be recalculated: the system vertically projects the outer contour of the already placed workpiece onto this new height plane. This projected area, together with the material box boundary, defines the actually usable area on the new surface that is not covered by the "shadow" of the workpiece below. At the same time, the set of candidate placement points on the new surface is also updated. For example, several top vertices of the already placed workpiece are vertically projected onto the new surface to form new, potentially better placement starting points.
[0099] Secondly, the constraint status of the relevant material boxes needs to be updated. For example, the total weight of the loaded material box needs to be added to the weight of the newly placed workpiece; the set of workpieces already placed in the material box needs to be marked with the identifier of the new workpiece; if the material box was previously empty, its business flow identifier will be initialized according to the flow direction of the first workpiece placed; the current loading status of the material box (such as "loading" or "full") may also be reassessed based on the remaining space and load-bearing capacity.
[0100] Step S110: Iteratively execute the steps of workpiece sorting, candidate scheme determination, scheme selection and verification, and placement update until all workpieces have been processed, and output the final packing scheme containing the specific placement position of each workpiece in the corresponding material box.
[0101] Specifically, the system takes the set of workpieces that have not yet been successfully placed as the processing object. Each time a workpiece is successfully placed, the system state (including the virtual surface model of each material frame, remaining space, weight load, flow direction identification, etc.) changes dynamically.
[0102] The system will select the next workpiece to be processed sequentially according to the initial sorting or the logic adjusted based on the dynamic state, and repeat the entire decision cycle. This loop will terminate in two situations: first, all workpieces have successfully found compliant placement positions and been recorded, which is the normal completion state; second, in the processing of a certain workpiece, after traversing all available material boxes and solutions, none of them can pass the constraint verification. At this time, the algorithm may trigger a backtracking mechanism (such as trying to adjust the position of the previous workpiece) or activate a new empty material box. If the problem still cannot be solved after strategy adjustment, it may end with partial loading or an abnormal state.
[0103] Once the iteration terminates and all workpieces have been processed, the system enters the output phase. The final packing plan is not a simple list of materials, but a structured, executable dataset. It details the unique frame number corresponding to each workpiece, along with its precise 3D coordinates and orientation within the frame's internal coordinate system. Furthermore, the plan typically includes summary information such as the total number of frames used, the space utilization rate of each frame, the total weight, and whether it meets all flow grouping requirements. This plan can be directly converted into equipment instructions to guide automated palletizers or sorting systems in physical loading, or presented in the user interface for production personnel to confirm and execute, thus completing the closed loop from virtual optimization to physical execution.
[0104] The aforementioned 3D packing optimization method, by constructing a layered, dynamically managed virtual surface model, achieves a refined description of the placement areas and candidate placement points at different heights within the material box, solving the technical challenges of traditional methods in adapting to irregularly shaped workpieces and accurately describing the remaining space. By deeply integrating downstream process business constraint parameters into the entire process of workpiece sorting, scheme generation, and verification, it ensures that the packing scheme highly matches actual production needs, effectively avoiding secondary rework and safety risks caused by misaligned flow or insufficient support. Through preset optimization objectives and multi-dimensional constraint verification mechanisms, combined with iterative optimization and scheme selection strategies, while satisfying physical stability and business rules, it significantly improves the utilization rate of the material box space and the overall optimization of the loading scheme. The final output is a packing scheme that can directly guide downstream sorting execution, achieving integrated collaborative optimization of 3D packing and production scheduling.
[0105] In one embodiment, such as Figure 2 As shown, a virtual surface model is constructed for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points at different heights within the material frame, including:
[0106] Step S202: Create an initial virtual surface for each material frame, set the height of the initial virtual surface to zero, and set the two-dimensional available area of the initial virtual surface to be consistent with the bottom boundary of the material frame.
[0107] Step S204: Add the preset coordinate point set of the internal space of the material frame as the initial candidate placement points of the initial virtual surface;
[0108] Step S206: After the workpiece is successfully placed, create a new virtual surface at the height of the top of the workpiece.
[0109] Step S208: Based on the three-dimensional contour of the placed workpiece, calculate the projection position points of each vertex at the bottom of the workpiece on the new virtual surface.
[0110] Step S210: Add the projected position point as a new candidate placement point to the candidate placement point set of the new virtual surface, and recalculate the effective placement area of the new virtual surface based on all candidate placement points and the material frame boundary.
[0111] Specifically, for each empty material frame participating in the calculation, an initial virtual surface is created in its internal three-dimensional coordinate system, with its height set to zero, representing the bottom reference plane of the material frame. Simultaneously, the two-dimensional usable area is initialized as a rectangle completely coinciding with the inner boundary of the bottom surface of the material frame (for cuboid material frames); then, at least one initial candidate placement point is preset on this initial virtual surface. Typically, a fixed coordinate point within the material frame's internal space that is easy to calculate is selected, such as the origin (0,0,0) located at a corner of the bottom surface.
[0112] After a workpiece is successfully placed, based on physical facts—that is, the top of the placed workpiece forms a new horizontal reference plane for subsequent workpiece placement—a new virtual surface is created at the height value determined by the highest point of the workpiece's top. The generation of this new surface marks the entry of space management into the next level.
[0113] After the new virtual surface is created, the 3D model data of the placed workpiece is acquired, the key vertices of its bottom contour are identified, and these vertices are projected vertically upwards (i.e., along the Z-axis) onto the newly created height plane. These projection points are the candidate placement points for the new surface. For example, after a cuboid workpiece is placed, the four corner points of its bottom are projected onto the top plane, generating four new candidate points. These points are likely to become ideal corner positions for placing the next smaller workpiece.
[0114] Finally, spatial logic operations are performed on the bin boundary and all candidate placement points (possibly combined with the projected outline of the already placed workpieces) to exclude areas that are "occupied" by the workpiece entities below and cannot be used to place new workpieces at the bottom, thereby calculating the set of truly usable, continuous or discontinuous planar regions at that height level.
[0115] In this embodiment, through initialization settings and dynamic projection updates, the system can automatically generate and optimize the effective placement area and candidate placement points on each height layer, which significantly improves the accuracy of spatial representation and the targeting of placement point selection. This solves the problems of low space utilization and difficulty in adapting to irregularly shaped parts caused by the coarse spatial modeling of traditional algorithms.
[0116] In one embodiment, multidimensional constraint verification includes supporting constraint verification; such as Figure 3 As shown, a multi-dimensional constraint check is performed on the optimal placement scheme, including:
[0117] Step S302: Based on the placement posture and position coordinates of the workpiece in the optimal placement scheme, determine the projected polygon formed by the bottom of the workpiece under the placement posture.
[0118] Step S304: Identify the supporting structure surface covered by the projected polygon within the material frame space. The supporting structure surface includes the bottom surface of the material frame and the upper surface of the workpiece already placed thereon.
[0119] Step S306: Calculate the effective contact area between the projected polygon and the surface of the supporting structure;
[0120] Step S308: Determine whether the ratio of the effective contact area to the total area of the projected polygon is not lower than the preset support area threshold, so as to perform support constraint verification.
[0121] Specifically, based on the workpiece's placement posture (such as the angle of rotation around each axis) and position coordinates (such as the precise positioning of a corner point), geometric transformations are used to calculate the projection of the workpiece's bottom contour onto the horizontal plane in this posture. This projection is typically a polygon, such as a rectangle (for cuboid workpieces) or a circle (for cylindrical workpieces). This projected polygon precisely describes the area where the bottom of the workpiece may come into contact with the supporting surface below.
[0122] Next, spatial relationships need to be determined within the 3D material frame space to identify which solid surfaces support the workpiece below. To do this, the system searches for the spatial cylinders swept downwards by the projected polygon in the vertical direction; the solid surfaces intersecting these cylinders are the supporting structural surfaces. These mainly include two types: first, the bottom surface of the material frame, which contacts the workpiece when it is placed at the bottom; and second, the upper surface of an existing workpiece, which becomes its supporting surface when the workpiece is placed on top of another workpiece. The system needs to accurately identify all these intersecting surface units.
[0123] After determining the supporting surface, the actual overlap area between the projected polygon and each identified supporting structure surface is calculated. This involves performing Boolean intersection operations between polygons (or closed planar figures) on a two-dimensional plane. For example, the projection of a rectangular workpiece might partially fall on the bottom surface of a frame and partially on the upper surface of an L-shaped workpiece below. The system will calculate the overlap area with these two supporting surfaces separately. Summing up the areas of all overlapping regions yields the effective contact area that ensures the workpiece does not fall.
[0124] Finally, a quantitative judgment based on a safety threshold is performed. The system calculates the ratio of the effective contact area to the total area of the projected polygon at the bottom of the workpiece. This ratio directly reflects the degree to which the bottom of the workpiece is adequately supported. The system compares this ratio with a preset support area threshold (e.g., 60%). Only when this ratio is greater than or equal to this threshold is the workpiece deemed adequately supported and capable of withstanding inertial forces or vibrations that may occur during transportation, thus passing the support constraint verification.
[0125] In this embodiment, by accurately extracting the bottom projected polygon from the geometric scheme and performing spatial intersection calculations with the existing solid surfaces within the material frame, the actual effective contact area between the workpiece and the supporting surface can be quantitatively calculated, rather than relying on estimations or empirical assumptions. By proportionally calculating this contact area to the bottom area of the workpiece and comparing it with a preset safety threshold, an objective and consistent safety assessment of the adequacy of the support is achieved, effectively avoiding the risk of the workpiece tilting, slipping, or collapsing during transport due to insufficient support.
[0126] In one embodiment, the multidimensional constraint verification includes business flow constraint verification; performing multidimensional constraint verification on the optimal placement scheme includes:
[0127] Obtain the flow direction identifier carried by the workpiece, which is associated with the downstream sorting exit or delivery path;
[0128] Get the current flow direction status of the material box;
[0129] If the current flow direction identifier indicates that the material box is empty, assign the flow direction identifier of the workpiece to the material box;
[0130] If the current flow direction indicator status indicates that the material box is not empty, verify whether the flow direction indicator of the workpiece is consistent with the flow direction indicator of the material box.
[0131] If the flow direction identifiers of the two are consistent, the business flow direction constraint verification for determining the optimal placement scheme passes.
[0132] Specifically, the process begins with obtaining the flow direction identification information of the workpiece. For example, in the production of automotive parts, the identification might point to "Section A of the final assembly line"; in warehouse sorting, it might point to "Outbound Gate 3". This identification is key business data that determines the final destination of the workpiece.
[0133] When the target frame is "empty" (i.e., no workpieces have been placed in it), the system performs an initialization operation: the flow direction identifier of the workpiece to be placed is directly assigned to the frame as its initial flow direction. When the target frame is "non-empty" (i.e., at least one workpiece has been placed in it), the consistency verification process begins. The system compares the flow direction identifier of the workpiece to be placed with the flow direction identifiers already held by the frame. The verification rule is strict matching: the workpiece is only allowed to be placed in the frame if the two identifiers are completely identical. For example, a workpiece with the identifier "Exit A" can only be placed in a frame with the same flow direction identifier "Exit A"; if an attempt is made to place it in a frame with the identifier "Exit B", the verification will fail immediately. This mechanism ensures that all workpieces within the same physical frame logically point to the same downstream exit or path.
[0134] In this embodiment, physical mixing of workpieces with different flow directions is avoided from the source, thereby completely eliminating the secondary handling, additional sorting operations and the resulting efficiency loss and error risk caused by the need to disassemble the same material frame in the subsequent sorting process. This allows the packing scheme to be directly connected to the automated sorting system after it is output, realizing direct logistics from the storage unit to the sorting destination.
[0135] In one embodiment, the multidimensional constraint verification includes geometric interference verification; performing multidimensional constraint verification on the optimal placement scheme includes:
[0136] Based on the placement position and three-dimensional dimensions of the workpiece in the optimal placement scheme, calculate the spatial envelope occupied by the workpiece in the material frame coordinate system;
[0137] Verify whether the maximum outer contour of the spatial envelope in each direction does not exceed the internal boundary of the material frame in the corresponding dimension, in order to determine whether the boundary constraints are satisfied.
[0138] Obtain the set of space envelopes occupied by all placed workpieces within the material frame;
[0139] Calculate whether the spatial envelope of the current workpiece intersects with the spatial envelope of each already placed workpiece in the set to determine whether the overlap constraint is satisfied.
[0140] Specifically, based on the workpiece placement position (such as the coordinates of a corner point) and its three-dimensional dimensions (length, width, and height) determined in the plan, combined with its placement orientation, the system calculates the spatial envelope occupied by the workpiece in the unified three-dimensional coordinate system of the material frame through simple geometric transformations. For cuboid workpieces, this envelope is an axially aligned cube; for irregularly shaped parts such as cylinders, its circumscribed cuboid is usually used as the envelope for conservative verification. This envelope defines the maximum range of the workpiece in space.
[0141] The first step in the verification process is boundary constraint checking. The system compares the calculated spatial envelope with the internal boundaries of the material box (i.e., the physical limits defined for the inner wall of the material box in the length, width, and height directions). The checking logic is as follows: it determines whether the maximum and minimum values of the envelope in the X-axis direction are within the length of the material box, whether they are within the width of the material box in the Y-axis direction, and whether they are within the height of the material box in the Z-axis direction. Only when the envelope is completely within the internal boundaries of the material box in all six directions (positive and negative X, Y, and Z) is the boundary constraint satisfied; otherwise, it means that part of the workpiece has "penetrated" out of the material box, and the solution is invalid.
[0142] The second step of the verification is a more complex overlap constraint check. The system needs to confirm that the new workpiece does not spatially interfere with any workpieces already placed in the frame. To do this, the system first obtains a set of spatial envelopes, which contains the spatial envelope data corresponding to each workpiece placed in the frame. Then, it performs pairwise geometric relationship calculations: the spatial envelope of the current workpiece is intersected with the spatial envelopes of every placed workpiece in the set. If the calculation finds a non-empty intersection with the envelope of any placed workpiece (i.e., the two cubes overlap in three-dimensional space), then an overlap has occurred, and the scheme violates the constraint. Only when the intersection results with all envelopes in the set are empty is the overlap constraint satisfied.
[0143] In this embodiment, boundary constraint verification ensures that each workpiece is strictly contained within the solid boundary of the material frame, avoiding the problem of overloading. Overlap constraint verification, through systematic pairwise envelope intersection calculations, ensures that the arrangement of all workpieces in three-dimensional space is mutually exclusive and interference-free, eliminating virtual collisions.
[0144] In one embodiment, the optimal placement scheme is selected from candidate placement schemes based on a preset optimization objective, including:
[0145] For each candidate placement scheme, calculate the first evaluation parameter and the second evaluation parameter respectively; the first evaluation parameter is the maximum value of all workpiece vertices in the height direction in the material frame after executing the candidate placement scheme; the second evaluation parameter is the remaining space volume obtained by subtracting the total volume of all placed workpieces from the internal volume of the material frame after executing the candidate placement scheme.
[0146] According to the lexicographical order optimization rule, the set of schemes that minimize the maximum height of the material frame is selected from all candidate placement schemes with the goal of minimizing the first evaluation parameter.
[0147] When the set of solutions contains multiple candidate placement solutions, the solution that maximizes the remaining space volume of the material frame is selected from the set of solutions with the goal of maximizing the second evaluation parameter, and is determined as the optimal placement solution.
[0148] Specifically, a quantitative evaluation system is first constructed for each candidate placement scheme. The first evaluation parameter is the maximum value of all workpiece vertices in the height direction within the material frame after implementing the scheme, which is essentially the current overall stacking height of the material frame caused by the scheme. The second evaluation parameter is the remaining space volume after the scheme is implemented, which intuitively reflects the degree to which the scheme preserves the remaining three-dimensional space within the material frame. These two parameters characterize the local impact of a placement scheme from two orthogonal dimensions: vertical development and three-dimensional margin.
[0149] Lexicographical optimization is a decision-making method with strict priority. First, all candidate solutions are sorted according to the first evaluation parameter (stack height), and those solutions that minimize the overall height of the material frame are selected unconditionally. All solutions that meet this condition are included in an optimal set.
[0150] After completing the first priority screening, if there are still multiple options in the preferred set, the decision moves to the second priority. At this point, the system further sorts these options based on a second evaluation parameter (remaining space volume) and selects the option that maximizes the remaining space volume as the final optimal placement solution. Through this two-level screening mechanism, the algorithm ensures that the stacking height is not worsened and that space margin is maximized when making placement decisions for individual workpieces.
[0151] In this embodiment, intelligent guidance is achieved through lexicographical order optimization rules. The primary objective is to minimize the stacking height, forcing each placement to prioritize the use of existing layer space, suppressing ineffective increases in height, ensuring stable loading, and reserving room for upward expansion. The secondary objective is to maximize the remaining space volume, selecting the solution that best maintains spatial integrity after satisfying the primary objective, and reserving flexibility for subsequent workpieces. The synergistic effect of these two objectives drives the packing process in a bottom-up, layer-by-layer compaction manner, improving overall space utilization and solution quality.
[0152] In one embodiment, the method further includes:
[0153] If none of the material frames at the candidate placement point can accommodate the next workpiece, select the target material frame from the multiple material frames currently located at the candidate placement point and remove it from the candidate placement point;
[0154] Select a new material frame from the available material frame resources and move it to the available position of the candidate placement point;
[0155] Initialize a virtual surface model for the new material frame and use it as the currently available material frame to redetermine candidate placement schemes.
[0156] Specifically, after traversing all currently available material frames (all located at candidate placement points, i.e., fixed loading stations) for the workpiece to be placed, the algorithm failed to find any feasible placement scheme that simultaneously satisfies all constraints. This indicates that the layout of the existing material frame combinations is no longer sufficient to accommodate the workpiece, constituting a partial blocking state.
[0157] To clear the blockage, the system initiates a replacement process. First, it selects one of several baskets currently occupying a fixed loading point (e.g., a pallet position positioned by an encoder) as the target for removal. This selection is not random but based on a predefined business strategy, such as "first-in, first-out" (selecting the basket with the highest utilization of loaded space) or "weight priority" (selecting the basket with the total weight closest to the upper limit). After selection, the system generates control commands to remove the target basket from the loading point, typically by conveyor belt or AGV to the next process (such as sealing, labeling, or direct warehousing). This frees up a physical space at the fixed workstation.
[0158] Subsequently, the system needs to immediately fill this empty space to maintain operational continuity. It selects a new frame from the pool of available frames based on another set of predefined strategies (such as "size fit priority" or "nearest available priority"). This new frame is then transported by the scheduling system to the vacated fixed loading point and precisely positioned.
[0159] Once the new material frame is in place, the system performs logical initialization: it creates an initial virtual surface model (with a height of 0, an available area equal to the bottom surface of the material frame, and containing initial candidate points). After initialization, the new material frame is officially added to the current set of available material frames, replacing the material frame that was removed.
[0160] In this embodiment, by removing the nearly full material frame and introducing a new material frame, the available physical resources on the fixed loading point are actively refreshed, enabling the algorithm to break through the local blocking state caused by the exhaustion of the current material frame combination space or constraint conflicts, and ensuring that the production process will not be interrupted when encountering difficult workpieces.
[0161] In one embodiment, the final packing solution is output before:
[0162] Establish a solution pool containing at least one feasible packing scheme, and select the currently best evaluated solution from the solution pool as the benchmark solution;
[0163] Perform a local search operation on the baseline solution to generate a new solution. The local search operation includes swapping the placement and orientation of two workpieces in the same bin, or moving at least one workpiece from the current bin to another bin with the capacity.
[0164] Perform multidimensional constraint verification on the new solution;
[0165] Calculate the global objective function value of the new solution. The global objective function value comprehensively represents the bin space utilization rate and the total number of bins used.
[0166] The global objective function value of the new solution is compared with the global objective function values of all solutions in the solution pool. If the new solution is better, the solution with the worst global objective function value in the solution pool is replaced by the new solution.
[0167] Repeatedly execute the iterative process of local search, constraint verification, function value calculation and solution pool update until the preset optimization termination condition is met, and output the solution with the best global objective function value in the solution pool as the final bin packing scheme.
[0168] Specifically, feasible packing solutions are stored in a set of solutions, which are used as a starting point to initiate a systematic improvement search. Local search operations include: swapping the position and orientation of two workpieces within the same bin, which may free up space or improve support by adjusting the layout without changing the number of bins occupied; or moving a workpiece from the current bin to another bin with capacity, which may help balance the load of each bin, free up space to accommodate more workpieces, and thus potentially reduce the total number of bins used.
[0169] The new solution generated by the perturbation must undergo rigorous multi-dimensional constraint verification to ensure it still satisfies all physical and operational rules, guaranteeing the effectiveness of the exploration. Subsequently, the global objective function value of the new solution is calculated. This function is the mathematical representation of the overall optimization objective pursued by the algorithm, typically designed to simultaneously penalize the number of bins used and reward space utilization. For example, a typical function is: total space utilization - α * number of bins used, where α is a trade-off coefficient. This function value provides a single quantitative standard for comparing the merits of different solutions.
[0170] The function value of the new solution is compared with all existing solutions in the solution pool. If the new solution is better, it replaces the worst solution in the pool, thus ensuring that the solution pool always retains the best set of solutions discovered so far. This process (selecting a baseline → local perturbation → verification → evaluation → updating the pool) is repeatedly executed iteratively until a preset termination condition is met, such as reaching the maximum number of iterations, time consumption, or no improvement for several consecutive rounds. Finally, the algorithm outputs the solution with the highest global objective function value from the iteratively optimized solution pool as the final bin packing scheme.
[0171] In this embodiment, through systematic local exploration and competitive selection, the solution is refined and reorganized in depth, thereby significantly improving the quality of the solution in global indicators (such as total number of boxes used and total space utilization) and achieving a higher level of optimization.
[0172] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0173] The most detailed embodiment of this application is as follows:
[0174] Taking the unloading and sorting production line in the steel processing industry as an example, the specific implementation steps are as follows:
[0175] (1) Initialization phase:
[0176] ① Input parameters: receiving frame parameters (length 2m, width 1.5m, height 1.8m, load capacity 500kg, maximum usable quantity 10), workpiece parameters (including cuboid steel plate parts and cylindrical steel pipe parts, weight 5-50kg, flow direction divided into "sorting exit 1 / 2"), constraint parameters (support area threshold 60%, flow direction grouping rule "workpieces from the same exit are in the same frame").
[0177] ② Model initialization: Create initial virtual surfaces (height 0, candidate points include the origin) for 10 empty material frames, and initialize the solution pool (capacity 16).
[0178] ③ Resource synchronization: Obtain the current idle time of the cutting machine and the location information of the sorting exit 1 / 2.
[0179] (2) Workpiece placement stage:
[0180] ① Workpiece sorting: Sort by “weight descending order + flow direction priority”, and prioritize the processing of 50kg rectangular steel plate parts (flowing to outlet 1).
[0181] ② Candidate Scheme Generation: Traverse the initial virtual surface of the first material frame to generate 3 candidate placement points (origin, center of the material frame, and upper right corner), and calculate the indicator function value (e.g., after placing at the origin, the maximum height is 0.5m, and the remaining space volume is 4.5m). 3 );
[0182] ③Optimal selection: Select the origin position with "minimum maximum height + maximum remaining space" and generate a placement record (material frame ID1, workpiece ID001, coordinates (0,0,0), flow direction outlet 1).
[0183] (3) Constraint checking and optimization:
[0184] ①Constraint verification: Check that the placement scheme meets the constraints of boundary (size ≤ material frame), support (supported by the bottom 4 vertices, area 100%), weight (50kg ≤ 500kg), and flow direction (material frame is empty, assign outlet 1).
[0185] ② Local optimization: Perform "workpiece swap" (swap the positions of two adjacent small-weight workpieces) on the initial solution in the solution pool, generate a new solution, check the constraints, confirm that the space utilization rate has improved by 5%, and update the solution pool;
[0186] ③ Termination of optimization: After 10 iterations, the space utilization of the solution stabilizes at 92%, and optimization is stopped.
[0187] (4) Solution output:
[0188] (5) Output the optimal packing scheme: 85 workpieces are placed in 10 material boxes. The workpieces flowing to outlet 1 are concentrated on the front side of the material box, and the workpieces flowing to outlet 2 are concentrated on the back side of the material box. The three-dimensional coordinates and material box number of each workpiece are output simultaneously and directly connected to the downstream sorting equipment.
[0189] Based on the same inventive concept, this application also provides a three-dimensional packing optimization apparatus for implementing the three-dimensional packing optimization method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the three-dimensional packing optimization apparatus provided below can be found in the limitations of the three-dimensional packing optimization method described above, and will not be repeated here.
[0190] In one exemplary embodiment, such as Figure 4 As shown, a three-dimensional packing optimization device is provided, comprising:
[0191] The acquisition module 402 is used to acquire workpiece parameters, material frame parameters and business constraint parameters of related downstream processes, and to build a virtual surface model for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points of different height layers in the material frame.
[0192] The candidate placement scheme determination module 404 is used to sort the workpieces according to the business constraint parameters, and determine the candidate placement scheme for each workpiece in the virtual surface model of the available material frame based on the sorting results.
[0193] The candidate placement scheme verification module 406 is used to select the optimal placement scheme from the candidate placement schemes based on the preset optimization objective, and to perform multi-dimensional constraint verification on the optimal placement scheme.
[0194] The update module 408 is used to perform workpiece placement operations when the optimal placement scheme passes the verification, and to dynamically update the virtual surface model and constraint state of the relevant material frame.
[0195] The packing scheme determination module 410 is used to iteratively execute the steps of workpiece sorting, candidate scheme determination, scheme selection and verification, and placement update until all workpieces have been processed, and outputs the final packing scheme containing the specific placement position of each workpiece in the corresponding material box.
[0196] In an exemplary embodiment, the acquisition module 402 is specifically configured to create an initial virtual surface for each material frame, set the height of the initial virtual surface to zero, and set the two-dimensional usable area of the initial virtual surface to be consistent with the bottom boundary of the material frame; add a preset set of coordinate points in the internal space of the material frame as initial candidate placement points of the initial virtual surface; after the workpiece is successfully placed, create a new virtual surface at the height of the top of the workpiece; calculate the projection position points of each vertex of the bottom of the workpiece on the new virtual surface according to the three-dimensional contour of the placed workpiece; add the projection position points as new candidate placement points to the candidate placement point set of the new virtual surface, and recalculate the effective placeable area of the new virtual surface based on all candidate placement points and the boundary of the material frame.
[0197] In an exemplary embodiment, the multidimensional constraint verification includes support constraint verification; the candidate placement scheme verification module 406 is specifically used to determine the projected polygon formed by the bottom of the workpiece in the placement posture based on the placement posture and position coordinates of the workpiece in the optimal placement scheme; identify the supporting structure surface covered by the projected polygon in the material frame space, the supporting structure surface including the bottom surface of the material frame and the upper surface of the placed workpiece; calculate the effective contact area between the projected polygon and the supporting structure surface; compare the effective contact area with the total area of the projected polygon; and determine whether the proportion of the effective contact area to the total area of the projected polygon is not lower than a preset support area threshold, so as to perform support constraint verification.
[0198] In an exemplary embodiment, the multidimensional constraint verification includes business flow constraint verification; the candidate placement scheme verification module 406 is specifically used to obtain the flow direction identifier carried by the workpiece, which is associated with the downstream sorting exit or delivery path; obtain the current flow direction identifier status of the material frame; when the current flow direction identifier status indicates that the material frame is empty, assign the flow direction identifier of the workpiece to the material frame; when the current flow direction identifier status indicates that the material frame is not empty, verify whether the flow direction identifier of the workpiece is consistent with the flow direction identifier of the material frame; when the flow direction identifiers of the two are consistent, determine that the business flow constraint verification of the optimal placement scheme passes.
[0199] In an exemplary embodiment, the multidimensional constraint verification includes geometric interference verification; the candidate placement scheme verification module 406 is specifically used to calculate the spatial envelope occupied by the workpiece in the material frame coordinate system based on the placement position and three-dimensional dimensions of the workpiece in the optimal placement scheme; verify whether the maximum outer contour of each direction of the spatial envelope does not exceed the internal boundary of the material frame in the corresponding dimension to determine whether the boundary constraint is satisfied; obtain the set of spatial envelopes occupied by all placed workpieces in the material frame; calculate whether there is an intersection between the spatial envelope of the current workpiece and the spatial envelope of each placed workpiece in the set to determine whether the overlap constraint is satisfied.
[0200] In an exemplary embodiment, the candidate placement scheme verification module 406 is specifically used to calculate a first evaluation parameter and a second evaluation parameter for each candidate placement scheme. The first evaluation parameter is the maximum value of all workpiece vertices in the height direction after executing the candidate placement scheme. The second evaluation parameter is the remaining space volume obtained by subtracting the total volume of all placed workpieces from the internal volume of the material frame after executing the candidate placement scheme. According to the lexicographical optimization rule, the scheme set that minimizes the maximum height of the material frame is selected from all candidate placement schemes with the goal of minimizing the first evaluation parameter. When the scheme set contains multiple candidate placement schemes, the scheme that maximizes the remaining space volume of the material frame is selected from the scheme set with the goal of maximizing the second evaluation parameter, and determined as the optimal placement scheme.
[0201] In an exemplary embodiment, the candidate placement scheme determination module 404 is further configured to, when all the material frames at the candidate placement point cannot accommodate the next workpiece, select a target material frame from the multiple material frames currently located at the candidate placement point and move it out of the candidate placement point; select a new material frame from the idle material frame resources and move it into the idle position of the candidate placement point; initialize a virtual surface model for the new material frame and use it as the currently available material frame to redetermine the candidate placement scheme.
[0202] In an exemplary embodiment, the packing scheme determination module 410 is specifically used to establish a solution pool containing at least one feasible packing scheme, select the currently best-evaluated solution from the solution pool as the benchmark solution; perform a local search operation on the benchmark solution to generate a new solution, the local search operation including swapping the placement position and orientation of two workpieces in the same bin, or moving at least one workpiece from the current bin to another bin with capacity; perform multi-dimensional constraint verification on the new solution; calculate the global objective function value of the new solution, the global objective function value comprehensively represents the bin space utilization rate and the total number of bins used; compare the global objective function value of the new solution with the global objective function values of all solutions in the solution pool, if the new solution is better, then replace the solution with the worst global objective function value in the solution pool with the new solution; repeat the iterative process of local search, constraint verification, function value calculation and solution pool update until the preset optimization termination condition is met, and output the solution with the best global objective function value in the solution pool as the final packing scheme.
[0203] Each module in the aforementioned three-dimensional packing optimization device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0204] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores workpiece parameters, material box parameters, and business constraint parameters related to downstream processes. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a three-dimensional bin packing optimization method.
[0205] Those skilled in the art will understand that Figure 5The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0206] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0207] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0208] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described above.
[0209] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0210] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0211] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0212] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A three-dimensional bin packing optimization method, characterized in that, The method includes: Obtain workpiece parameters, material frame parameters, and business constraint parameters of associated downstream processes, and construct a virtual surface model for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points of different height layers within the material frame. The workpieces are sorted according to the business constraint parameters, and candidate placement schemes are determined for each workpiece in the virtual surface model of the available material frame based on the sorting results. Based on the preset optimization objective, the optimal placement scheme is selected from the candidate placement schemes, and a multi-dimensional constraint verification is performed on the optimal placement scheme. If the optimal placement scheme passes the verification, the workpiece placement operation is performed, and the virtual surface model and constraint state of the relevant material frame are dynamically updated. The process iteratively executes the steps of workpiece sorting, candidate scheme determination, scheme selection and verification, and placement update until all workpieces have been processed, and outputs the final packing scheme containing the specific placement position of each workpiece in the corresponding material box.
2. The method according to claim 1, characterized in that, The process involves constructing a virtual surface model for each material frame. This virtual surface model is used to dynamically manage the placeable areas and candidate placement points at different heights within the material frame, including: Create an initial virtual surface for each material frame, set the height of the initial virtual surface to zero, and set the two-dimensional available area of the initial virtual surface to be consistent with the bottom boundary of the material frame; Add the preset set of coordinate points in the internal space of the material frame as the initial candidate placement points of the initial virtual surface; After the workpiece is successfully placed, a new virtual surface is created at the height of the top of the workpiece; Based on the three-dimensional contour of the placed workpiece, calculate the projection position points of each vertex at the bottom of the workpiece on the new virtual surface. The projected location point is added as a new candidate placement point to the candidate placement point set of the new virtual surface, and the effective placement area of the new virtual surface is recalculated based on all candidate placement points and the material frame boundary.
3. The method according to claim 1, characterized in that, The multidimensional constraint verification includes supporting constraint verification; the multidimensional constraint verification of the optimal placement scheme includes: Based on the placement posture and position coordinates of the workpiece in the optimal placement scheme, determine the projected polygon formed by the bottom of the workpiece under the placement posture; Identify the supporting structure surface covered by the projected polygon within the material frame space, the supporting structure surface including the bottom surface of the material frame and the upper surface of the placed workpiece; Calculate the effective contact area between the projected polygon and the surface of the supporting structure; Compare the effective contact area with the total area of the projected polygon; Determine whether the ratio of the effective contact area to the total area of the projected polygon is not lower than a preset support area threshold in order to perform support constraint verification.
4. The method according to claim 1, characterized in that, The multidimensional constraint verification includes business flow constraint verification; the multidimensional constraint verification of the optimal placement scheme includes: Obtain the flow direction identifier carried by the workpiece, which is associated with the downstream sorting exit or delivery path; Get the current flow direction status of the material box; If the current flow direction identifier indicates that the material frame is empty, assign the flow direction identifier of the workpiece to the material frame; If the current flow direction indicator status indicates that the material box is not empty, verify whether the flow direction indicator of the workpiece is consistent with the flow direction indicator of the material box; If the flow direction identifiers of the two are consistent, the business flow direction constraint verification of the optimal placement scheme is deemed to have passed.
5. The method according to claim 1, characterized in that, The multidimensional constraint verification includes geometric interference verification; the multidimensional constraint verification of the optimal placement scheme includes: Based on the placement position and three-dimensional dimensions of the workpiece in the optimal placement scheme, calculate the spatial envelope occupied by the workpiece in the material frame coordinate system; Verify whether the maximum outer contour of the spatial envelope in each direction does not exceed the internal boundary of the material frame in the corresponding dimension, in order to determine whether the boundary constraint is satisfied; Obtain the set of spatial envelopes occupied by all placed workpieces within the material frame; Calculate whether there is an intersection between the spatial envelope of the current workpiece and the spatial envelope of each already placed workpiece in the set, in order to determine whether the overlap constraint is satisfied.
6. The method according to claim 1, characterized in that, The step of selecting the optimal placement scheme from the candidate placement schemes based on a preset optimization objective includes: For each candidate placement scheme, calculate the first evaluation parameter and the second evaluation parameter respectively; the first evaluation parameter is the maximum value of all workpiece vertices in the height direction in the material frame after executing the candidate placement scheme; the second evaluation parameter is the remaining space volume obtained by subtracting the total volume of all placed workpieces from the internal volume of the material frame after executing the candidate placement scheme. According to the lexicographical order optimization rule, the set of schemes that minimize the maximum height of the material frame is selected from all candidate placement schemes with the goal of minimizing the first evaluation parameter. When the set of solutions contains multiple candidate placement solutions, the solution that maximizes the remaining space volume of the material frame is selected from the set of solutions with the goal of maximizing the second evaluation parameter, and determined as the optimal placement solution.
7. The method according to claim 1, characterized in that, The method further includes: If none of the material frames at the candidate placement point can accommodate the next workpiece, select the target material frame from the multiple material frames currently located at the candidate placement point and remove it from the candidate placement point; Select a new material frame from the available material frame resources and move it to the available position of the candidate placement point; Initialize a virtual surface model for the new material frame and use it as the currently available material frame to redetermine candidate placement schemes.
8. The method according to claim 1, characterized in that, The final packaging scheme for the output also includes: Establish a solution pool containing at least one feasible packing scheme, and select the currently best evaluated solution from the solution pool as the benchmark solution; A local search operation is performed on the baseline solution to generate a new solution. The local search operation includes swapping the placement and orientation of two workpieces in the same bin, or moving at least one workpiece from the current bin to another bin with the capacity to accommodate it. Perform the multidimensional constraint verification on the new solution; Calculate the global objective function value of the new solution, which comprehensively represents the bin space utilization rate and the total number of bins used; The global objective function value of the new solution is compared with the global objective function values of all solutions in the solution pool. If the new solution is better, the new solution replaces the solution with the worst global objective function value in the solution pool. Repeat the iterative process of local search, constraint verification, function value calculation and solution pool update until the preset optimization termination condition is met, and output the solution with the best global objective function value in the solution pool as the final bin packing scheme.
9. A three-dimensional packing optimization device, characterized in that, The device includes: The acquisition module is used to acquire workpiece parameters, material frame parameters and business constraint parameters of related downstream processes, and to build a virtual surface model for each material frame. The virtual surface model is used to dynamically manage the placeable areas and candidate placement points of different height layers within the material frame. The candidate placement scheme determination module is used to sort the workpieces according to the business constraint parameters, and determine the candidate placement scheme for each workpiece in the virtual surface model of the available material frame based on the sorting results. The candidate placement scheme verification module is used to select the optimal placement scheme from the candidate placement schemes based on a preset optimization objective, and to perform multi-dimensional constraint verification on the optimal placement scheme. The update module is used to perform workpiece placement operations when the optimal placement scheme passes the verification, and to dynamically update the virtual surface model and constraint state of the relevant material frame; The packing scheme determination module is used to iteratively execute the steps of workpiece sorting, candidate scheme determination, scheme selection and verification, and placement update until all workpieces have been processed, and outputs the final packing scheme containing the specific placement position of each workpiece in the corresponding material box.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.