Digital twinning-based layout and packaging collaborative optimization method and system
By constructing a virtual production line platform using digital twin technology, and combining an improved greedy strategy and a Pareto-targeted particle swarm optimization algorithm, collaborative optimization of two-dimensional nesting and three-dimensional packaging was achieved. This solved the problem of low resource utilization efficiency in existing technologies and improved material utilization and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, layout and packaging optimization are often not effectively coordinated, resulting in low overall resource utilization efficiency. In particular, when considering the remaining space and waste during packaging, the mutual influence between the two is not taken into account, and there is a lack of effective feedback and adjustment means, which makes it impossible to guarantee that the final packaging effect meets the order requirements and resource consumption expectations.
A digital twin-based collaborative optimization method for nesting and packaging is adopted. By constructing a virtual production line platform and combining an improved greedy strategy, local search algorithm, and Pareto objective particle swarm dynamic optimization algorithm, collaborative optimization of two-dimensional nesting and three-dimensional packaging is achieved. Packaging indicators are monitored in real time and feedback adjustments are made until the expected indicators are met.
It improved material utilization, reduced waste, enabled rapid response to different order demands, optimized the allocation of production resources, and improved production efficiency and space utilization.
Smart Images

Figure CN121638531A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital twin application, and particularly relates to a layout and packing collaborative optimization method and system based on digital twin. BACKGROUND
[0002] The development of manufacturing industry makes the demand for manufacturing products gradually diversified and customized. The electronic product manufacturing industry presents typical "multi-specification, small batch" production characteristics, which makes the production organization mode of the workshop also change significantly: frequent change of production product model and specification has become the norm, and flexibility in the production process is increasingly prominent. Flexibility has become a core technical requirement of intelligent workshops. Similar production characteristics also appear in the mold, customized equipment, and personalized furniture industries. The production equipment of these industries must have high-level processing flexibility. Through flexible tooling and processing code parameterization, the equipment can be flexibly switched between multiple specifications to adapt to the batch production needs of different product series.
[0003] In the 3C industry, high integration and rapid update of products are also its notable features, so the production of this industry also faces the challenge of high-frequency production change. In addition to having high flexibility requirements for production resources (such as manpower), the production organization and scheduling of the workshop must also be able to respond quickly to changes, dynamically schedule according to the structural characteristics of the ordered products and the corresponding processing or assembly task quantity, and ensure that production resources are optimally configured to improve production efficiency and maximize production capacity release. In the traditional production mode, layout and packing are mainly focused on mass production, using fixed layout methods and standardized packaging methods. However, in the current personalized production environment, layout and packing not only need to adapt to the characteristics of multi-variety and small batch production, but also need to have high flexibility to respond to rapid changes in production and market demand.
[0004] Two-dimensional rectangular part layout problems mainly occur in manufacturing industries, especially in the production process of cutting plates such as metal, wood, and plastic plates. The goal is to arrange the cutting of multiple parts on a given two-dimensional raw material (such as rectangular or other shaped plates) to maximize material utilization while avoiding waste. Three-dimensional packing problems usually occur in part loading, warehousing, and logistics management, with the goal of optimizing loading and transportation efficiency through reasonable stacking of goods and space utilization. Specifically, three-dimensional packing refers to loading different sizes, shapes, and weights of goods into three-dimensional containers (such as packaging boxes, trucks, and warehouse space), with the goal of maximizing space usage, reducing voids, while ensuring the stability and safety of the goods.
[0005] Currently, layout and packaging optimization are typically considered independent processes. During the cutting process, the chip sequence is determined accordingly, resulting in a fixed packaging outcome. Therefore, prior consideration of the layout plan significantly impacts the final packaging result. Layout optimization focuses on efficiently cutting raw materials to maximize utilization, while packaging optimization focuses on rationally packaging the cut panels to save space and reduce transportation costs. In existing technologies, layout and packaging optimization often lack effective coordination, leading to low overall resource utilization efficiency. Particularly when considering remaining space and waste during packaging, the mutual influence between the two is often overlooked. Once the layout plan is designed, the lack of effective feedback and adjustment mechanisms makes it impossible to guarantee that the final packaging result meets order requirements and resource consumption expectations. Therefore, a collaborative optimization method capable of simulating the operation of the layout and packaging processes is urgently needed to maximize resource utilization and cost savings. Summary of the Invention
[0006] The purpose of this invention is to propose a method and system for collaborative optimization of layout and packaging based on digital twins. Relying on digital twin technology, this invention addresses the problems of two-dimensional parts layout optimization and three-dimensional packaging optimization by collaboratively optimizing layout and packaging, thereby improving material utilization and reducing waste.
[0007] To achieve this objective, the present invention adopts the following technical solution:
[0008] A collaborative optimization method for layout and packaging based on digital twins includes the following steps:
[0009] S1: Construct a virtual production line platform based on digital twin technology, the virtual production line platform including a cutting module, a conveying module and a packaging module;
[0010] S2: Two-dimensional nesting scheme: The improved greedy strategy places parts using edge matching and corner filling strategies. After repeated collision detection and updating of the remaining space, an initial two-dimensional nesting scheme is generated. The local search algorithm constructs a neighborhood solution set based on the initial solution, and repeatedly performs neighborhood search and acceptance criterion judgment to obtain the optimal solution of the two-dimensional nesting scheme.
[0011] S3: 3D Packaging Scheme: Generate the chip sequence based on the optimal solution of the 2D nesting scheme, pack the chips using a modular layering strategy with a fixed chip sequence, and obtain the best solution based on tree search.
[0012] S4: Simulation: Input the two-dimensional layout scheme obtained in step S2 and the three-dimensional packaging scheme obtained in step S3 into the virtual production line platform, map the two-dimensional layout scheme into the input parameters of the packaging process, simulate the entire process from layout to packaging, monitor the packaging indicators in real time, and output simulation evaluation data.
[0013] S5: Feedback Adjustment: The simulation evaluation data is used to determine whether the expected indicators are met. If they are met, the final two-dimensional layout and three-dimensional packaging schemes are determined. If they are not met, the layout and packaging schemes are optimized by feedback. The two-dimensional layout and three-dimensional packaging schemes are collaboratively optimized by the particle swarm dynamic optimization algorithm based on the Pareto objective. The two-dimensional layout and three-dimensional packaging schemes are updated according to the optimization results. The updated two-dimensional layout and three-dimensional packaging schemes are then input into the virtual production line platform for evaluation again.
[0014] S6: Repeated feedback adjustment and simulation until the simulation evaluation data determines whether the expected indicators are met.
[0015] Furthermore, step S2 includes:
[0016] S210: Set the layout constraints for N parts, the layout scheme types are as follows: θ represents the angular change of the rectangular part with each rotation, and the objective function for layout optimization is: The sheet metal has dimensions L×W, and the area of part i is A. i The total area of the parts is ;
[0017] S220: Arrange the parts in descending order according to their area size. The improved greedy algorithm places the parts on the board using edge matching and corner filling strategies. After collision detection, the remaining space is updated. The steps of placing parts, collision detection, and updating the remaining space are repeated until all parts are placed, generating the initial scheme of two-dimensional layout.
[0018] S230: Based on the initial scheme of two-dimensional layout, a series of layout schemes are generated by adjusting the state of the parts. The neighborhood solution set of the initial scheme of two-dimensional layout is constructed. The material utilization rate of the new solution is calculated by neighborhood search. Based on the acceptance criterion, it is determined whether to accept the new solution. After iterative optimization, the optimal solution of the two-dimensional layout scheme is obtained.
[0019] Furthermore, S220 includes:
[0020] S221 Part Sorting: The set of all rectangular parts to be sorted is denoted as... Each part has a corresponding area. The parts are sorted in descending order based on their area. The sorted sequence of parts is as follows: ,satisfy ,in yes The first in One part;
[0021] S222 Part Placement: Set the lower left corner of the sheet metal as the starting placement point. From the sorted parts sequence Take out the parts in sequence For parts Perform rotation and flipping operations;
[0022] Let the rotation angle be... The angle changes with each rotation. Then the set of angles after rotation is ,in , The flip operation is denoted as Including horizontal flipping and vertical flip For each combination of rotation angle and flipping operation, the part Try placing it on the board, and set the placement coordinates to... ;
[0023] Part placement is based on edge matching and corner filling strategies. The placement condition requires that the part be completely within the inner boundary of the sheet metal, i.e., for the sheet metal dimensions... ,have , , , , and These are the width and height of the part after it has been rotated or flipped.
[0024] S223 Collision Detection: Calculate the critical polygon (NFP) between each part and other parts, and calculate the internal critical polygon between the part and the sheet metal, denoted as... ;
[0025] S224 Update Remaining Space: When Parts Successfully placed on the board Afterwards, update the remaining space of the board, according to Adjust the size and placement of the remaining space to define the boundaries;
[0026] S225: Repeat the steps of placing parts, collision detection, and updating remaining space until all parts are placed, generating an initial plan for the 2D nesting.
[0027] Furthermore, S230 includes:
[0028] S231 defines the neighborhood structure: Based on the initial scheme of two-dimensional nesting, a series of nesting schemes, i.e. neighborhood solutions, are generated by adjusting the state of the parts. The ways to adjust the state of the parts include exchanging the position of the parts, rotating the parts, and flipping the parts. The series of nesting schemes constructs the neighborhood solution set of the initial scheme of two-dimensional nesting.
[0029] S232 Neighborhood Search: Randomly select a new solution from the neighborhood solution set and calculate the material utilization rate of the new solution. Set the acceptance criteria as ;
[0030] If the new solution is the board utilization rate The plate utilization rate is greater than the current solution. This indicates that the new solution is better, so we should accept the new solution directly and replace the current layout scheme with it; if Then a random number between 0 and 1 is generated. ,calculate , For temperature parameters, when At that time, new interpretations were still accepted;
[0031] S232 Iterative Optimization: Repeat the steps of neighborhood search and acceptance criterion judgment to continuously update the current layout scheme;
[0032] In each iteration, the temperature parameter Gradually decrease, as Get smaller The value will also decrease, and the probability of accepting a poor solution will gradually decrease. During the iteration process, the part movement schemes that have recently failed to be optimized are recorded. When the preset termination condition is reached, the iteration stops and the optimal solution of the two-dimensional layout scheme is obtained.
[0033] Furthermore, S3 includes:
[0034] S310: Set the constraints for parts packaging; the objective function for packaging optimization is: , This refers to the number of packing boxes that can be loaded. For packaging boxes Maximum load capacity, It is the height of a single part. It is a module The length, It is a module width, It is the length of part g. For the first Each module contains a set of part indexes;
[0035] definition :if , indicating module Loaded in packaging boxes Inside, and For module The coordinates of the bottom left corner of the packaging. For module The coordinates of the upper right corner; if This indicates a module. Not loaded in the packaging box Inside;
[0036] S320: Multiple parts are arranged in a rectangular module on a two-dimensional plane. The modules are placed in layers inside the packaging box, with multiple modules in each layer. The modules are stacked layer by layer inside the packaging box. According to the transfer order after the two-dimensional layout, the unloaded parts are transferred one by one. Add to the current module sequentially;
[0037] The optimal solution is obtained using tree search, and the value function is: α and β are weighting coefficients; Conditions for using the packaging box: .
[0038] Furthermore, step S320 includes:
[0039] S321: Following the transmission order after the two-dimensional layout, load the unloaded parts one by one. Add sequentially to the current module; for parts For each possible placement orientation, calculate the length of its outer envelope rectangle in that orientation. ,Width and high For packaging boxes Middle module Calculate the length of the minimum bounding rectangle of the remaining space. ,Width and high Simultaneously, the shape characteristics of the remaining space are recorded;
[0040] S322: According to the parts The outer envelope rectangle and module under a certain orientation Calculate the shape matching degree based on the difference in length, width, and height ratios of the minimum bounding rectangle of the remaining space: if the part The ratios of the length, width, and height of the outer envelope rectangle to the length, width, and height of the minimum bounding rectangle of the remaining space are respectively , , Shape matching degree is defined as , The closer to 1, the higher the shape matching degree, and all shapes are retained. The placement position is used as a candidate action, and each candidate action will generate a potential child node, which is a candidate node;
[0041] Backtracking nodes, pruning and filtering candidate nodes, calculating the value function of candidate nodes, generating modules and loading them into the packaging box, performing space compression and value function evaluation;
[0042] S323: Place the parts Modules packed into the box Then, in virtual 3D space, check whether it is completely inside the packaging box boundary, whether it interferes with all placed parts or modules, and whether it meets stability constraints. If all conditions are met, then the parts are placed... Packed into boxes , that is to say Update module The remaining space and the total weight of the loaded parts are considered, and it is also determined whether to move the module. The stacking layer number is incremented by 1, and it is determined whether excessively small modules need to be merged. If neither of the above conditions is met, the next packaging box is activated. Packet activation conditions are: .
[0043] Furthermore, in step S4, the cutting module, conveying module, and packaging module of the virtual production line platform execute the sheet metal cutting, wafer transportation, and wafer packaging loading process, monitor the packaging space utilization rate and center of gravity offset data in real time, and generate a visual preview of the loading effect.
[0044] Furthermore, in step S5, the particle swarm optimization algorithm based on the Pareto objective collaboratively optimizes the two-dimensional nesting scheme and the three-dimensional packaging scheme. The optimization objectives include maximizing the utilization rate of the two-dimensional nesting and maximizing the utilization rate of the three-dimensional packing space. The Pareto optimization objective is... ,in, , , .
[0045] Furthermore, step S5 includes:
[0046] S510: Set Pareto optimization goals: The fitness function is designed as follows: ,in It is the dynamic weight of the target;
[0047] The combination of the two-dimensional nesting scheme and the three-dimensional packing scheme generated in steps S2 and S3 can be encoded into a vector of solutions, i.e., particles. ; in, This provides the two-dimensional planar layout information for part i. Let i be the height of part i in three-dimensional space. The number of packaging boxes used;
[0048] S520: Determine the particle swarm size, with each particle representing a two-dimensional nesting pattern and a corresponding three-dimensional bin packing scheme; initialize particle positions and velocities, and simultaneously initialize the historical best position of each particle. and global optimal position Set the parameters for the particle swarm optimization algorithm, including the inertia weights. Initially set to 0.9, learning factor and The initial value is set to 2.
[0049] S530: Compare each particle with the particles in the current Pareto front; if particle A has a higher 2D packing utilization rate than particle B and a higher 3D binning space utilization rate than particle B, or if particle A is superior to particle B in one objective and not inferior to particle B in another objective, then particle A dominates particle B; if particle A is not dominated by any particle in the current Pareto front, but can dominate some particles in the front, then add particle A to the Pareto front and remove the particles dominated by it, ensuring that it only contains non-dominated solutions.
[0050] S540 Particle Update:
[0051] According to the formula Update particle velocity, and yes Random numbers are generated randomly; based on the updated speed, a formula is used. Update particle positions; when updating particle positions, ensure that the new positions meet the actual production constraints. If the constraints are not met, correct or regenerate the positions.
[0052] S550 compares the current fitness values of all particles with the global optimal position. The fitness value, if any particle has a fitness value better than ,renew The position of the particle is determined by prioritizing the selection of the globally optimal position from the Pareto front, guiding the particle swarm to search towards the Pareto optimal solution.
[0053] S560 determines whether the current iteration count has reached the preset maximum iteration count. If the desired fitness is achieved, the iteration terminates; otherwise, the iteration returns to recalculate the fitness and continues to the next iteration; the final Pareto front result is output.
[0054] A digital twin-based collaborative optimization system for layout and packaging, the system being used to implement the aforementioned digital twin-based collaborative optimization method for layout and packaging;
[0055] The system includes a simulation module, a two-dimensional nesting module, a three-dimensional packaging module, and a feedback adjustment module;
[0056] The simulation module is equipped with a virtual production line platform based on digital twin technology. The simulation module is used to map the two-dimensional layout scheme into the input parameters of the packaging process according to the input two-dimensional layout scheme and three-dimensional packaging scheme, simulate the whole process from layout to packaging, monitor the packaging indicators in real time, and output simulation evaluation data.
[0057] The two-dimensional nesting module is equipped with an improved greedy strategy algorithm model. The improved greedy strategy algorithm model is used to place parts through edge matching strategy and corner filling strategy. After repeated collision detection and updating of the remaining space, an initial solution for two-dimensional nesting is generated. The local search algorithm equipped in the two-dimensional nesting module constructs a neighborhood solution set based on the initial solution, and repeatedly performs neighborhood search and acceptance criterion judgment to obtain the optimal solution of the two-dimensional nesting scheme.
[0058] The three-dimensional packaging module is used to generate the chip sequence based on the optimal solution of the two-dimensional nesting scheme, and packs the chips using a modular layering strategy with a fixed chip sequence. Then, the optimal solution is obtained through the tree search algorithm carried by the three-dimensional packaging module.
[0059] The feedback adjustment module determines whether the expected indicators are met by simulating evaluation data. If they are met, the final two-dimensional layout and three-dimensional packaging schemes are determined. If they are not met, the layout and packaging schemes are optimized by feedback. The Pareto-based particle swarm optimization algorithm on the feedback adjustment module is used to collaboratively optimize the two-dimensional layout and three-dimensional packaging schemes. The two-dimensional layout and three-dimensional packaging schemes are updated according to the optimization results, and the updated two-dimensional layout and three-dimensional packaging schemes are input into the virtual production line platform for evaluation again.
[0060] The technical solution provided by this invention may include the following beneficial effects:
[0061] This method, relying on digital twin technology, addresses the optimization of two-dimensional parts layout and three-dimensional packaging by proposing a collaborative optimization of layout and packaging to improve material utilization and reduce waste. It establishes a virtual, flexible, standardized, automated production line, simulating the production process from cutting and blanking to layout and packaging. Through digital twin simulation, a feedback adjustment mechanism based on digital twins is proposed, achieving collaborative iterative optimization of layout and packaging through virtual simulation, forming an automatic iteration of "layout → simulation → feedback → optimization." This method can comprehensively optimize packaging effects (packaging evaluation indicators) during the layout design process, based on virtual feedback, to meet the needs of different orders. It moves from independently considering the optimization of raw material utilization in the layout stage to comprehensively considering the utilization of packaging space and the reduction of packaging costs, predicting resource competition, and reducing waste caused by disturbances in the production line. Attached Figure Description
[0062] Figure 1This is a flowchart of the operation of a digital twin-based collaborative optimization method for layout and packaging according to an embodiment of the present invention;
[0063] Figure 2 This is a flowchart of the operation of the virtual production line platform;
[0064] Figure 3 This is a schematic diagram of the critical polygon (NFP) in a two-dimensional nesting scheme;
[0065] Figure 4 This is a flowchart of the 3D packaging solution optimization. Detailed Implementation
[0066] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0067] Reference Figure 1 An embodiment of the present invention provides a collaborative optimization method for layout and packaging based on digital twins, comprising the following steps:
[0068] S1: Construct a virtual production line platform based on digital twin technology, the virtual production line platform including a cutting module, a conveying module and a packaging module;
[0069] S2: Two-dimensional nesting scheme: The improved greedy strategy places parts using edge matching and corner filling strategies. After repeated collision detection and updating of the remaining space, an initial two-dimensional nesting scheme is generated. The local search algorithm constructs a neighborhood solution set based on the initial solution, and repeatedly performs neighborhood search and acceptance criterion judgment to obtain the optimal solution of the two-dimensional nesting scheme.
[0070] S3: 3D Packaging Scheme: Generate the chip sequence based on the optimal solution of the 2D nesting scheme, pack the chips using a modular layering strategy with a fixed chip sequence, and obtain the best solution based on tree search.
[0071] S4: Simulation: Input the two-dimensional layout scheme obtained in step S2 and the three-dimensional packaging scheme obtained in step S3 into the virtual production line platform, map the two-dimensional layout scheme into the input parameters of the packaging process, simulate the entire process from layout to packaging, monitor the packaging indicators in real time, and output simulation evaluation data.
[0072] S5: Feedback Adjustment: The simulation evaluation data is used to determine whether the expected indicators are met. If they are met, the final two-dimensional layout and three-dimensional packaging schemes are determined. If they are not met, the layout and packaging schemes are optimized by feedback. The two-dimensional layout and three-dimensional packaging schemes are collaboratively optimized by the particle swarm dynamic optimization algorithm based on the Pareto objective. The two-dimensional layout and three-dimensional packaging schemes are updated according to the optimization results. The updated two-dimensional layout and three-dimensional packaging schemes are then input into the virtual production line platform for evaluation again.
[0073] S6: Repeated feedback adjustment and simulation until the simulation evaluation data determines whether the expected indicators are met.
[0074] This invention proposes a collaborative optimization system for the entire "layout-packaging" process based on digital twins, achieving bidirectional dynamic adjustment of layout and packaging by constructing a virtual production line. Specifically, upon receiving an order, the requirements for each part to be cut from the sheet metal are first determined. A two-dimensional layout scheme is designed based on the part requirements and sheet metal utilization rate. After the initial layout scheme design, the order of part fabrication after cutting is determined (the fabrication order determines the loading order of parts during packaging, directly affecting packaging efficiency). Under this premise, a three-dimensional packaging scheme is designed based on packaging space utilization and packaging material consumption rate. Digital twin technology is introduced to digitally map the entire production line, achieving dynamic simulation of the production process. This allows for the calculation of the utilization rate of each material in the initial scheme when order requirements are met, and serves as a simulation tool and collaborative optimization medium to adjust parameters in the production process (e.g., mapping the layout scheme to the input parameters of the packaging process, calculating packaging space utilization, center of gravity offset, and other indicators in real time). If the premise of full resource utilization is not met, a feedback adjustment phase is initiated. In this solution, the packaging evaluation indicators output by the virtual production line platform based on digital twin technology (such as space utilization rate <80% and center of gravity deviation exceeding the safety threshold) are used to adjust the layout, cutting, and packaging strategies in reverse. The multi-objective optimization algorithm balances the priority of various requirements through dynamic weight adjustment.
[0075] Reference Figure 2 The steps for constructing a virtual production line platform based on digital twin technology in this invention are as follows: Based on the selected equipment, digital models of individual machines and the workshop are established. For example, a laser cutting machine is set up at the pattern cutting station, and a conveyor belt connects the pattern cutting station and the packaging station, using RFID scanning for sequential tracking. The packaging station uses an intelligent packaging robot for packaging, and then a 3D scanner verifies the packaging effect. The individual machines are general-purpose 3D CAD models with a clear product structure. The moving parts of the individual machines can be independently represented and identified. 3D modeling of specialized equipment (classifying moving and stationary parts) is completed, as is the design of intermediate equipment (transmission links, buffer links). The entire production line is then virtually assembled on a 3D virtual design platform.
[0076] The virtual production line platform can complete equipment grabbing and transportation action inputs according to a predetermined layout and packaging plan, thereby forming a simulated chip transfer for offline simulation operation. Scripting languages are written on the simulation platform (virtual production line platform) to implement the processing actions of specialized equipment, such as cutting and clamping operations. Simultaneously, offline operation can be performed on the platform, and the generated data and models can be uploaded to the digital twin platform for simulation and optimization of the operation process in the virtual environment. The virtual production line built based on digital twin technology can simulate the entire process from layout to packaging completion. Trial operation results are generated for a determined production plan to evaluate whether it meets expectations, and parameters are adjusted based on production problem links in the virtual production line.
[0077] The two-dimensional nesting stage of this invention arranges two-dimensional parts (rectangular parts), quickly generating an initial solution through an improved greedy strategy, and then finely adjusting the solution using a local search algorithm to approximate the global optimum. Collision detection is performed during the nesting process to ensure that the positions of each part on the two-dimensional plane do not overlap and adhere to preset spatial constraints, such as minimum spacing and alignment requirements. (Refer to...) Figure 4 Specifically, step S2 includes the following:
[0078] S210: Set the part layout constraints (set the rectangular part r) i Rectangular part r i Located within the inner boundary of the sheet metal, avoid parts r i and r j The arrangement produces overlap, allowing rectangular parts r i Rotate and flip. The types of layout schemes for N parts are: θ represents the angular change of the rectangular part with each rotation, and the objective function for layout optimization is: The sheet metal has dimensions L×W, and the area of part i is A. i The total area of the parts is ;
[0079] S220: The parts are arranged in descending order of area. An improved greedy algorithm uses edge matching and corner filling strategies to place the parts on the sheet metal. After collision detection, the remaining space is updated. This process of placing parts, detecting collisions, and updating the remaining space is repeated until all parts are placed, generating an initial 2D nesting scheme. The core of the greedy algorithm is to select the best local solution at each step, gradually building a global solution. In the 2D rectangular nesting problem, the improved greedy algorithm maximizes the utilization of the sheet metal by prioritizing the placement of larger parts and combining rotation and flip operations.
[0080] S230: Based on the initial scheme of two-dimensional layout, a series of layout schemes are generated by adjusting the state of the parts. The neighborhood solution set of the initial scheme of two-dimensional layout is constructed. The material utilization rate of the new solution is calculated by neighborhood search. Based on the acceptance criterion, it is determined whether to accept the new solution. After iterative optimization, the optimal solution of the two-dimensional layout scheme is obtained.
[0081] For rectangular parts, translation and rotation operations are performed first, followed by selecting matching parts for double or opposite rows to reduce the complexity of the layout. The matching strategy refers to the following two approaches: Edge matching strategy – when placing parts using a greedy algorithm, priority is given to aligning the edges of the parts with the boundaries of already placed parts or sheet metal to reduce irregular gaps. Specifically, this involves calculating the matching degree (overlap length ratio) between the current part and adjacent edges, and prioritizing placement at positions with a matching degree >80%; Corner filling strategy – dynamically identifying L-shaped corner regions (formed by two adjacent boundaries) in the sheet metal, and prioritizing the rotation of smaller parts to fill these regions. A corner region library is established and updated in real time with available corner coordinates and dimensions.
[0082] More specifically, S220 includes:
[0083] S221 Part Sorting: The set of all rectangular parts to be sorted is denoted as... Each part has a corresponding area. The parts are sorted in descending order based on their area. The sorted sequence of parts is as follows: ,satisfy ,in yes The first in Each component is arranged in a specific order. This arrangement lays the foundation for prioritizing the use of sheet metal space when placing larger components later.
[0084] S222 Part Placement: Set the lower left corner of the sheet metal as the starting placement point. From the sorted parts sequence Take out the parts in sequence For parts Perform rotation and flipping operations;
[0085] Let the rotation angle be... The angle changes with each rotation. Then the set of angles after rotation is ,in , The flip operation is denoted as Including horizontal flipping and vertical flip For each combination of rotation angle and flipping operation, the part Try placing it on the board, and set the placement coordinates to... ;
[0086] Part placement is based on edge matching and corner filling strategies. The placement condition requires that the part be completely within the inner boundary of the sheet metal, i.e., for the sheet metal dimensions... ,have , , , , and These are the width and height of the part after it has been rotated or flipped.
[0087] S223 Collision Detection: Calculate the critical polygon (NFP) between each part and other parts, and calculate the internal critical polygon between the part and the sheet metal, denoted as... Storing this critical polygon information in a dictionary can save repetitive calculations. Using critical polygons for collision detection ensures that parts do not overlap; the principle behind this method is as follows: Figure 3 As shown, after part A is fixed, part B is rotated around part A for one revolution, ensuring that at least one reference point of part B contacts A but does not overlap with it. The trajectory formed by the reference points is the critical polygon of B relative to A, denoted as . At this point, the relationship between the reference point and the critical polygon is divided into three categories: inside—that is, part A and part B overlap; edge—part A and part B just touch; and outside—part A and part B move away from each other.
[0088] S224 Update Remaining Space: When Parts Successfully placed on the board Afterwards, update the remaining space of the board, according to Adjust the size and placement of the remaining space to define the boundaries. For example, if The width is The height is The remaining space after the update is in The available range of directions is ,exist The available range of directions is and This forms a new set of remaining space regions. This provides accurate information on the remaining space for the placement of subsequent parts.
[0089] S225: Repeat the steps of placing parts, collision detection, and updating remaining space until all parts are placed, generating an initial plan for the 2D nesting.
[0090] While the initial layout scheme generated using a greedy algorithm has some merit based on a greedy strategy, it may not be globally optimal and requires further optimization using a local search algorithm. Specifically, S230 includes:
[0091] S231 defines the neighborhood structure: Based on the initial scheme of two-dimensional nesting, a series of nesting schemes, i.e. neighborhood solutions, are generated by adjusting the state of the parts. The ways to adjust the state of the parts include exchanging the position of the parts, rotating the parts, and flipping the parts. The series of nesting schemes constructs the neighborhood solution set of the initial scheme of two-dimensional nesting.
[0092] For example, randomly select parts from the already arranged parts. and parts They can be swapped on the sheet metal; or the rotation angle of a part can be changed, assuming the original rotation angle of the part is... Rotate it to ( (This refers to the set angle change); it also allows for the flipping of a part, such as horizontal or vertical flipping. These operations generate a series of new nesting schemes, forming the neighborhood solution set of the current scheme.
[0093] S232 Neighborhood Search: Randomly select a new solution from the neighborhood solution set and calculate the material utilization rate of the new solution. Assuming the board size is The area of the part is The total area of the parts is Then the utilization rate of the board material , The calculation method is the same. The acceptance criteria are set as follows: ;
[0094] If the new solution is the board utilization rate The plate utilization rate is greater than the current solution. This indicates that the new solution is better, so we should accept the new solution directly and replace the current layout scheme with it; if Then a random number between 0 and 1 is generated. ,calculate , For temperature parameters, It will gradually decrease with the number of iterations, when If the condition for acceptance is not met, the new solution is still accepted; this is to avoid the algorithm getting stuck in local optima and to give the algorithm the opportunity to explore a wider solution space. If the acceptance condition is not met, the new solution is discarded, and other new solutions are selected from the neighborhood solution set for further evaluation.
[0095] S232 Iterative Optimization: Repeat the steps of neighborhood search and acceptance criterion judgment to continuously update the current layout scheme;
[0096] In each iteration, the temperature parameter Gradually decrease (e.g., using the neighborhood operation "corner swap": swap the positions of two corner-filled parts), as Get smaller The value of will also decrease, the probability of accepting inferior solutions will gradually decrease, and the algorithm will be more inclined to accept better solutions. During the iteration process, the part movement schemes that have recently failed to optimize are recorded. When the preset termination condition is reached, the iteration stops, and the optimal solution of the two-dimensional nesting scheme is obtained. This scheme also introduces a tabu search mechanism: recording the part movement schemes that have recently failed to optimize to avoid repeated searches. When the preset termination condition is reached, such as the number of iterations reaching the upper limit or the objective function value changing very little in multiple iterations (less than a certain set threshold), the iteration stops, and the nesting scheme obtained at this time is the result optimized by the local search algorithm.
[0097] The "piece-layout sequence" determined by the layout scheme directly impacts packaging efficiency. After the part cutting order is determined during the layout stage, the piece-layout sequence dictates the loading order of the parts during packaging. For example, prioritizing the cutting of large parts may require the bottom layer to support heavier items during packaging, potentially causing a shift in the center of gravity if not planned in advance. The two-dimensional layout of parts in the layout (such as rotation angle and spacing) determines their three-dimensional shape characteristics, thus affecting the spatial matching during packaging. For instance, if the layout direction of rectangular parts does not consider the stability of three-dimensional loading, it may require additional cushioning material during packaging, wasting space. Therefore, collaborative optimization of the three-dimensional packaging scheme is necessary.
[0098] 3D packing can be viewed as a three-dimensional bin packing problem (3D-BPP). This method employs a modular, layered strategy with a fixed chip sequence, and the main algorithm framework uses a tree search algorithm. After determining the shape and size of the parts during the nesting stage, 3D packing simulation begins. A virtual 3D space model (such as a warehouse, storage space, or transportation vehicle) is used to map the arranged 2D parts into 3D space. During packing, spatial constraints (such as physical space limitations, center of gravity distribution, and transportation paths) are considered, and the position of the items in 3D space is optimized to ensure both loading requirements are met and space utilization is maximized. Specifically, S3 includes:
[0099] S310: Set part packaging constraints, rectangular part packaging constraints: (Set rectangular part r i )
[0100] 1) Rectangular part r i The dimensions and weight meet the packaging limits, the mass is uniform, and its geometric center is the center of gravity.
[0101] 2) Parts must not be suspended in the air; they must be placed stably.
[0102] 3) The order of parts placement is fixed and will be based on the transfer after the layout is completed;
[0103] 4) Different packages should be arranged from bottom to top according to their load-bearing capacity and size;
[0104] 5) After packaging, ensure the center of gravity is near the geometric center;
[0105] 6) All parts have the same height H (the packing space is divided into layers along the height direction).
[0106] The objective function for packaging optimization (i.e., the average container space utilization) is: , This refers to the number of packing boxes that can be loaded. For packaging boxes Maximum load capacity, It is the height of a single part. It is a module The length, It is a module width, It is the length of part g. It is the width of part g. For the first Each module contains a set of part indexes;
[0107] definition :if , indicating module Loaded in packaging boxes Inside, and For module The coordinates of the bottom left corner of the packaging. For module The coordinates of the upper right corner; if This indicates a module. Not loaded in the packaging box Inside;
[0108] If the content is defined, specify the dimensions and weight information, and calculate the weight of each part. The number of allowed placement orientations is determined, and the stacking layers of all parts are initialized. It is 0.
[0109] Since all parts have the same height (denoted as...) The 3D packaging problem can be transformed into a 2D planar layout problem, but it requires layering (each layer has a height of...). We process parts in the order of chip fabrication and employ a block strategy. Each module consists of multiple parts arranged in a rectangular shape on a two-dimensional plane. Modules are placed layer by layer in a container, with multiple modules (arranged horizontally) on the same layer. Once a layer is full, the next layer is placed next. This strategy significantly reduces geometric complexity and facilitates subsequent layer stacking and spatial calculations. Each module has the following properties:
[0110] length (The sum of the lengths of the included parts is less than the length of the packaging box)
[0111] width (The maximum width of the included parts is less than the width of the packaging box)
[0112] high (Fixed module height and total height less than packaging box height)
[0113] Stability control: When modules are stacked in layers, the overall stability is considered to be achieved when the overlap area between upper and lower layers is greater than 80%.
[0114] S320: Multiple parts are arranged in a rectangular module on a two-dimensional plane. The modules are placed in layers inside the packaging box, with multiple modules in each layer. The modules are stacked layer by layer inside the packaging box. According to the transfer order after the two-dimensional layout, the unloaded parts are transferred one by one. Add to the current module sequentially;
[0115] The optimal solution is obtained using tree search, and the value function is: α and β are weighting coefficients; Conditions for using the packaging box: .
[0116] The core decision-making process for 3D packing is implemented using an explicit tree search algorithm framework. This framework constructs the packing problem as a search tree, systematically enumerating and evaluating possible part placement sequences and orientations to ultimately find a high-quality solution. Specifically, step S320 includes:
[0117] S321: Obtain the current node status, including the remaining space outline of the current packaging box, the currently formed set of modules, and the sequence of remaining unpacked parts. Following the transmission order after the 2D nesting, load the unpacked parts one by one. Add parts sequentially to the current module; the module's width and length are determined by the two-dimensional arrangement of the added parts (strictly smaller than the box's width and length), and its height is fixed at H. For parts... Each possible placement orientation (total) (type), calculate the length of its outer envelope rectangle in this placement direction. ,Width and high For packaging boxes Middle module Calculate the length of the minimum bounding rectangle of the remaining space. ,Width and high At the same time, record the shape characteristics of the remaining space (such as whether it is a regular cuboid, whether there are obvious narrow regions, etc.).
[0118] S322: According to the parts The outer envelope rectangle and module under a certain orientation Calculate the shape matching degree based on the difference in length, width, and height ratios of the minimum bounding rectangle of the remaining space: if the part The ratios of the length, width, and height of the outer envelope rectangle to the length, width, and height of the minimum bounding rectangle of the remaining space are respectively , , Shape matching degree is defined as , The closer to 1, the higher the shape matching degree, and all shapes are retained. The placement position is used as a candidate action. Each candidate action (part i, direction d, position (x, y, z)) will generate a potential child node, which is a candidate node.
[0119] Backtracking nodes, pruning and filtering candidate nodes, calculating the value function of candidate nodes, generating modules and loading them into the packaging box, performing space compression and value function evaluation;
[0120] To control search complexity, this scheme employs the following pruning strategies: ① Nodes that fail the feasibility check are immediately pruned; ② If the space utilization of the current node is lower than a certain threshold of the maximum utilization of the known feasible solution, the branch is abandoned; ③ Visited states (such as the same set of parts and similar layouts) are recorded using a hash table to avoid repeated searches.
[0121] Backtracking nodes: If a node is fully expanded (all child nodes have been searched or pruned) or the maximum search depth has been reached, the algorithm backtracks to its parent node; when a complete feasible solution is found (all parts are loaded), the objective function value (space utilization) of the solution is recorded; if the search time exceeds the preset limit or a satisfactory solution is found, the search is terminated, and the best loading scheme found is output.
[0122] Space compression is applied to the initial loading scheme: In the virtual environment, the parts have physical properties. At this time, space compression is applied based on the physics engine, and the space is shaken and squeezed to make the parts fit better. The module is checked for displacement or overturning to verify the actual stability. After sorting, a collision detection algorithm based on axis-aligned bounding boxes / orientation bounding boxes (AABB / OBB) is used to identify gaps in the remaining space of the packaging box. If subsequent parts can be inserted and the stability constraints are met (overlap area ≥ 80%, center of gravity offset meets the standard), the loading scheme of the packaging box is updated.
[0123] The constraints of 3D packaging include "parts cannot be suspended in mid-air, and the overlap area between upper and lower layers is greater than 80%". The coordinates of the upper right corner can help verify the stacking stability.
[0124] Module volume calculation: Module volume (The length, width, and height are obtained directly from the difference between the two diagonal coordinates, and then the volume is calculated.)
[0125] When modules are stacked, the bottom left rear corner of the uppermost module and the upper right corner It needs to be within the spatial range of the lower-level module. Calculate the overlapping area:
[0126] Overlap length = ;
[0127] Overlap width = ;
[0128] Overlap area = overlap length × overlap width.
[0129] If the overlapping area is the same as the bottom area of the upper module If the ratio is greater than 80%, the stability constraint is satisfied; otherwise, it is judged as "suspended risk" and the position of the upper module needs to be adjusted.
[0130] S323: Place the parts Modules packed into the box After selecting a candidate action, the system checks in virtual 3D space whether it is completely inside the packaging box boundary, whether it interferes with all placed parts or modules (using the Axis-Aligned Bounding Box (AABB) fast collision detection algorithm), and whether it meets stability constraints (lower support area ≥ 80%) and weight limits. If all conditions are met, the part is placed... Packed into boxes , that is to say Update module The remaining space (length, width, height dimensions, and shape characteristics of the remaining space) and the total weight of the loaded parts are considered, and it is also determined whether to move the module. The stacking layer number is incremented by 1, and it is determined whether excessively small modules need to be merged. If neither of the above conditions is met, the next packaging box is activated. Packet activation conditions are: .
[0131] Using the tree search framework described above, the algorithm can systematically explore the vast combination space of loading order, part orientation, and placement, thereby finding a 3D packing scheme that achieves a good balance between space utilization and stability.
[0132] Simulations were performed on the two-dimensional layout and three-dimensional packaging schemes obtained from S2 and S3. (Refer to...) Figure 1In step S4, the cutting module, conveying module and packaging module of the virtual production line platform execute the plate cutting, wafer transportation and wafer packaging loading process, monitor the packaging space utilization rate and center of gravity offset data in real time, and generate a visual preview of the loading effect.
[0133] The virtual production line platform dynamically simulates the production process: It uses scripting languages to drive virtual equipment to perform actions such as cutting, gripping, and transporting, simulating the chip transfer process. For example, after the layout plan is determined, the virtual production line can simulate the entire process of chips entering the packaging stage in sequence, monitoring the loading order and space occupancy of parts in three-dimensional space in real time. Digital twins serve as a collaborative optimization medium: Through virtual production line simulation, the layout plan is mapped to the input parameters of the packaging process, calculating indicators such as packaging space utilization and center of gravity offset in real time. For example, in the digital twin platform, after inputting the chip layout order, the three-dimensional space fill rate under different loading sequences can be simulated, generating a visual preview of the loading effect. Optimization scheme verification: The digital twin platform simulates and verifies optimization schemes to ensure their feasibility and effectiveness.
[0134] Reference Figure 1 The parameters of the problematic production stages in the virtual production line are adjusted accordingly. Specifically, in step S5, a particle swarm optimization algorithm based on Pareto objectives collaboratively optimizes the two-dimensional nesting scheme and the three-dimensional packaging scheme. The optimization objectives include maximizing the utilization rate of the two-dimensional nesting and maximizing the utilization rate of the three-dimensional packing space. The Pareto optimization objective is... ,in, , , .
[0135] More specifically, step S5 includes:
[0136] S510: Set Pareto optimization goals: The fitness function is designed as follows: ,in It is the dynamic weight of the target;
[0137] The combination of the two-dimensional nesting scheme and the three-dimensional packing scheme generated in steps S2 and S3 can be encoded into a vector of solutions, i.e., particles. ; in, This provides the two-dimensional planar layout information for part i. Let i be the height of part i in three-dimensional space. The number of packaging boxes used;
[0138] In Pareto-based particle swarm optimization algorithms, when faced with different production order demands, the objective is to find a balanced solution among them, such that no single objective can be further optimized without sacrificing other objectives. To achieve this, dynamic weights are introduced: based on the characteristics of the orders, the initial weights can be set to a uniform distribution, for example... In each iteration, the weights are dynamically adjusted based on the distribution of the current solution set. If the optimization of a certain objective is progressing slowly, its weight is increased; conversely, if the optimization of a certain objective is progressing rapidly, its weight is decreased.
[0139] S520: Determine the particle swarm size, with each particle representing a two-dimensional nesting pattern and a corresponding three-dimensional bin packing scheme; initialize particle positions and velocities, and simultaneously initialize the historical best position of each particle. (Initial position is the particle's own initial position) and the global optimal position (Initially, a particle position is randomly selected); set the particle swarm optimization algorithm parameters, including inertia weights. Initially set to 0.9, learning factor and Initially set to 2; maximum number of iterations It is determined based on the complexity of the problem and the computational resources.
[0140] In this process, the combination scheme for each particle is the initial solution generated before participating in the collaborative optimization adjustment. This initial solution is generated in steps S2 and S3. After simulation testing using digital twin technology, multiple preliminary schemes will emerge, some satisfying and some not meeting the basic expectations. If the basic expectations are not met, optimization is required. The frontier results generated with the Pareto objective are obtained by changing the tendency of the nesting and packing schemes under set weights, thereby altering the generation of the initial solution.
[0141] S530: Compare each particle with the particles in the current Pareto front; if particle A has a higher 2D packing utilization rate than particle B and a higher 3D binning space utilization rate than particle B, or if particle A is superior to particle B in one objective and not inferior to particle B in another objective, then particle A dominates particle B; if particle A is not dominated by any particle in the current Pareto front, but can dominate some particles in the front, then add particle A to the Pareto front and remove the particles dominated by it, ensuring that it only contains non-dominated solutions.
[0142] S540 Particle Update:
[0143] According to the formula Update particle velocity, and yes Random numbers are generated randomly; based on the updated speed, a formula is used. Update particle positions; when updating particle positions, ensure that the new positions meet actual production constraints, such as non-overlapping 2D nested parts and non-exceeding packing boundaries in 3D packing. If constraints are not met, correct or regenerate the positions.
[0144] S550 compares the current fitness values of all particles with the global optimal position. The fitness value, if any particle has a fitness value better than ,renew The position of the particle is determined by prioritizing the selection of the globally optimal position from the Pareto front, guiding the particle swarm to search towards the Pareto optimal solution.
[0145] S560 determines whether the current iteration count has reached the preset maximum iteration count. If the desired fitness is achieved, the iteration terminates; otherwise, the iteration returns to recalculate the fitness and continues to the next iteration; the final Pareto front result is output. This result contains a series of nondominated solutions under two-dimensional nesting utilization and three-dimensional packing space utilization (and some packaging quantities).
[0146] When applying the method of this invention, a solution is selected from the Pareto frontier based on actual production needs and preferences. If space costs are high, and the focus is on the utilization rate of three-dimensional packing space, a solution with high three-dimensional packing space utilization and satisfactory two-dimensional layout utilization is selected; if material costs are critical, a solution with high two-dimensional layout utilization is preferred.
[0147] Accordingly, the present invention also provides a layout and packaging collaborative optimization system based on digital twins, the system being used to implement the above-mentioned layout and packaging collaborative optimization method based on digital twins;
[0148] The system includes a simulation module, a two-dimensional nesting module, a three-dimensional packaging module, and a feedback adjustment module;
[0149] The simulation module is equipped with a virtual production line platform based on digital twin technology. The simulation module is used to map the two-dimensional layout scheme into the input parameters of the packaging process according to the input two-dimensional layout scheme and three-dimensional packaging scheme, simulate the whole process from layout to packaging, monitor the packaging indicators in real time, and output simulation evaluation data.
[0150] The two-dimensional nesting module is equipped with an improved greedy strategy algorithm model. The improved greedy strategy algorithm model is used to place parts through edge matching strategy and corner filling strategy. After repeated collision detection and updating of the remaining space, an initial solution for two-dimensional nesting is generated. The local search algorithm equipped in the two-dimensional nesting module constructs a neighborhood solution set based on the initial solution, and repeatedly performs neighborhood search and acceptance criterion judgment to obtain the optimal solution of the two-dimensional nesting scheme.
[0151] The three-dimensional packaging module is used to generate the chip sequence based on the optimal solution of the two-dimensional nesting scheme, and packs the chips using a modular layering strategy with a fixed chip sequence. Then, the optimal solution is obtained through the tree search algorithm carried by the three-dimensional packaging module.
[0152] The feedback adjustment module determines whether the expected indicators are met by simulating evaluation data. If they are met, the final two-dimensional layout and three-dimensional packaging schemes are determined. If they are not met, the layout and packaging schemes are optimized by feedback. The Pareto-based particle swarm optimization algorithm on the feedback adjustment module is used to collaboratively optimize the two-dimensional layout and three-dimensional packaging schemes. The two-dimensional layout and three-dimensional packaging schemes are updated according to the optimization results, and the updated two-dimensional layout and three-dimensional packaging schemes are input into the virtual production line platform for evaluation again.
[0153] The system of this invention is connected to the MES system or execution engine to complete the design of order layout and packaging schemes and actual production control.
[0154] Other components and operations of the layout and packaging collaborative optimization method and system based on digital twins according to embodiments of the present invention are known to those skilled in the art and will not be described in detail here.
[0155] In the description of this specification, references to terms such as "embodiment," "example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0156] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A digital-twin-based layout and packing collaborative optimization method, characterized in that, The method comprises the following steps: S1: Constructing a virtual production line platform based on digital twin technology, the virtual production line platform comprising a cutting module, a conveying module and a packaging module; S2: Two-dimensional layout scheme: an improved greedy strategy places parts through an edge matching strategy and a corner filling strategy, and generates an initial scheme of two-dimensional layout through repeated collision detection and updating of remaining space; a local search algorithm constructs a neighborhood solution set based on the initial solution, repeatedly performs field search and receives a criterion judgment to obtain an optimal solution of the two-dimensional layout scheme; S3: Three-dimensional packaging scheme: generating a flow sheet order based on the optimal solution of the two-dimensional layout scheme, packing through a modular layered strategy with a fixed flow sheet order, and obtaining the best scheme based on tree search; S4: Simulation: inputting the two-dimensional layout scheme obtained in step S2 and the three-dimensional packaging scheme obtained in step S3 into the virtual production line platform, mapping the two-dimensional layout scheme as an input parameter of the packaging process, simulating the whole process from layout to packaging, monitoring packaging indicators in real time, and outputting simulation evaluation data; S5: Feedback adjustment: judging whether the expected indicators are met through simulation evaluation data, determining the final two-dimensional layout scheme and three-dimensional packaging scheme if the expected indicators are met, and performing feedback optimization of the layout scheme and the packaging scheme if the expected indicators are not met, cooperatively optimizing the two-dimensional layout scheme and the three-dimensional packaging scheme based on a Pareto objective particle swarm dynamic optimization algorithm, updating the two-dimensional layout scheme and the three-dimensional packaging according to the optimization result, and inputting the updated two-dimensional layout scheme and the three-dimensional packaging into the virtual production line platform again for evaluation; S6: Repeating the feedback adjustment and the simulation until it is judged whether the expected indicators are met through simulation evaluation data.
2. The method of claim 1, wherein, The step S2 comprises: S210: Set the part layout constraint condition, the layout scheme category of N parts is , θ represents the angle change of each rotation of the rectangular part, the target function of the layout optimization is , the size of the plate is L×W, the area of part i is A i , and the total part area is ; S220: arranging the parts in descending order according to the area size, placing the parts on the board through an improved greedy algorithm through an edge matching strategy and a corner filling strategy, updating the remaining space after collision detection, and repeating the steps of part placement, collision detection and remaining space updating until all parts are placed, to generate an initial scheme of two-dimensional layout; S230: generating a series of layout schemes by adjusting the part state based on the initial scheme of two-dimensional layout, constructing a neighborhood solution set of the initial scheme of two-dimensional layout, calculating the board utilization rate of the new solution through neighborhood search, judging whether to accept the new solution based on the acceptance criterion, and obtaining the optimal solution of the two-dimensional layout scheme after iterative optimization.
3. The method of claim 2, wherein, The S220 comprises: S221 part ordering: all rectangular parts to be arranged are denoted as , each part has a corresponding area , the parts are sorted in descending order according to the area, and the sorted part sequence is , satisfying , where is the th part in ; S222 part placement: set the left lower corner of the plate as the starting placement point , sequentially take out parts from the sorted part sequence , and perform rotation and flipping operations on the parts . Let the rotation angle be , and the angle change each time be , then the angle set after rotation is , where , , the flip operation is recorded as , including horizontal flip and vertical flip , for each part after combination of rotation angle and flip operation , try to place on the board, and the placement position coordinates are set as ; The part placement is based on an edge matching strategy and a corner filling strategy, and a placement condition needs to satisfy that the part is completely within the internal boundary of the plate, i.e. for the plate size , , , , , and are the width and height of the part after rotation or flipping, respectively; S223 collision detection: calculate the NFP of each part with other parts, and calculate the inner NFP of the part with the plate, denoted as ; S224 update the remaining space: when the part is successfully placed on the board at the position , update the remaining space of the board, adjust the boundary of the remaining space according to the size and the placement position; S225: repeating the steps of part placement, collision detection and remaining space updating until all parts are placed, to generate an initial scheme of two-dimensional layout.
4. The method of claim 3, wherein, The S230 comprises: S231 defining neighborhood structure: generating a series of layout schemes, i.e. neighborhood solutions, by adjusting the part state based on the initial scheme of two-dimensional layout, the ways of adjusting the part state including exchanging part positions, part rotation and part flipping, and the series of layout schemes constructing a neighborhood solution set of the initial scheme of two-dimensional layout; S232 neighborhood search: randomly select a new solution from the neighborhood solution set, calculate the panel utilization rate of the new solution , set the acceptance criterion as ; If the new solution's material utilization is greater than the current solution's material utilization , it means the new solution is better, so accept the new solution directly and replace the current layout scheme with the new solution; if , generate a random number between 0 and 1 , calculate , , , which is a temperature parameter, when , still accept the new solution; S232 iterative optimization: repeating the steps of neighborhood search and acceptance criterion judgment, and continuously updating the current layout scheme; In each iteration, the temperature parameter is gradually reduced, and the probability of accepting worse solutions is gradually reduced as the value of the temperature parameter is reduced; the part movement scheme that recently failed to optimize is recorded during the iteration process, and when the preset termination condition is reached, the iteration is stopped, and the optimal solution of the two-dimensional layout scheme is obtained.
5. The method of claim 1, wherein, The S3 comprises: S310: Set the constraints for parts packaging; the objective function for packaging optimization is: , This refers to the number of packing boxes that can be loaded. For packaging boxes Maximum load capacity, It is the height of a single part. It is a module The length, It is a module width, It is the length of part g. For the first Each module contains a set of part indexes; Definition : If , represents a module that is stowed in a packaging box , and is the left lower back corner coordinate of the module in the packaging, is the right upper front corner coordinate of the module ; if , represents a module that is not stowed in a packaging box ; S320: The plurality of parts are arranged to form rectangular modules in a two-dimensional plane, the modules are placed in layers in the packaging box, a plurality of modules are placed in each layer, and the modules are stacked layer by layer in the packaging box; according to the transmission order after two-dimensional arrangement, the parts not loaded are sequentially added to the current module one by one; modules; The best scheme is obtained based on tree search, and a value function is: α and β are weight coefficients; and the enabling condition of the packing box is: .
6. The method of claim 5, wherein, The step S320 comprises: S321: according to the transmission order after two-dimensional layout, the unloaded parts are loaded one by one sequentially add the current module; for each possible placement direction of the part , calculate its outer envelope rectangular size length , width and height , for the module in the packing box , calculate the minimum circumscribed rectangular size length , width and height of the remaining space, and record the shape characteristics of the remaining space; S322: According to the part The outer envelope rectangle in a certain placement direction and the module The height ratio difference of the minimum circumscribed rectangle of the remaining space, calculate the shape matching degree: if the part The length, width and height of the outer envelope rectangle and the length, width and height of the minimum circumscribed rectangle of the remaining space are , , The shape matching degree is defined as , The closer to 1, the higher the shape matching degree, and all The placement position is reserved as a candidate action, and each candidate action will generate a potential child node, which is a candidate node; Backtracking nodes, pruning and screening candidate nodes, calculating the value function of the candidate nodes, generating modules and loading into the packaging box, spatial compression and value function evaluation; S323: Place the parts Modules packed into the box Then, in virtual 3D space, check whether it is completely inside the packaging box boundary, whether it interferes with all placed parts or modules, and whether it meets stability constraints. If all conditions are met, then the parts are placed... Packed into boxes , that is to say Update module The remaining space and the total weight of the loaded parts are considered, and it is also determined whether to move the module. The stacking layer number is incremented by 1, and it is determined whether excessively small modules need to be merged. If neither of the above conditions is met, the next packaging box is activated. Packet activation conditions are: .
7. The method of claim 1, wherein, In the step S4, the cutting module, conveying module and packing module of the virtual production line platform perform plate cutting, wafer conveying and wafer packing and loading processes, and real-time monitoring of the packing space utilization rate and the center of gravity offset data is performed to generate a visual loading effect preview.
8. The method of claim 1, wherein, In the step S5, the Pareto objective-based particle swarm dynamic optimization algorithm cooperatively optimizes the two-dimensional layout scheme and the three-dimensional packaging scheme, the optimization objectives include the maximum utilization of the two-dimensional layout and the maximum space utilization of the three-dimensional packing, and the Pareto optimization objective is wherein, , , .
9. The method of claim 8, wherein, The step S5 includes: S510: Set the Pareto optimization goal: , the fitness function is designed as , wherein is the dynamic weight of the target; The combination of the two-dimensional layout scheme and the three-dimensional packing scheme generated in the steps S2 and S3 can be encoded as a solution vector, i.e., a particle: ; wherein, is two-dimensional plane arrangement information of the part i, is a height of the part i in a three-dimensional space, is the number of packaging boxes used; S520: determine the particle swarm size, each particle represents a two-dimensional layout and a corresponding three-dimensional packing combination scheme; initialize the particle position and velocity, and initialize the historical optimal position of each particle and the global optimal position ; set the particle swarm optimization algorithm parameters, inertia weight initially set to 0.9, learning factor and initially set to 2; S530: Compare each particle with the particles in the current Pareto front; if the two-dimensional layout utilization rate of particle A is greater than that of particle B and the three-dimensional packing space utilization rate is greater than that of particle B, or particle A is superior to particle B in a certain target and is not inferior to particle B in another target, then particle A dominates particle B; if particle A is not dominated by any particle in the current Pareto front and can dominate part of the particles in the front, then particle A is added to the Pareto front, and the particles dominated by it are removed, ensuring that only non-dominated solutions are included in the front; S540 particle update: According to the formula updating the particle velocity, and is a random number between 0 and 1; according to the updated velocity, the particle position is updated using the formula updating the particle position; when updating the particle position, it is ensured that the new position meets the actual production constraints, and if the constraints are not met, the position is corrected or regenerated. S550 compare all particle current fitness value with global optimal position If there is a particle fitness value better than , update as the particle position; preferentially select the global optimal position from the Pareto front, guide the particle swarm to search in the direction of the Pareto optimal solution; S560 judges whether the current iteration number reaches the pre-set maximum iteration number If yes, the iteration is terminated; otherwise, the fitness is recalculated to continue the next iteration, and the final Pareto front result is output.
10. A digital-twin-based nesting and packing co-optimization system, characterized in that, The system is used to implement the layout and packing collaborative optimization method based on digital twinning according to any one of claims 1-9; The system includes a simulation module, a two-dimensional layout module, a three-dimensional packing module and a feedback adjustment module; The simulation module is loaded with a virtual production line platform based on digital twinning technology, and the simulation module is used to map the two-dimensional layout scheme to the input parameters of the packing process according to the input two-dimensional layout scheme and three-dimensional packing scheme, simulate the whole process from layout to packing, real-time monitor the packing indicators, and output simulation evaluation data; The two-dimensional layout module is loaded with an improved greedy strategy algorithm model, which is used to place parts through edge matching strategy and corner filling strategy, generate an initial scheme of two-dimensional layout through repeated collision detection and update of remaining space; the local search algorithm loaded in the two-dimensional layout module is based on the initial solution to construct a neighborhood solution set, repeatedly perform field search and receive criterion judgment, and obtain the optimal solution of the two-dimensional layout scheme; The three-dimensional packing module is used to generate wafer order based on the optimal solution of the two-dimensional layout scheme, and the best scheme is obtained through the tree search algorithm loaded in the three-dimensional packing module after modular layered strategy with fixed wafer order is performed; The feedback adjustment module determines whether the expected indicators are met through simulation evaluation data, and if so, determines the final two-dimensional layout scheme and three-dimensional packing scheme, and if not, performs feedback optimization of the layout scheme and the packing scheme; the particle swarm dynamic optimization algorithm based on Pareto objective loaded in the feedback adjustment module collaboratively optimizes the two-dimensional layout scheme and the three-dimensional packing scheme, and updates the two-dimensional layout scheme and the three-dimensional packing according to the optimization result, and inputs the updated two-dimensional layout scheme and three-dimensional packing into the virtual production line platform again for evaluation.
Citation Information
Patent Citations
Profile principal component analysis feature extraction-based two-dimensional profile layout method
CN107609704A
Method for integrating and optimizing plate type product cut and blanking, box dividing and rack dividing
CN109118002A
Digital twinning system for complex product assembly line
CN111413887A
Two-dimensional irregular part layout method based on optimal foraging algorithm
CN111985012A
Metal structural part layout and cutting scheduling collaborative optimization method based on two-stage model
CN118691421A