A method and system for collaborative optimization of nesting and packing based on digital twinning
Patent Information
- Application Number
- CN202511608698.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2045-11-05
AI Technical Summary
现有技术中,排样优化和打包优化常常没有进行有效的协同,导致整体资源利用效率低下,特别是在考虑打包时剩余空间和浪费时,往往未能兼顾两者的相互影响,一旦排样方案设计完成,缺乏有效的反馈调节手段,最终打包效果是否符合订单需求和资源消耗的预期无法保证
[0063]本方法依托数字孪生技术,针对二维零件排样优化以及三维打包优化问题,提出将排样和打包进行协同优化,从而提高材料利用率,减少浪费。通过建立虚拟的柔性标准化的自动生产线,模拟运行从切割下料,到排样打包的生产流程,即通过数字孪生的仿真手段,提出基于数字孪生的反馈调节机制,通过虚拟仿真实现排样与打包的协同迭代优化。,形成"排样→仿真→反馈→优化"的自动迭代。本方法能针对不同订单的需求,在进行排样方案设计时通过虚拟反馈的打包效果(打包的评价指标)来综合优化。从独立考虑排样环节原材料利用率的优化,到综合考虑打包空间利用率以及包装成本的降低,预测资源的竞争状况,减少由于产线中的扰动因素所造成的浪费。
Smart Images

Figure CN121638531B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital twin application technology, and in particular to a method and system for collaborative optimization of layout and packaging based on digital twins. Background Technology
[0002] The development of the manufacturing industry has led to a gradual diversification and customization of the demand for manufactured products. The electronics manufacturing industry exhibits typical characteristics of "multi-specification, small-batch" production, which has also significantly changed the production organization methods in the workshop: frequent changes in the production models and specifications have become the norm, and the demand for flexibility in the production process has become increasingly prominent. Flexibility has become a core technical requirement for smart workshops. Similar production characteristics have also appeared in industries such as mold making, customized equipment, and personalized furniture. The production equipment in these industries must have a high level of processing flexibility. Through flexible tooling and processing code parameterization and other technical means, 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 product integration and rapid product updates are also prominent characteristics, thus posing a challenge of frequent production changes. Besides requiring high flexibility in production resources (such as manpower), workshop production organization and scheduling must also be able to respond quickly to changes, dynamically scheduling based on the structural characteristics of ordered products and corresponding processing or assembly tasks to ensure optimal allocation of production resources, thereby improving production efficiency and maximizing capacity release. In traditional production models, layout and packaging mainly revolve around mass production, employing fixed layout methods and standardized packaging. However, in today's personalized production environment, layout and packaging must not only adapt to the characteristics of multi-variety, small-batch production but also possess high flexibility to cope with rapid changes in production and market demand.
[0004] Two-dimensional rectangular parts layout problems primarily arise in manufacturing, especially in the production process of cutting sheet metal, such as metal, wood, and plastic sheets. The goal is to rationally arrange multiple parts cut from a given two-dimensional raw material (such as rectangular or other shaped sheets) to maximize material utilization while avoiding waste. Three-dimensional packaging problems typically occur in parts loading, warehousing, and logistics management. The aim is to optimize loading and transportation efficiency through rational stacking and space utilization. Specifically, three-dimensional packaging refers to packing items of different sizes, shapes, and weights into three-dimensional containers (such as boxes, trucks, and warehouse space), with the goal of maximizing space utilization, minimizing gaps, and ensuring the stability and safety of the items.
[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: Repeatedly adjust the feedback and simulation until the simulation evaluation data meets the expected indicators.
[0015] Furthermore, step S2 includes:
[0016] S210: Set the layout constraints for the parts; the 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 ;
[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. The acceptance criterion is used to determine 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 board 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] S233 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 width 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 packaging 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 processes of cutting sheet metal, transporting wafers, and packaging and loading wafers, 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.
[0048] ;
[0049] 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;
[0050] 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 the 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.
[0051] 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.
[0052] S540 Particle Update:
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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;
[0057] The system includes a simulation module, a two-dimensional nesting module, a three-dimensional packaging module, and a feedback adjustment module;
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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.
[0062] The technical solution provided by this invention may include the following beneficial effects:
[0063] 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
[0064] Figure 1 This 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;
[0065] Figure 2 This is a flowchart of the operation of the virtual production line platform;
[0066] Figure 3 This is a schematic diagram of the critical polygon (NFP) in a two-dimensional nesting scheme;
[0067] Figure 4 This is a flowchart of the 3D packaging solution optimization. Detailed Implementation
[0068] 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.
[0069] 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:
[0070] 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;
[0071] 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.
[0072] 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.
[0073] 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.
[0074] 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.
[0075] S6: Repeatedly adjust the feedback and simulation until the simulation evaluation data meets the expected indicators.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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:
[0080] 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 ;
[0081] 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.
[0082] 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. The acceptance criterion is used to determine whether to accept the new solution. After iterative optimization, the optimal solution of the two-dimensional layout scheme is obtained.
[0083] 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.
[0084] More specifically, S220 includes:
[0085] 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.
[0086] 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;
[0087] 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... ;
[0088] 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.
[0089] 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 – that is, part A and part B just touch; and outside – that is, part A and part B move away from each other.
[0090] 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.
[0091] 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.
[0092] 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:
[0093] 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.
[0094] 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.
[0095] S232 Neighborhood Search: Randomly select a new solution from the neighborhood solution set and calculate the board 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: ;
[0096] 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.
[0097] S233 Iterative Optimization: Repeat the steps of neighborhood search and acceptance criterion judgment to continuously update the current layout scheme;
[0098] 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.
[0099] 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.
[0100] 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:
[0101] S310: Set part packaging constraints, rectangular part packaging constraints: (Set rectangular part r i )
[0102] 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.
[0103] 2) Parts must not be suspended in the air; they must be placed stably.
[0104] 3) The order of parts placement is fixed and will be based on the transfer after the layout is completed;
[0105] 4) Different packages should be arranged from bottom to top according to their load-bearing capacity and size;
[0106] 5) After packaging, ensure the center of gravity is near the geometric center;
[0107] 6) All parts have the same height H (the packing space is divided into layers along the height direction).
[0108] 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;
[0109] 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;
[0110] If defined, specify dimensions and weight information. 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.
[0111] 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:
[0112] length (The sum of the lengths of the included parts is less than the length of the packaging box)
[0113] width (The maximum width of the included parts is less than the width of the packaging box)
[0114] high (Fixed module height and total height less than packaging box height)
[0115] 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%.
[0116] 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;
[0117] The optimal solution is obtained using tree search, and the value function is: α and β are weighting coefficients; Conditions for using the packaging box: .
[0118] 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:
[0119] 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.).
[0120] 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.
[0121] 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;
[0122] 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.
[0123] 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.
[0124] 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.
[0125] 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.
[0126] 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.)
[0127] 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:
[0128] Overlap length = ;
[0129] Overlap width = ;
[0130] Overlapping area = Overlapping length × Overlapping width.
[0131] 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.
[0132] S323: Place the parts Modules packed into the packaging 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: .
[0133] 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.
[0134] 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.
[0135] 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.
[0136] 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, , , .
[0137] More specifically, step S5 includes:
[0138] S510: Set Pareto optimization goals: The fitness function is designed as follows: ,in It is the dynamic weight of the target;
[0139] 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.
[0140]
[0141] 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;
[0142] 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.
[0143] S520: Determine the particle swarm size, where each particle represents 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.
[0144] 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.
[0145] 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.
[0146] S540 Particle Update:
[0147] 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.
[0148] 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.
[0149] 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).
[0150] 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.
[0151] 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;
[0152] The system includes a simulation module, a two-dimensional nesting module, a three-dimensional packaging module, and a feedback adjustment module;
[0153] 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.
[0154] 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.
[0155] 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.
[0156] 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.
[0157] 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.
[0158] 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.
[0159] 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.
[0160] 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 collaborative optimization method for nesting and packaging based on digital twins, characterized in that, Includes the following steps: 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; 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. 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. 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. 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. S6: Repeatedly adjust the feedback and simulation until the simulation evaluation data meets the expected indicators.
2. The method according to claim 1, characterized in that, Step S2 includes: S210: Set the layout constraints for the parts, and the 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 ; 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. 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. The acceptance criterion is used to determine whether to accept the new solution. After iterative optimization, the optimal solution of the two-dimensional layout scheme is obtained.
3. The method according to claim 2, characterized in that, S220 includes: 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; 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; 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... ; Part placement is based on edge matching and corner filling strategies. The placement condition requires that the part is 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. 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... ; 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; 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.
4. The method according to claim 3, characterized in that, S230 includes: 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. S232 Neighborhood Search: Randomly select a new solution from the neighborhood solution set and calculate the board utilization rate of the new solution. Set the acceptance criteria as ; If the new solution is the board utilization rate The material 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; S233 Iterative Optimization: Repeat the steps of neighborhood search and acceptance criterion judgment to continuously update the current layout scheme; 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.
5. The method according to claim 1, characterized in that, S3 includes: 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 width of part g. For the first The set of part indexes contained in each module. It is the length of part g; 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; 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; The optimal solution is obtained using tree search, and the value function is: α and β are weighting coefficients; Conditions for using the packaging box: .
6. The method according to claim 5, characterized in that, Step S320 includes: 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; 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; 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; S323: Place the parts Modules packed into the packaging 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 none of the above conditions are met, the next packaging box is activated. Packaging box activation conditions are: .
7. The method according to claim 1, characterized in that, In 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 and 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.
8. The method according to claim 1, characterized in that, 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, , , .
9. The method according to claim 8, characterized in that, Step S5 includes: S510: Set Pareto optimization goals: The fitness function is designed as follows: ,in It is the dynamic weight of the target; 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; S520: Determine the particle swarm size, where each particle represents 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 Initially set to 2; 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. S540 Particle Update: 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. 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. S560 determines whether the current iteration count has reached the preset maximum iteration count. If the fitness is reached, the iteration terminates; otherwise, the iteration returns to recalculate the fitness and continues to the next round of iteration; the final Pareto front result is output.
10. A collaborative optimization system for nesting and packaging based on digital twins, characterized in that, The system is used to implement the digital twin-based collaborative optimization method for layout and packaging as described in any one of claims 1-9; The system includes a simulation module, a two-dimensional nesting module, a three-dimensional packaging module, and a feedback adjustment module; 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. 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. 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. 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.
Citation Information
Patent Citations
Profile principal component analysis feature extraction-based two-dimensional profile layout method
CN107609704A
Digital twinning system for complex product assembly line
CN111413887A