A parts boxing optimization method and device, electronic equipment and storage medium
By optimizing component packing through grid simplification and staggered borrowing schemes, the problem of high-density loading of irregularly shaped components was solved, achieving an efficient and reliable packing strategy and improving space utilization and packing consistency.
Patent Information
- Application Number
- CN202611187137.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2046-08-06
AI Technical Summary
In discrete manufacturing, warehousing and logistics, and cross-regional transportation, existing technologies face challenges in achieving high-density, repeatable loading of irregularly shaped, diverse, and geometrically different parts within the constraints of a given container size. These challenges include large fluctuations in solution quality, long trial assembly cycles, and poor reusability.
The components are simplified by a grid simplification algorithm to generate an interleaved borrowing scheme. Combined with Monte Carlo random sampling and greedy construction methods, layout units and column units are constructed to generate candidate packing templates and optimize the packing strategy.
It achieves an efficient and repeatable parts packing solution, improves space utilization, reduces unit logistics costs, ensures operational consistency, and avoids parts damage and packaging failure.
Smart Images

Figure CN122693307B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of loading layout optimization technology, and more specifically, to a method, apparatus, electronic device, and storage medium for optimizing component packing. Background Technology
[0002] In scenarios such as discrete manufacturing, warehousing and logistics, and cross-regional transportation, how to achieve high-density, repeatable loading of irregularly shaped, diverse, and geometrically different parts under the given container size constraints is a key technical problem to improve space utilization, reduce unit logistics costs, and ensure operational consistency.
[0003] In related technologies, packing solutions in industrial settings often rely on manual experience or semi-automatic planning methods based on simple heuristic rules. While these methods offer some flexibility, they generally suffer from problems such as large fluctuations in solution quality, long trial assembly cycles, and poor reusability when faced with complex geometries and multiple constraints. Especially in large-scale production scenarios, where parts are diverse and batches vary, manual packing struggles to ensure consistency across different batches or factories, easily leading to parts damage, packaging failures, and rework risks, thus hindering the implementation of lean logistics.
[0004] Therefore, there is an urgent need for a packing method that can integrate real geometric features and take into account both high loading rate and engineering feasibility, so as to realize the transformation from experience-driven to algorithm-driven. Summary of the Invention
[0005] The problem addressed in this application is how to automatically generate component packing plans.
[0006] To address the aforementioned issues, this application provides a method, apparatus, electronic device, and storage medium for optimizing component packaging.
[0007] In a first aspect, this application provides a method for optimizing component packaging, including: The target component is simplified using a mesh simplification algorithm with the goal of minimizing the number of facets, and the simplified result is obtained. When the target component has a specified placement posture, based on the simplified result, a comprehensive score is determined according to the consistency of posture height and direction, and the target posture is determined according to the comprehensive score. Based on the target pose, an alternating borrowing scheme is generated by Monte Carlo random sampling and a greedy construction method. Based on the staggered borrowing scheme, a layout unit is constructed and a candidate binning template is generated. A binning strategy is obtained based on the candidate binning template. The layout unit includes row units and column units.
[0008] Optionally, the step of simplifying the target component using a mesh simplification algorithm with the goal of minimizing the number of facets, and obtaining the simplification result includes: Based on constraints of invariant external dimensions, consistent clearances, and invariant staggered borrowing, the digital model of the target component is simplified with the goal of minimizing the number of facets, resulting in a lightweight digital model, which is the simplification result.
[0009] Optionally, when the target component has a specified placement posture, based on the simplified result, a comprehensive score is determined according to the consistency of posture height and direction, and the determination of the target pose based on the comprehensive score includes: Based on the specified placement posture, determine the main axis direction and overall direction vector of the target component; The attitude height of the target component, as well as the minimum bounding box height and the maximum bounding box height relative to the spindle direction, are determined based on the spindle direction. Using the simplified result as the target object, the directional consistency is determined based on the overall direction vector and the unit vector of the principal axis direction; Based on the minimum bounding box height, the maximum bounding box height, and the attitude height, a penalty term is constructed that increases as the attitude height increases; The comprehensive score is determined based on the penalty item and the direction consistency, and the pose with the highest comprehensive score is taken as the target pose.
[0010] Optionally, the component packing optimization method further includes: When the target component does not have the specified placement posture, a set of candidate postures is generated with a preset index as the target, wherein the preset index includes at least one of loading density, anti-interference or stability. The target pose is determined from the set of candidate poses.
[0011] Optionally, when the target component does not have the specified placement posture, generating a candidate pose set based on a preset index includes: With minimum volume and / or minimum height as constraints and with the goal of increasing the loading density, a first set of alternative postures for the target component is generated; The reference axis of the target component is obtained by principal component direction and / or principal axis extraction method, and a second set of alternative postures is determined based on the reference axis, wherein the reference axis includes at least one of major axis, width axis and thickness axis; Using physical simulation methods, with stability as the objective, a third set of alternative attitudes for the target component is determined. At least one set from the first set of candidate poses, the second set of candidate poses, and the third set of candidate poses shall be used as the candidate pose set.
[0012] Optionally, generating an interleaved borrowing scheme based on the target pose using Monte Carlo random sampling and a greedy construction method includes: Given the target pose, the rotation angle and translation position of the target component are randomly sampled using Monte Carlo methods, and an initial candidate set is generated by combining the greedy construction method. Based on the initial candidate set, a branch-bound strategy is introduced to converge the borrowing combination space, estimate the theoretical performance upper bound of each partial solution, delete the branches whose theoretical performance upper bound is lower than the current optimal staggered borrowing scheme, and obtain the preferred set. Based on the preferred set, a neighborhood search is used to locally update the borrowing variable. When the performance index of the updated scheme is higher than the original theoretical performance upper bound, the original borrowing variable is replaced to obtain the updated staggered borrowing scheme. The update method includes perturbation and / or replacement.
[0013] Optionally, the candidate packing template includes a set of row generation layers, a set of column generation layers, and a set of row-column hybrid layers; The process of generating candidate packing templates based on the staggered borrowing scheme and obtaining packing strategies based on the candidate packing templates includes: The row generation layer set is constructed using the space occupancy limitations in the width and length directions of the box as constraints. The column generation layer set is constructed using the space occupancy limitations in the length and width directions of the box as constraints. The set of row and column hybrid layers is constructed based on the condition that the sub-regions formed after discretization within the box satisfy row and column arrangement constraints respectively. The binning strategy is selected from the set of row generation layers, the set of column generation layers, and the set of row-column hybrid layers.
[0014] Optionally, generating candidate packing templates based on the staggered borrowing scheme further includes: For components with placement constraints, the packing problem is classified into one or more of the following according to the constraint type: compartmentalized placement, planar placement, contour placement, or scattered placement. Under the corresponding constraint conditions, the pose generation, unit construction, or inter-layer stacking rules are adjusted to generate the candidate packing template.
[0015] Optionally, the component packing optimization method further includes: when the packing problem is the placement of the compartments, A global search strategy is adopted to enumerate the row and column division scheme of the compartment, the compartment size parameters, and the feasible posture combinations of the target component in the compartment, under the premise of satisfying the process constraints and the staggered borrowing scheme. When the target component is placed in a single compartment, the feasible posture combinations corresponding to the maximum number of target components loaded in the compartment are enumerated and used as the candidate packing template. When the target components are arranged in a multi-component-per-cell configuration, the staggered borrowing scheme is used to generate a multi-component placement scheme through local insertion and neighborhood expansion, with the loading revenue and the maximum number of loaded components as the objectives, to obtain the candidate packing template.
[0016] Optionally, the component packing optimization method further includes: when the packing problem is planar placement, decomposing the three-dimensional packing process into two-level optimization: intra-layer two-dimensional planning and inter-layer height direction structural planning; The two-level optimization of decomposing the three-dimensional bin packing process into intra-layer two-dimensional planning and inter-layer height direction structural planning includes: The intra-layer planning result of the intra-layer two-dimensional planning is generated based on the target pose and planar constraints. The planar constraints include at least one of the following: the height range of the target components in the same layer is consistent, vertical insertion or cross-layer borrowing is prohibited, and geometric transformation and lateral interleaving in the horizontal plane are allowed. Based on the constraints of the inter-layer structural height and the vertical height of the container, an overall capacity constraint is established. With the maximum single container loading quantity and / or the maximum space utilization rate as the objectives, the inter-layer planning result of the inter-layer height direction structural planning is determined based on the intra-layer planning result. The intra-layer planning results and the inter-layer planning results are used as the candidate packing templates.
[0017] Optionally, the component packing optimization method further includes: when the packing problem is contour placement, Based on the planar placement strategy, a feasibility constraint for picking and placing and a staggered borrowing constraint for interlayer molds are introduced. The feasibility constraint for picking and placing includes: the intersection of the projections of any two target parts on the horizontal plane in the same layer is an empty set. The staggered borrowing constraint for interlayer molds includes: there is no geometric interference between the relative poses of the target parts in the vertical direction of two adjacent layers.
[0018] Optionally, the component packing optimization method further includes: when the packing problem is loose placement, A rigid body dynamics simulation environment is constructed based on the simplified results. The rigid body dynamics simulation environment includes the gravity, contact collision, friction coefficient and elastic recovery parameters of the target component. The target components are released into the box one by one according to the random initial pose and random landing point. The stable stacking state is obtained by iterative solution through physical simulation, and the random simulation results are obtained. The random simulation results are statistically evaluated, and the candidate packing template is generated by selecting the scheme with the largest loading quantity or the best volume utilization rate and which satisfies stacking stability.
[0019] Secondly, this application provides a component packing optimization device, comprising: The simplification module is used to simplify the target parts with the minimum number of faces using a mesh simplification algorithm, and obtain the simplification result. The target pose determination module is used to determine a comprehensive score based on the simplified result and the consistency of posture height and direction when the target component has a specified placement posture, and to determine the target pose based on the comprehensive score. An interleaved borrowing generation module is used to generate an interleaved borrowing scheme based on the target pose using Monte Carlo random sampling and a greedy construction method. The bin packing strategy module is used to construct layout units and generate candidate bin packing templates based on the staggered borrowing scheme, and obtain a bin packing strategy based on the candidate bin packing templates, wherein the layout units include row units and column units.
[0020] Thirdly, this application provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the component packing optimization method as described in the first aspect when executing the computer program.
[0021] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the component packing optimization method as described in the first aspect.
[0022] The beneficial effects of the component packing optimization method in this application are: A mesh simplification algorithm is used to simplify the target components, yielding a simplified result. Mesh simplification reduces the geometric complexity of the 3D model and the amount of data required for geometric calculations, thereby improving the computational efficiency and stability of all subsequent steps related to geometric operations. When the target component has a specified placement posture, a comprehensive score is determined based on the simplification result, considering the consistency of posture height and direction, and the target pose is then determined. The comprehensive score transforms multidimensional constraints into a unified quantitative index; under the premise of satisfying process constraints, it outputs a target pose with strong adaptability that facilitates subsequent arrangement. Based on the target pose, staggered borrowing schemes are generated through Monte Carlo random sampling and a greedy construction method. Monte Carlo sampling covers nested combinations of complex and irregular parts; the greedy construction method optimizes high-yield local schemes, forming feasible compact arrangement configurations; the combination of these two methods avoids getting trapped in local optima while controlling computational overhead. Based on the target pose and / or staggered borrowing scheme, the constructed row and column units organize discrete parts into structured layout modules, realizing the layout construction from individual to group; the candidate packing templates form diverse layer structures through unit combination, which can cover different layout logics; the packing strategy realizes efficient utilization of the space inside the box through the optimized selection of templates; the complex three-dimensional packing problem is transformed into a computable and optimizable combinatorial problem, realizing the automatic generation of part packing schemes for target parts. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating the component packing optimization method according to an embodiment of this application; Figure 2 This is a flowchart illustrating the component packing optimization method according to an embodiment of this application. Figure 3 This is an example diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0024] To make the above-mentioned objects, features, and advantages of this application more apparent and understandable, specific embodiments of this application are described in detail below with reference to the accompanying drawings. Although some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the accompanying drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.
[0025] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.
[0026] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first," "second," etc., mentioned in this application are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0027] It should be noted that the terms "one" and "more" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0028] The names of messages or information exchanged between multiple devices in the embodiments of this application are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0029] like Figure 1 and Figure 2 As shown in the embodiment of this application, a component packing optimization method includes: Step S100: Using a mesh simplification algorithm, the target component is simplified with the goal of minimizing the number of facets to obtain the simplification result.
[0030] Mesh simplification algorithms represent methods for reducing the number of facets on the original 3D geometric model of components. Their purpose is to reduce the computational burden of geometric calculations involved in subsequent packing planning, such as collision detection and gap determination. While meeting specific geometric fidelity requirements, the algorithm aims to minimize the total number of triangular facets or mesh elements on the model surface.
[0031] For example, mesh simplification algorithms include edge collapse, vertex clustering, or quadric error metrics. In the application scenario of this invention embodiment, the algorithm takes the minimum number of faces as the optimization objective, that is, among all simplification results that satisfy the constraints, the model with the fewest faces is selected as the output.
[0032] The simplified result represents a new 3D model obtained after lightweighting, whose geometry is highly similar to the original model, but with a reduced data size. The simplified result significantly reduces the computational overhead in subsequent bin packing algorithms while effectively maintaining the realism of the geometric behavior of components in spatial arrangement. It can improve the solution efficiency of large-scale bin packing optimization problems, ensure the feasibility and reliability of high-density loading schemes, and is particularly suitable for automated bin packing scenarios containing a large number of complex and irregular components.
[0033] Step S200: When the target component has a specified placement posture, based on the simplified result, a comprehensive score is determined according to the consistency of posture height and direction, and the target pose is determined according to the comprehensive score.
[0034] The specified placement posture refers to the situation where business rules or process requirements restrict the orientation of components within the enclosure, including categories such as horizontal, sideways, and vertical placement. The specified placement posture stems from practical factors such as the structural strength of the components, protection requirements, or ease of loading and unloading.
[0035] The attitude height indicates the dimension of the component's outer casing in the vertical direction (Z-axis) of the housing under a candidate placement orientation. It reflects the extent to which this orientation occupies the housing's layer height; the smaller the value, the more beneficial it is for multi-layer stacking, improving the efficiency of vertical space utilization.
[0036] Orientation consistency measures the degree of alignment between the overall principal orientation of a component and the specified axis (X-axis or Y-axis) of the box coordinate system in a given orientation. For example, the dominant axis obtained through principal component analysis can be used as the overall principal orientation. It reflects whether the placement of parts conforms to the overall regularity requirements of the box layout. The higher the alignment, the better it is for row and column arrangement and subsequent box template generation.
[0037] The overall score is a quantitative evaluation index constructed by combining posture height and orientation consistency. It is used to uniformly rank the postures corresponding to multiple candidate bottom surfaces under the same specified posture category. The target pose represents the better candidate posture under the constraints of a specified placement posture. Determining the target pose in the above way can avoid subjective experience judgment, making the posture selection have a quantifiable and reproducible basis; it also takes into account loading density and layout regularity.
[0038] Step S300: Based on the target pose, generate an interleaved borrowing scheme using Monte Carlo random sampling and a greedy construction method.
[0039] The target pose represents the spatial orientation of a target component that meets the specified placement requirements, including the rotation and positioning information of the target component in the box coordinate system. Interleaved borrowing refers to an arrangement method where multiple components avoid each other by nesting, staggering insertion, or utilizing local concave-convex structures, thereby reducing the overall volume occupied and improving the utilization rate of the internal space.
[0040] Monte Carlo random sampling is a probabilistic exploration method that generates diverse combinations of relative poses by randomly sampling a large number of translational positions and rotational angles of components within feasible limits. This method helps cover complex non-convex solution spaces and avoids getting trapped in local optima.
[0041] The greedy construction method selects the local operation that maximizes current benefit at each step, such as prioritizing filling the largest gap, choosing the embedding method with the largest support area or the best symmetry, to quickly construct a preliminary feasible borrowing layout. Under limited computational resources, it can generate initial schemes with high space utilization potential.
[0042] The staggered borrowing scheme is a set of relative arrangement configurations of components generated by the two strategies mentioned above, in which the components do not overlap and meet basic constraints such as clearance, protection and structural feasibility.
[0043] A combination of Monte Carlo random sampling and greedy construction is used to generate staggered borrowing schemes. Randomness ensures broad coverage of the space, while the greedy strategy focuses on high-value areas, effectively balancing the number of schemes and construction efficiency. The obtained schemes can fully explore the nesting potential between target components, improving the final loading rate and space utilization efficiency.
[0044] Step S400: Based on the staggered borrowing scheme, construct layout units and generate candidate binning templates, and obtain binning strategies based on the candidate binning templates, wherein the layout units include row units and column units.
[0045] Layout units represent the basic building blocks for organizing multiple components into a regular arrangement, including row units and column units. A row unit represents a group of components arranged along the length direction (X-axis) of the box, with uniform layer height, overall width, and load quantity; a column unit represents a group of components arranged along the width direction (Y-axis) of the box, with uniform layer height, overall length, and load quantity. These units transform the complex 3D layout problem into composable and reusable structured modules, facilitating subsequent optimization.
[0046] A candidate packing template is a single-layer or multi-layer layout scheme composed of one or more layout units combined in a specific way. For example, it can be a row-generated layer formed by horizontally splicing several row units, a column-generated layer formed by vertically splicing column units, or a row-column hybrid layer composed of mixed row and column partitions. Each template corresponds to a feasible space filling scheme and includes parameters such as its occupied size, number of loads, and layer height.
[0047] Packing strategy refers to the final stacking scheme determined by optimizing the selection of all candidate packing templates based on objectives such as box size, clearance allowance, and maximizing loading quantity. This includes the number of layers used for each template and the arrangement order of target components within the box.
[0048] Transforming the complex 3D packing problem into an optimization problem with a clear structure and well-defined parameters can reduce the solution complexity; row and column elements take into account the adaptability to different part arrangement directions, and can generate high-density and highly regular packing schemes.
[0049] In this embodiment, a mesh simplification algorithm is used to simplify the target components, obtaining a simplified result. Mesh simplification reduces the geometric complexity of the 3D model and the amount of data required for geometric calculations, thereby improving the computational efficiency and stability of all subsequent steps related to geometric operations. When the target component has a specified placement posture, a comprehensive score is determined based on the simplification result, according to the consistency of posture height and direction, and the target pose is determined. The comprehensive score transforms multidimensional constraints into a unified quantitative index; under the premise of satisfying process constraints, it outputs a target pose with strong adaptability and conducive to subsequent arrangement. Based on the target pose, an interleaved borrowing scheme is generated through Monte Carlo random sampling and a greedy construction method. Monte Carlo sampling covers the nested combinations of complex and irregular parts; the greedy construction method is used to optimize high-yield local schemes, forming a feasible compact arrangement configuration; the combination of the two methods avoids getting trapped in local optima and controls computational overhead. Based on the target pose and / or staggered borrowing scheme, the constructed row and column units organize discrete parts into structured layout modules, realizing the layout construction from individual to group; the candidate packing templates form diverse layer structures through unit combination, which can cover different layout logics; the packing strategy realizes efficient utilization of the space inside the box through the optimized selection of templates; the complex three-dimensional packing problem is transformed into a computable and optimizable combinatorial problem, realizing the automatic generation of part packing schemes from target parts.
[0050] Optionally, the step of simplifying the target component using a mesh simplification algorithm with the goal of minimizing the number of facets, and obtaining the simplification result includes: Based on constraints of invariant external dimensions, consistent clearances, and invariant staggered borrowing, the digital model of the target component is simplified with the goal of minimizing the number of facets, resulting in a lightweight digital model, which is the simplification result.
[0051] The digital model of the target component represents its original three-dimensional geometric model, expressed as a triangular mesh. To reduce the computational burden in subsequent packing planning, this digital model is simplified, and the resulting lightweight digital model is used as the simplification result.
[0052] The mesh simplification algorithm prioritizes minimizing the number of facets in the optimization objective, selecting the model with the fewest triangular facets among all simplification schemes that satisfy the constraints. Three constraints are used to simplify the numerical model of the target component: 1) Invariant external dimensions constraint: the length, width, and height of the component's outer box remain essentially consistent before and after simplification to maintain an assessment of overall space occupancy; 2) Gap consistency constraint: under relative pose, the minimum distance determination result between the simplified model and other components matches the original model to avoid geometric distortion; 3) Interlacing borrowing invariant constraint: the concave and convex structures on the component used to ensure local avoidance retain their original topological relationships after simplification.
[0053] Under the above three constraints, with the goal of minimizing the number of facets, the resulting lightweight digital model can reduce the data size while effectively preserving the core geometric characteristics that affect the feasibility of packing.
[0054] In one embodiment, the invariant external dimension constraint is used to ensure that the length, width, and height of the part remain approximately unchanged before and after simplification, denoted as the bounding box dimension. , is represented as: , in, This indicates the simplified dimensions of the target component's outer enclosure. Indicates the outer casing dimensions of the original component. The infinite norm is used to represent the maximum absolute value of each component in a vector. This indicates the allowable dimensional deviation threshold, which is set by the user.
[0055] In one embodiment, the simplified determination of the minimum distance between parts is basically consistent with the original digital model, ensuring that the gap constraints (safety distance and protection reserve) are not violated in subsequent planning. The gap consistency constraint can be expressed as a typical relative pose set. Down: , in, This represents the minimum distance between the original model and other parts in a relative pose p. This represents the minimum distance of the simplified model under the same relative pose. It represents a set of typical relative poses, representing the contact or proximity states that may occur during actual packing; This indicates the allowable gap error threshold, which is set by the user.
[0056] Optionally, when the target component has a specified placement posture, based on the simplified result, a comprehensive score is determined according to the consistency of posture height and direction, and the determination of the target pose based on the comprehensive score includes: Based on the specified placement posture, determine the main axis direction and overall direction vector of the target component; The attitude height of the target component, as well as the minimum bounding box height and the maximum bounding box height relative to the spindle direction, are determined based on the spindle direction. Using the simplified result as the target object, the directional consistency is determined based on the overall direction vector and the unit vector of the principal axis direction; Based on the minimum bounding box height, the maximum bounding box height, and the attitude height, a penalty term is constructed that increases as the attitude height increases; The comprehensive score is determined based on the penalty item and the direction consistency, and the pose with the highest comprehensive score is taken as the target pose.
[0057] When the target component has a specified placement posture (such as flat, side or vertical), the optimal one should be selected from multiple feasible support postures as the target posture.
[0058] The principal axis direction represents the coordinate axis direction of the box corresponding to the specified placement posture. For example, when placed flat, the principal axis direction is the vertical direction (Z-axis), and when placed on its side, it may be the Y-axis or X-axis. The overall orientation vector is the dominant orientation of the target component in the current candidate posture, and is usually obtained by principal component analysis of the model or geometric symmetry extraction.
[0059] Attitude height represents the bounding box size of the component along the spindle direction in the candidate attitude, reflecting its space occupation in that direction. Minimum bounding box height and maximum bounding box height represent the lower and upper limits of attitude height among all candidate bottom surfaces that satisfy the specified placement attitude, respectively, and are used for normalization processing.
[0060] Orientation consistency is determined by the dot product of the overall orientation vector and the unit vector of the principal axis direction. The value range is between 0 and 1. The larger the value, the closer the main orientation of the part is to the specified alignment direction, and the better the layout regularity.
[0061] The penalty term represents a function that increases with the pose height. It is normalized by combining the minimum and maximum bounding box heights, so that poses with lower heights receive higher rewards, which is beneficial for stacking arrangements.
[0062] The overall score is a weighted fusion of directional consistency and penalty terms, with a small constant term introduced to maintain numerical stability. The candidate pose with the highest overall score is determined as the target pose.
[0063] In one embodiment, the set of candidate bottom surfaces is set as follows: For each candidate bottom surface Rotate the part so that the bottom surface becomes the supporting surface to obtain the orientation. The corresponding evaluation indicators include: Attitude : The height of the bounding box of the part in this orientation (along) (axis), the smaller the axis, the more conducive it is to stacking; Consistency of direction The overall principal direction / overall normal vector of the part and The degree of alignment. Let the overall direction vector be... Then, directional consistency is represented as: , in, This represents the overall principal direction vector or overall normal vector of the component under the candidate posture f. Represents the unit vector in the vertical direction (Z-axis) of the box coordinate system. This represents a unit vector along the positive Z-axis in three-dimensional space, and T represents the transpose.
[0064] The composite score function used to calculate the overall score is expressed as follows: , in, This represents the overall score of the candidate base surface. These represent parameters used to weigh the importance of altitude and orientation, respectively. Represents the numerically stable term. Indicates attitude height, and These represent the minimum and maximum bounding box heights among all candidate poses, respectively.
[0065] The final selection of the maximum score is represented as: ,by As a target posture.
[0066] Optionally, the component packing optimization method further includes: When the target component does not have the specified placement posture, a set of candidate postures is generated with a preset index as the target, wherein the preset index includes at least one of loading density, anti-interference or stability. The target pose is determined from the set of candidate poses.
[0067] When the target components are not required to adopt a specific placement posture, the spatial orientation is generated autonomously by the algorithm. Preset indicators include at least one of loading density, anti-interference capability, or stability. Loading density refers to the number of components or the proportion of their volume that can be accommodated per unit box volume; high loading density helps improve transportation or storage efficiency. Anti-interference capability reflects the component's resistance to external disturbances during transportation or stacking, and is related to the support area and center of gravity height. Stability indicates whether the component has good contact support and anti-tipping capability under a given orientation.
[0068] The candidate pose set is generated based on a simplified lightweight digital model. The principal axis direction of the part is extracted through principal component analysis, and a basic pose aligned with the coordinate axis of the box is constructed. A small rotational perturbation is introduced to expand the diversity. At the same time, feasible poses that meet the conditions of non-overlap and reliable support are selected by combining physical constraints.
[0069] The target pose is selected from this candidate set, based on the comprehensive performance of each pose on preset indicators. For example, when load density is the primary objective, a pose with a smaller bounding box volume or height is preferred; when stability is emphasized, a configuration with a large support surface and a low center of gravity is preferred.
[0070] Optionally, when the target component does not have the specified placement posture, generating a candidate pose set based on a preset index includes: With minimum volume and / or minimum height as constraints and with the goal of increasing the loading density, a first set of alternative postures for the target component is generated; The reference axis of the target component is obtained by principal component direction and / or principal axis extraction method, and a second set of alternative postures is determined based on the reference axis, wherein the reference axis includes at least one of major axis, width axis and thickness axis; Using physical simulation methods, with stability as the objective, a third set of alternative attitudes for the target component is determined. At least one set from the first set of candidate poses, the second set of candidate poses, and the third set of candidate poses shall be used as the candidate pose set.
[0071] The first set of candidate postures is generated to improve loading density by minimizing the bounding box volume or height. Specifically, based on the lightweight digital model, the parts are rotated at multiple angles, and the outer bounding box dimensions under each posture are calculated. Postures with smaller volumes or lower heights along the vertical direction of the box are selected. This helps to increase the number of parts accommodated per unit box space and enhances the compactness of stacking and arrangement.
[0072] The second set of candidate poses is constructed based on the geometric principal axis features of the part itself. Through principal component analysis (PCA) or principal axis extraction methods, at least one of the major axis, width axis, and thickness axis of the target part is identified as a reference axis. The reference axes are aligned to the X, Y, and Z axes of the box coordinate system, forming several basic poses. Small perturbations (such as ±5° or ±10° rotation) are introduced on this basis to expand the set of poses with local diversity. This ensures that the candidate poses conform to the natural extension direction of the part, improving the regularity of the arrangement and the efficiency of subsequent template matching.
[0073] The third set of candidate postures was obtained through physical simulation. Based on the simplified results, a rigid body contact model was established to evaluate the support area, center of gravity projection position, overturning moment, and contact stability of each candidate posture. Postures that meet the preset stability threshold are retained, such as those with a sufficiently large support surface, a center of gravity located within the support polygon, and adequate anti-overturning capability. Geometrically compact but practically prone to tipping or unreliable placement arrangements are avoided.
[0074] At least one of the first, second, and third candidate pose sets mentioned above is used as the complete candidate pose set. This set includes both high-density guided poses and orientation-normalized and physically stable poses. The number of candidate poses is maintained within an acceptable range after reasonable pruning, facilitating global evaluation and optimal selection by the subsequent bin packing optimization module.
[0075] Without specifying the placement posture, high-quality candidate postures are generated through multi-dimensional and multi-mechanism collaboration, which improves the adaptability of the automatic packing algorithm to complex and irregular parts, while ensuring the comprehensive performance of the output solution in terms of both space utilization and engineering feasibility.
[0076] Optionally, generating an interleaved borrowing scheme based on the target pose using Monte Carlo random sampling and a greedy construction method includes: Given the target pose, the rotation angle and translation position of the target component are randomly sampled using Monte Carlo methods, and an initial candidate set is generated by combining the greedy construction method. Based on the initial candidate set, a branch-bound strategy is introduced to converge the borrowing combination space, estimate the theoretical performance upper bound of each partial solution, delete the branches whose theoretical performance upper bound is lower than the current optimal staggered borrowing scheme, and obtain the preferred set. Based on the preferred set, a neighborhood search is used to locally update the borrowing variable. When the performance index of the updated scheme is higher than the original theoretical performance upper bound, the original borrowing variable is replaced to obtain the updated staggered borrowing scheme. The update method includes perturbation and / or replacement.
[0077] Given the target pose, Monte Carlo random sampling is performed on the rotation angles and translational positions of the target components. Monte Carlo random sampling is conducted while satisfying basic geometric constraints, such as no overlap and compliant gaps, covering a high-dimensional continuous pose domain to capture potential nesting possibilities. Simultaneously, a greedy construction method is used, based on local benefit criteria, such as prioritizing relative poses that can fill the current largest gap, have higher symmetry, or larger contact area, to actively construct a batch of high-quality initial solutions. Together, these form an initial candidate set, used to focus on sub-regions with high spatial utilization potential at a lower computational cost.
[0078] Based on the initial candidate set, a branch-and-bound strategy is introduced to converge the borrowing combination space. The borrowing actions and relative pose selections of each component are considered as branch variables, and partial solutions are expanded layer by layer in the combination search tree. For each partial solution, the theoretically achievable optimal performance value is calculated using upper bound estimation methods, such as based on the remaining available space volume or the minimum enclosing volume of unarranged parts. If the upper bound of a branch is lower than the performance index of the currently known optimal staggered borrowing scheme, the branch is determined not to produce a better solution and is pruned. This effectively eliminates a large number of low-potential combinations, compresses the search scale, and improves solution efficiency and result stability.
[0079] Based on the optimized set obtained after pruning, a neighborhood search is used to locally update the borrowed variables. The borrowed variables include parameters such as the translation vector, rotation angle, or relative embedding depth of each part. Local updates are achieved through small perturbations (e.g., fine-tuning the rotation angle ±2°, translation offset ±1mm) or by replacing the embedding position of a part with its nearest feasible position, thus performing structural replacement. After each update, the feasibility and space utilization benefits of the new scheme are quickly evaluated; if the updated scheme outperforms the original scheme, the change is accepted and iteration continues.
[0080] Monte Carlo and greedy construction methods ensure broad exploration, branch and bound methods achieve efficient convergence, and neighborhood search completes fine-tuning. Each stage performs geometric calculations based on a lightweight numerical model, balancing computational efficiency and structural fidelity. The final staggered borrowing scheme not only boasts a high loading rate but also retains engineering feasibility. It can be embedded as a structured unit in the overall binning strategy or refined into a reusable borrowing pattern for rapid planning of similar parts.
[0081] Optionally, such as Figure 2 As shown, the candidate packing template includes a row generation layer set, a column generation layer set, and a row-column hybrid layer set; The process of generating candidate packing templates based on the staggered borrowing scheme and obtaining packing strategies based on the candidate packing templates includes: The row generation layer set is constructed using the space occupancy limitations in the width and length directions of the box as constraints. The column generation layer set is constructed using the space occupancy limitations in the length and width directions of the box as constraints. The set of row and column hybrid layers is constructed based on the condition that the sub-regions formed after discretization within the box satisfy row and column arrangement constraints respectively. The binning strategy is selected from the set of row generation layers, the set of column generation layers, and the set of row-column hybrid layers.
[0082] The candidate packing templates include a set of structured schemes for the arrangement of single-layer components inside the box, specifically including three categories: row generation layer set, column generation layer set, and row-column hybrid layer set.
[0083] The row generation layer set is composed of multiple row units arranged along the length direction (X-axis) of the box. Each row unit corresponds to a group of components placed side by side in the same orientation, with a uniform layer height, total occupied size along the width direction (Y-axis), and number of loaded components. When constructing this set, the space occupancy limitations of the box in the width and length directions are used as constraints, that is, the cumulative width of all row units in the Y-direction does not exceed the usable width inside the box, and the length of a single row unit in the X-direction does not exceed the usable length inside the box. All feasible combinations that satisfy these constraints constitute the row generation layer set.
[0084] In one embodiment, row generation layer set The generation scheme is represented as: , Floor height and loading capacity are expressed as: , in, Let l represent the set of row generation layers, where l represents any row layer, which can be represented by an integer vector. To indicate, This indicates the number of times the r-th row cell is used in the current layer l. This indicates the configuration of the number of row cells of each type used in this layer. This indicates the size occupied by the r-th row cell in the width direction (Y-axis); W represents the available width inside the box. This indicates the length of each row cell (in the X-axis direction). This represents the overall height of the layer, taken as the maximum height value among all used row cells. This represents the height (Z-axis direction) of the r-th row cell. This represents the total number of items loaded in this layer, which is the sum of the products of the number of times each row of units is used and its number of units. This represents the number of items loaded in the r-th row cell.
[0085] The column generation layer set is composed of multiple column units arranged along the width direction (Y-axis) of the box. Each column unit corresponds to a set of components arranged along the Y-axis, with a uniform layer height, total occupied dimensions along the length direction (X-axis), and number of loaded components. Its construction is also subject to space constraints, namely, the cumulative length of the column units in the X-direction does not exceed the available length within the box, and the width of a single column unit in the Y-direction does not exceed the available width within the box, while also considering necessary spacing requirements. All column combinations that meet these conditions form the column generation layer set.
[0086] In one embodiment, a column generation layer set The generation scheme is represented as: any row level Can be derived from integer vectors To represent, satisfying: , in, Let C represent the set of column generation layers, and let C represent the set of indices for all available column cells. This indicates the number of times the c-th column cell is used in the current layer l. This indicates the configuration of the number of column cells of each type used in this layer. This indicates the size occupied by the c-th column cell in the width direction (Y-axis).
[0087] The floor height and loading capacity are as follows: , in, This represents the overall height of the layer, taken as the maximum height value among all used column cells. This represents the height of the c-th column cell (Z-axis direction). This represents the total number of items loaded in this layer, which is the sum of the products of the number of times each column unit is used and its number of items. This indicates the number of items loaded in the c-th column cell.
[0088] The row-column hybrid layer set is achieved by discretizing the bottom surface of the box. Specifically, several candidate segmentation positions are selected within the length-width plane to divide the single-layer region into two or more sub-regions; each sub-region is filled using either a row arrangement or a column arrangement strategy. For example, after horizontal segmentation, the upper sub-region uses row units, and the lower sub-region uses column units. The condition for constructing this set is that the dimensions of each sub-region must satisfy the spatial constraints of either row or column arrangement, and the entire set must not exceed the bottom surface of the box.
[0089] In one embodiment, a set of row and column blending layers The generation scheme is represented as: To explore more precise and efficient component arrangement methods, this invention employs a partitioned mixing approach to generate a hybrid layer. Discretization of the internal data (e.g., a set of several candidate splitting positions) For each segment Two sub-regions are formed and filled using row and column strategies respectively.
[0090] Taking horizontal segmentation as an example: sub-regions size Arranged in rows; sub-regions size They are arranged using column units. And the hybrid layer... satisfy: , in, This represents a set of mixed row and column layers, where L and W represent the available length and width inside the box, respectively. Let represent the set of candidate splitting locations, and s represent the specific splitting point. This represents the width of subregion A at the dividing point s. This indicates the size occupied by the row cell r in the width direction (Y-axis). This indicates the size occupied by column cell c in the width direction (Y-axis). This indicates the number of times the r-th row cell is used in the current layer l. This indicates the number of times the c-th column cell is used in the current layer l. This indicates the size occupied by the row unit r in the length direction (X-axis). This indicates the size occupied by column cell c in the length direction (X-axis).
[0091] And defined accordingly:
[0092] Based on the above description, the set of all candidate layers at this point is: Next, we need to perform mixed-integer optimization selection from the layer set to determine the optimal stacking method within the bins. The decision variables are:
[0093] in, Representing candidate layer The number of layers used in the enclosure.
[0094] From the complete template set composed of the above three types of candidate packing templates, based on the objectives of maximizing the loading quantity or the highest space utilization, and combined with global constraints such as the total height limit of the container and the interlayer spacing requirements, the optimal template combination and its stacking layer number are selected through optimization methods to form the final packing strategy.
[0095] This implementation breaks down the complex three-dimensional packing problem into two levels: in-layer structured layout and inter-layer stacking planning. It utilizes row, column, and hybrid templates to cover diverse layout logics, thereby improving space utilization efficiency while ensuring project feasibility.
[0096] Therefore, maximizing the number of loads is equivalent to the following optimization objective: , in, This indicates the number of candidate layers l loaded. Let l represent the decision variable, and let l represent the number of candidate layers used within the box.
[0097] The constraints are: , , in, This represents the height of candidate layer l. This indicates the number of layers that are being used, and H represents the usable internal height of the enclosure after deducting the top reserved space. This indicates the minimum minimum quantity required by the business requirements. This indicates the maximum load limit required by the business. This indicates the actual total number of items loaded.
[0098] Optionally, generating candidate packing templates based on the staggered borrowing scheme further includes: For components with placement constraints, the packing problem is classified into one or more of the following according to the constraint type: compartmentalized placement, planar placement, contour placement, or scattered placement. Under the corresponding constraint conditions, the pose generation, unit construction, or inter-layer stacking rules are adjusted to generate the candidate packing template.
[0099] In actual packing operations, some components need to follow specific placement constraints due to process requirements, protection needs, or ease of operation. To address this, this invention categorizes packing problems into several types based on constraint characteristics, including compartmentalized placement, planar placement, contour-following placement, and scattered placement. Under various constraint conditions, it makes targeted adjustments to pose generation, unit construction, and inter-layer stacking rules, thereby generating candidate packing templates that meet actual engineering needs.
[0100] Compartment placement is suitable for scenarios where components need to be placed in independent compartments formed by partitions, including both single-component and multi-component compartments. Under such constraints, the orientation of components is limited to the feasible space within the compartment; the unit structure must ensure that the overall outline of the part does not exceed the compartment boundary; and interlayer stacking must consider the thickness of the partitions and their alignment with the compartments to ensure structural integrity and assembly feasibility.
[0101] The planar layout requires that components within the same layer not overlap vertically, and partitions must be inserted between adjacent layers for isolation. Under this constraint, the attitude generation process excludes all poses that could lead to height overlap, retaining only candidate schemes with consistent height within the layer; the unit construction is based on the principle of non-overlapping arrangement in a two-dimensional plane; the inter-layer stacking rule introduces a fixed layer height increment to accommodate partitions and maintain clear inter-layer structure.
[0102] The contour-following placement method is designed for applications that use customized molds to position and protect parts. In this case, the posture generation must meet the feasibility requirements for picking and placing, that is, the horizontal projection of any part on its layer must not be completely blocked by other parts, so as to ensure the smooth implementation of manual or mechanical picking and placing operations; the unit structure is combined with the shape characteristics of the mold for layout design; interlayer stacking allows adjacent mold layers to be staggered and borrowed under the premise of meeting geometric matching conditions, thereby improving the efficiency of vertical space utilization.
[0103] Scattered loading is suitable for random packing of large quantities of small parts that do not require orderly arrangement. In this mode, attitude generation is achieved by simulating the free-fall stacking process through physical simulation; the unit construction no longer emphasizes structured arrangement, but instead uses the statistical volumetric filling density as the evaluation criterion; there are no clear layer boundaries, and the overall packing effect is evaluated primarily by the filling rate and stacking stability.
[0104] By implementing scenario-based layouts, the generation of candidate packing templates can be dynamically adapted to different business constraints, effectively balancing process compliance and engineering feasibility while maintaining the generality of the algorithm framework.
[0105] Optionally, the component packing optimization method further includes: when the packing problem is the placement of the compartments, A global search strategy is adopted to enumerate the row and column division scheme of the compartment, the compartment size parameters, and the feasible posture combinations of the target component in the compartment, under the premise of satisfying the process constraints and the staggered borrowing scheme. When the target component is placed in a single compartment, the feasible posture combinations corresponding to the maximum number of target components loaded in the compartment are enumerated and used as the candidate packing template. When the target components are arranged in a multi-component-per-cell configuration, the staggered borrowing scheme is used to generate a multi-component placement scheme through local insertion and neighborhood expansion, with the loading revenue and the maximum number of loaded components as the objectives, to obtain the candidate packing template.
[0106] Compartment placement refers to a packing method where components need to be placed in independent compartments formed by partitions. It is suitable for scenarios where there are clear process requirements for the isolation, protection, or positioning of parts. Depending on the number of parts that each compartment can hold, this method is divided into two categories: single-part-per-compartment and multi-part-per-compartment, and different strategies are used to generate candidate packing templates for each category.
[0107] Single-component-per-compartment refers to each compartment accommodating only one target component. Its core lies in coordinating the matching relationship between compartment size, component orientation, and compartment grid layout. To obtain the optimal solution, a global search strategy is adopted. Under the premise of satisfying process constraints (including partition thickness, gap between the component and compartment wall, protective reserved space, and shim requirements), the row and column division scheme of the compartments, the dimensional parameters of each compartment, and the feasible orientation combinations of the target component within the compartments are systematically enumerated or searched. The search objective is to maximize the number of compartments that can be arranged in a single container, or to maximize the actual number of components loaded under a fixed number of compartments. Finally, the feasible orientation combinations corresponding to the maximum number of components loaded and their corresponding compartment layouts are output as candidate packing templates.
[0108] Multiple components per compartment refer to a single compartment containing multiple target parts, which is significantly more complex than a single component per compartment. The main challenges lie in the non-overlapping constraints and the feasibility of staggered borrowing between multiple parts within the compartment. To address this, based on the previously generated staggered borrowing scheme, a step-by-step construction strategy is adopted: A standardized initial loading template is formed using a high-quality staggered borrowing configuration. Using a progressive approach, a proven feasible k-piece configuration is used as a base, and candidate configurations of k+1 pieces are generated by locally inserting new parts or expanding the neighborhood of existing configurations. In each iteration, the selection is based on loading benefits such as improved space utilization and increased number of pieces, as well as whether the maximum number of pieces that can be accommodated in the compartment is reached, retaining the most feasible and efficient solutions. Iterative calculations continue until no further parts can be inserted or the geometric limit is reached. The final multi-piece placement scheme serves as a structured unit, constituting the candidate packing template for the multi-piece-per-cell scenario.
[0109] Optionally, the component packing optimization method further includes: when the packing problem is planar placement, decomposing the three-dimensional packing process into two-level optimization: intra-layer two-dimensional planning and inter-layer height direction structural planning; The two-level optimization of decomposing the three-dimensional bin packing process into intra-layer two-dimensional planning and inter-layer height direction structural planning includes: The intra-layer planning result of the intra-layer two-dimensional planning is generated based on the target pose and planar constraints. The planar constraints include at least one of the following: the height range of the target components in the same layer is consistent, vertical insertion or cross-layer borrowing is prohibited, and geometric transformation and lateral interleaving in the horizontal plane are allowed. Based on the constraints of the inter-layer structural height and the vertical height of the container, an overall capacity constraint is established. With the maximum single container loading quantity and / or the maximum space utilization rate as the objectives, the inter-layer planning result of the inter-layer height direction structural planning is determined based on the intra-layer planning result. The intra-layer planning results and the inter-layer planning results are used as the candidate packing templates.
[0110] Planar placement represents a packing pattern with specific structural constraints. The core requirement is that components within the same layer must not be vertically interlocked or nested, and adjacent layers must be physically isolated using partitions or cushioning materials. To meet these constraints, the 3D packing process is decomposed into two levels of optimization problems: intra-layer 2D planning and inter-layer height-direction structural planning.
[0111] Intra-layer 2D planning generates intra-layer planning results based on target pose and planar constraints. The planar constraints include the following: all target components within the same layer maintain a consistent height range, meaning the projection ranges of each component in the vertical direction neither overlap nor diverge; any vertical insertion or cross-layer borrowing is prohibited; geometric transformations such as rotation, translation, and lateral staggering are allowed in the horizontal plane to achieve non-overlapping 2D arrangement. Under these constraints, the originally complex 3D staggered borrowing problem is simplified to a compact arrangement problem in a 2D plane, thus generating a set of layer templates that satisfy planar placement rules as the intra-layer planning result.
[0112] Inter-layer structure planning, based on the intra-layer planning results, further considers the impact of inter-layer construction on the overall layout. The thickness of partitions, the reserved space for cushioning materials, etc., are uniformly modeled as the inter-layer structure height, which, together with the height of each layer, constitutes the cumulative vertical height occupied by the container. This establishes a capacity constraint on the total height of the container, meaning the sum of all layer heights and the inter-layer structure height must not exceed the upper limit of the usable internal height of the container. Under this constraint, and considering business requirements, with the goal of maximizing the loading capacity of a single container and / or maximizing space utilization, suitable layer templates are selected from the intra-layer planning results, and their stacking order and number of layers are determined to form the inter-layer planning results.
[0113] The intra-layer planning results and inter-layer planning results are combined to form a complete candidate packing template. This template not only meets the process constraints of planar placement, but also optimizes space utilization in both two-dimensional layout and inter-layer stacking.
[0114] By employing a two-level strategy, the three-dimensional bin packing problem is transformed into a two-dimensional plus one-dimensional optimization problem that can be solved efficiently. Under the premise of ensuring engineering requirements such as partition isolation and restrictions on cross-layer staggering, the automated planning capability in planar placement scenarios is effectively improved.
[0115] Optionally, the component packing optimization method further includes: when the packing problem is contour placement, Based on the planar placement strategy, a feasibility constraint for picking and placing and a staggered borrowing constraint for interlayer molds are introduced. The feasibility constraint for picking and placing includes: the intersection of the projections of any two target parts on the horizontal plane in the same layer is an empty set. The staggered borrowing constraint for interlayer molds includes: there is no geometric interference between the relative poses of the target parts in the vertical direction of two adjacent layers.
[0116] Contour placement refers to a packing method that uses customized contour molds to isolate, position, and protect parts. Building upon the planar placement strategy, it further introduces constraints on the feasibility of retrieval and placement, as well as constraints on the staggered borrowing of molds between layers, to balance operational convenience and space utilization efficiency.
[0117] The feasibility constraint for pick-and-place operations ensures that any component can still be independently removed after packing. Specifically, the intersection of the projections of any two target components on the horizontal plane within the same layer is an empty set, meaning they do not obstruct each other in the top-view direction. This constraint transforms the spatial requirements of actual pick-and-place operations into geometric conditions, preventing parts from being unable to be directly grasped or extracted due to overlapping. It guides the structural design of the contour mold, ensuring that features such as mold openings and positioning grooves are consistent with the pick-and-place path, improving human-machine compatibility.
[0118] In one embodiment, for any two parts i and j on the same layer, their projections on the horizontal plane are denoted as Π(i) and Π(j), and the constraint conditions that need to be satisfied are: .
[0119] Interlayer mold staggered borrowing constraint allows for a limited nesting arrangement of adjacent layer contour molds in the vertical direction. Its core requirement is that there is no geometric interference between the upper and lower molds in their relative poses; that is, collision detection determines that their relative positions in the Z-axis direction meet the non-overlap condition. Based on the mold's outline and local concave / convex features, the interlayer mold staggered borrowing constraint utilizes the vertical space between layers while maintaining the regularity of the intra-layer plane, thereby improving the overall loading density.
[0120] The intralayer planning follows the basic framework of planar placement, limiting all target components to the same height range, allowing only horizontal rotation, translation, and lateral arrangement. It also generates candidate layer templates that meet the feasibility constraints of picking and placing by combining parameters such as gaps and protective reserves. Based on this, the interlayer planning performs geometric verification on the relative poses of adjacent layer molds, selects combinations that do not interfere with each other and have spatial borrowing, and forms a complete packing structure that meets the requirements of contour placement.
[0121] Optionally, the component packing optimization method further includes: when the packing problem is loose placement, A rigid body dynamics simulation environment is constructed based on the simplified results. The rigid body dynamics simulation environment includes the gravity, contact collision, friction coefficient and elastic recovery parameters of the target component. The target components are released into the box one by one according to the random initial pose and random landing point. The stable stacking state is obtained by iterative solution through physical simulation, and the random simulation results are obtained. The random simulation results are statistically evaluated, and the candidate packing template is generated by selecting the scheme with the largest loading quantity or the best volume utilization rate and which satisfies stacking stability.
[0122] Scattered placement refers to a packing pattern where components are placed randomly within the container without requiring a regular arrangement. This pattern generally lacks specific layout rules. During implementation, a rigid body dynamics simulation environment is constructed based on the simplified results obtained by lightweighting the 3D digital model of the target components. This environment includes physical properties such as gravity field settings, contact collision detection mechanisms, friction coefficients, and elastic recovery parameters, used to simulate the motion and static behavior of components during mutual collisions and interactions with the container walls.
[0123] During the simulation, target components are released one by one into the box according to random initial poses and random landing points. After each component is released, the simulation model iteratively calculates its trajectory based on the dynamic equations until it reaches a state of mechanical equilibrium, that is, forming stable support with other components or the box. This process is repeated until the box space is saturated or the preset upper limit for component placement is reached, ultimately obtaining a complete random stacking result.
[0124] To improve the reliability and coverage of the solution, the above process was run independently multiple times, each time using a different random seed to generate multiple random simulation results. All results were then statistically evaluated, taking into account factors such as loading quantity, volume utilization, and stacking stability. Stacking stability includes indicators such as center of gravity height, support area, and tipping risk. The solution with the best performance or statistical robustness was selected to generate candidate packing templates.
[0125] This invention addresses the high-density computational tasks involved in bin packing optimization by designing a multi-layered computational acceleration mechanism to improve overall solution efficiency.
[0126] At the parallel computing level, the decomposable computational modules in the algorithm, including pose generation, staggered borrowing evaluation, layer template construction, and global policy optimization, are evenly distributed to the processing cores of a multi-core CPU according to task granularity. Through fine-grained task partitioning and load balancing strategies, core idleness or computational bottlenecks are avoided, and the computation time decreases approximately linearly with the increase in the number of cores, fully leveraging the parallel processing capabilities of multi-core hardware.
[0127] At the code implementation level, the computation process is optimized using C++, combined with memory pool management, cache-friendly data structures, and vectorized instructions to significantly shorten the time required for a single geometric operation, collision detection, or scoring evaluation, thereby increasing the throughput per unit time of each core.
[0128] This invention introduces a computational result reuse mechanism to achieve recalculation capabilities at the component level. Specifically, after calculating the packing scheme for a target component with a specific box type, the intermediate results, such as its lightweight model, feasible pose set, staggered borrowing configuration, and element template, are structured and cached. When the component needs to be adapted to a box of other sizes, it is not necessary to repeat all the preceding steps; only the parts affected by the box boundary need to be adjusted based on the existing results to quickly generate candidate solutions for the new box type. This mechanism is particularly advantageous in multi-box type selection scenarios.
[0129] For example, when a business needs to select the solution with the highest volume utilization rate or the lowest overall cost from dozens of standard box types, traditional manual methods are too labor-intensive to conduct a comprehensive comparison. However, this invention, through the aforementioned parallel acceleration and result reuse mechanism, can automatically traverse and evaluate all box types in a short time, outputting the optimal box type and corresponding packing strategy. This not only significantly shortens the decision-making cycle but also effectively reduces logistics costs from dimensions such as saving packaging materials and optimizing transportation space. It extends algorithm efficiency improvement from single-task acceleration to cross-task knowledge transfer, forming a highly efficient packing calculation model for high-density, variable scenarios, providing technical support for large-scale automated packaging planning.
[0130] This application provides a component packing optimization device, comprising: The simplification module is used to simplify the target parts with the minimum number of faces using a mesh simplification algorithm, and obtain the simplification result. The target pose determination module is used to determine a comprehensive score based on the simplified result and the consistency of posture height and direction when the target component has a specified placement posture, and to determine the target pose based on the comprehensive score. An interleaved borrowing generation module is used to generate an interleaved borrowing scheme based on the target pose using Monte Carlo random sampling and a greedy construction method. The bin packing strategy module is used to construct layout units and generate candidate bin packing templates based on the staggered borrowing scheme, and obtain a bin packing strategy based on the candidate bin packing templates, wherein the layout units include row units and column units.
[0131] like Figure 3 As shown in the embodiment of this application, an electronic device 300 includes a memory 310 and a processor 320; the memory 310 is used to store a computer program; the processor 320 is used to implement the component packing optimization method as described above when the computer program is executed.
[0132] Alternatively, an electronic device 300 includes a memory 310 and a processor 320 coupled to the memory 310; the memory 310 is configured to store a computer program; and the processor 320 is configured to perform the following operations when the computer program is executed: The target component is simplified using a mesh simplification algorithm with the goal of minimizing the number of facets, and the simplified result is obtained. When the target component has a specified placement posture, based on the simplified result, a comprehensive score is determined according to the consistency of posture height and direction, and the target posture is determined according to the comprehensive score. Based on the target pose, an alternating borrowing scheme is generated by Monte Carlo random sampling and a greedy construction method. Based on the staggered borrowing scheme, layout units are constructed and candidate packing templates are generated. A packing strategy is obtained based on the candidate packing templates. The layout units include row units and column units. This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the component packing optimization method described above.
[0133] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations: The target component is simplified using a mesh simplification algorithm with the goal of minimizing the number of facets, and the simplified result is obtained. When the target component has a specified placement posture, based on the simplified result, a comprehensive score is determined according to the consistency of posture height and direction, and the target posture is determined according to the comprehensive score. Based on the target pose, an alternating borrowing scheme is generated by Monte Carlo random sampling and a greedy construction method. Based on the staggered borrowing scheme, a layout unit is constructed and a candidate binning template is generated. A binning strategy is obtained based on the candidate binning template. The layout unit includes row units and column units.
[0134] Electronic device 300, which can serve as a server or client in this application, is described below as an example of hardware devices that can be applied to various aspects of this application. Electronic device 300 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 300 can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0135] Electronic device 300 includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0136] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application according to actual needs. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.
[0137] Although the above disclosure is provided, the scope of protection of this application is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of this application, and all such changes and modifications will fall within the scope of protection of this application.
Claims
1. A method for optimizing component packing, characterized in that, include: The target component is simplified using a mesh simplification algorithm with the goal of minimizing the number of facets, and the simplified result is obtained. When the target component has a specified placement posture, based on the simplified result, a comprehensive score is determined according to the consistency of posture height and direction, and the target posture is determined according to the comprehensive score. Based on the target pose, an alternating borrowing scheme is generated using Monte Carlo random sampling and a greedy construction method, including: Given the target pose, the rotation angle and translation position of the target component are randomly sampled using Monte Carlo methods, and an initial candidate set is generated using the greedy construction method. Based on the initial candidate set, a branch-and-bound strategy is introduced to converge the borrowing combination space, the theoretical performance upper bound of each partial solution is estimated, and branches whose theoretical performance upper bound is lower than the current optimal staggered borrowing scheme are deleted to obtain an optimal set. Based on the optimal set, a neighborhood search is used to locally update the borrowing variables. When the performance index of the updated scheme is higher than the original theoretical performance upper bound, the original borrowing variables are replaced to obtain the updated staggered borrowing scheme. The update method includes perturbation and / or replacement. Based on the staggered borrowing scheme, a layout unit is constructed and a candidate binning template is generated. A binning strategy is obtained based on the candidate binning template. The layout unit includes row units and column units.
2. The component packing optimization method according to claim 1, characterized in that, The aforementioned mesh simplification algorithm simplifies the target components with the goal of minimizing the number of facets, yielding the following simplification results: Based on constraints of invariant external dimensions, consistent clearances, and invariant staggered borrowing, the digital model of the target component is simplified with the goal of minimizing the number of facets, resulting in a lightweight digital model, which is the simplification result.
3. The component packing optimization method according to claim 1, characterized in that, When the target component has a specified placement posture, based on the simplified result, a comprehensive score is determined according to the consistency of posture height and direction. Determining the target pose based on the comprehensive score includes: Based on the specified placement posture, determine the main axis direction and overall direction vector of the target component; The attitude height of the target component, as well as the minimum bounding box height and the maximum bounding box height relative to the spindle direction, are determined based on the spindle direction. Using the simplified result as the target object, the directional consistency is determined based on the overall direction vector and the unit vector of the principal axis direction; Based on the minimum bounding box height, the maximum bounding box height, and the attitude height, a penalty term is constructed that increases as the attitude height increases; The comprehensive score is determined based on the penalty item and the direction consistency, and the pose with the highest comprehensive score is taken as the target pose.
4. The component packing optimization method according to claim 1, characterized in that, Also includes: When the target component does not have the specified placement posture, a set of candidate postures is generated with a preset index as the target, wherein the preset index includes at least one of loading density, anti-interference or stability. The target pose is determined from the set of candidate poses.
5. The component packing optimization method according to claim 4, characterized in that, When the target component does not have the specified placement posture, generating a candidate pose set based on a preset index includes: With minimum volume and / or minimum height as constraints and with the goal of increasing the loading density, a first set of alternative postures for the target component is generated; The reference axis of the target component is obtained by principal component direction and / or principal axis extraction method, and a second set of alternative postures is determined based on the reference axis, wherein the reference axis includes at least one of major axis, width axis and thickness axis; Using physical simulation methods, with stability as the objective, a third set of alternative attitudes for the target component is determined. At least one set from the first set of candidate poses, the second set of candidate poses, and the third set of candidate poses shall be used as the candidate pose set.
6. The component packing optimization method according to any one of claims 1-5, characterized in that, The candidate packing template includes a set of row generation layers, a set of column generation layers, and a set of row-column hybrid layers; The process of generating candidate packing templates based on the staggered borrowing scheme and obtaining packing strategies based on the candidate packing templates includes: The row generation layer set is constructed using the space occupancy limitations in the width and length directions of the box as constraints. The column generation layer set is constructed using the space occupancy limitations in the length and width directions of the box as constraints. The set of row and column hybrid layers is constructed based on the condition that the sub-regions formed after discretization within the box satisfy row and column arrangement constraints respectively. The binning strategy is selected from the set of row generation layers, the set of column generation layers, and the set of row-column hybrid layers.
7. The component packing optimization method according to any one of claims 1-5, characterized in that, The process of generating candidate packing templates based on the staggered borrowing scheme further includes: For components with placement constraints, the packing problem is classified into one or more of the following according to the constraint type: compartmentalized placement, planar placement, contour placement, or scattered placement. Under the corresponding constraint conditions, the pose generation, unit construction, or inter-layer stacking rules are adjusted to generate the candidate packing template.
8. The component packing optimization method according to claim 7, characterized in that, Also includes: When the packing problem is the placement of items in the compartments. A global search strategy is adopted to enumerate the row and column division scheme of the compartment, the compartment size parameters, and the feasible posture combinations of the target component in the compartment, under the premise of satisfying the process constraints and the staggered borrowing scheme. When the target component is placed in a single compartment, the feasible posture combinations corresponding to the maximum number of target components loaded in the compartment are enumerated and used as the candidate packing template. When the target components are arranged in a multi-component-per-cell configuration, the staggered borrowing scheme is used to generate a multi-component placement scheme through local insertion and neighborhood expansion, with the loading revenue and the maximum number of loaded components as the objectives, to obtain the candidate packing template.
9. The component packing optimization method according to claim 7, characterized in that, Also includes: When the packing problem is a planar arrangement, the three-dimensional packing process is decomposed into a two-level optimization of intra-layer two-dimensional planning and inter-layer height direction structural planning; The two-level optimization of decomposing the three-dimensional bin packing process into intra-layer two-dimensional planning and inter-layer height direction structural planning includes: The intra-layer planning result of the intra-layer two-dimensional planning is generated based on the target pose and planar constraints. The planar constraints include at least one of the following: the height range of the target components in the same layer is consistent, vertical insertion or cross-layer borrowing is prohibited, and geometric transformation and lateral interleaving in the horizontal plane are allowed. Based on the constraints of the inter-layer structural height and the vertical height of the container, an overall capacity constraint is established. With the maximum single container loading quantity and / or the maximum space utilization rate as the objectives, the inter-layer planning result of the inter-layer height direction structural planning is determined based on the intra-layer planning result. The intra-layer planning results and the inter-layer planning results are used as the candidate packing templates.
10. The component packing optimization method according to claim 7, characterized in that, Also includes: When the packing problem is the shape-mimicking placement... Based on the planar placement strategy, a feasibility constraint for picking and placing and a staggered borrowing constraint for interlayer molds are introduced. The feasibility constraint for picking and placing includes: the intersection of the projections of any two target parts on the horizontal plane in the same layer is an empty set. The staggered borrowing constraint for interlayer molds includes: there is no geometric interference between the relative poses of the target parts in the vertical direction of two adjacent layers.
11. The component packing optimization method according to claim 7, characterized in that, Also includes: When the packing problem is loose packaging... A rigid body dynamics simulation environment is constructed based on the simplified results. The rigid body dynamics simulation environment includes the gravity, contact collision, friction coefficient and elastic recovery parameters of the target component. The target components are released into the box one by one according to the random initial pose and random landing point. The stable stacking state is obtained by iterative solution through physical simulation, and the random simulation results are obtained. The random simulation results are statistically evaluated, and the candidate packing template is generated by selecting the scheme with the largest loading quantity or the best volume utilization rate and which satisfies stacking stability.
12. A component packing optimization device, characterized in that, include: The simplification module is used to simplify the target parts with the minimum number of faces using a mesh simplification algorithm, and obtain the simplification result. The target pose determination module is used to determine a comprehensive score based on the simplified result and the consistency of posture height and direction when the target component has a specified placement posture, and to determine the target pose based on the comprehensive score. An interleaved borrowing generation module is used to generate an interleaved borrowing scheme based on the target pose using Monte Carlo random sampling and a greedy construction method, including: Given the target pose, the rotation angle and translation position of the target component are randomly sampled using Monte Carlo methods, and an initial candidate set is generated using the greedy construction method. Based on the initial candidate set, a branch-and-bound strategy is introduced to converge the borrowing combination space, the theoretical performance upper bound of each partial solution is estimated, and branches whose theoretical performance upper bound is lower than the current optimal staggered borrowing scheme are deleted to obtain an optimal set. Based on the optimal set, a neighborhood search is used to locally update the borrowing variables. When the performance index of the updated scheme is higher than the original theoretical performance upper bound, the original borrowing variables are replaced to obtain the updated staggered borrowing scheme. The update method includes perturbation and / or replacement. The bin packing strategy module is used to construct layout units and generate candidate bin packing templates based on the staggered borrowing scheme, and obtain a bin packing strategy based on the candidate bin packing templates, wherein the layout units include row units and column units.
13. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the component packing optimization method as described in any one of claims 1-11 when executing the computer program.
14. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the component packing optimization method as described in any one of claims 1-11.
