Method for determining optimal placement number and position of single-type material boxes of automobile parts on tray
By constructing a mathematical model and using the Gurobi solver and genetic algorithm, the optimal number and position of the boxes on the pallet are calculated, solving the problem of low pallet space utilization caused by manual planning, and achieving maximum utilization of pallet space and cost reduction.
Patent Information
- Application Number
- CN202511200571.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, the placement of automotive parts boxes on pallets relies on manual experience, resulting in low pallet space utilization, increased transportation costs, and wasted storage space.
By constructing a mathematical model and combining the Gurobi solver and genetic algorithm, the optimal number and position of the boxes on the tray are calculated, including the maximum number of stacking layers, the number of boxes per layer, and the most compact placement position. Computer programming is used to achieve automated planning.
It maximizes the utilization of pallet space, reduces transportation and warehousing costs, and improves computing efficiency and solution reliability.
Smart Images

Figure CN120995710A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pallet loading optimization, specifically relating to a method for determining the optimal quantity and position of a single type of automotive parts box on a pallet. Background Technology
[0002] In the automotive parts logistics sector, pallets, as standardized load-bearing tools, directly impact warehousing costs, transportation efficiency, and supply chain responsiveness through their space utilization. Automotive parts are diverse and often stored in containers; therefore, the proper placement of individual containers on pallets is a critical issue in the logistics process. Currently, the industry relies heavily on manual experience for pallet loading of individual containers. Operators roughly estimate the quantity to be placed based on the dimensions of the containers and pallets, and then manually adjust the positions. This method has significant drawbacks: manual calculations are easily limited by subjective experience, making it difficult to maximize pallet space utilization, leading to increased transportation costs or wasted storage space.
[0003] Therefore, for pallet loading scenarios of single-type automotive parts boxes, there is an urgent need for a method that can combine actual constraints and is computationally efficient to determine the quantity and location of placement, in order to replace traditional manual planning and improve pallet space utilization and the reliability of loading schemes. Summary of the Invention
[0004] In view of the above-mentioned shortcomings of the existing technology, the purpose of this invention is to provide a pallet loading method that fits the actual automotive parts box loading scenario, and solves the problems of low pallet space utilization and arbitrary loading scheme in the traditional automotive parts box loading layout method.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for determining the optimal quantity and location of single-type automotive parts boxes on a pallet includes the following steps:
[0007] S1. Obtain the maximum height limit for pallet loading;
[0008] S2. Obtain the length, width, and height of the target material box to be loaded;
[0009] S3. Based on the maximum height limit H of pallet loading obtained in step S1 and the height h of the material box obtained in step S2, calculate the maximum number of stacking layers of the material box on the pallet;
[0010] S4. Obtain the length and width of the pallet;
[0011] S5. Based on the length l and width w of the box obtained in step S2 and the length L and width W of the tray obtained in step S4, calculate the theoretical upper limit of the number of items that can be placed on each layer.
[0012] S6. Based on the parameters l, w, L, W obtained in steps S2, S4, and S5, and the theoretical upper limit of the number of boxes per layer, a mathematical model is constructed based on a two-dimensional coordinate system. The mathematical model includes an objective function and constraints. The objective function is to maximize the number of boxes per layer and minimize the sum of the x-axis coordinates and the sum of the y-axis coordinates of all boxes. The constraints include that the total bottom area of the boxes does not exceed the bottom area of the tray, that no two boxes overlap and that their positional relationship is unique, that the boxes are placed in a unique direction, that the boxes do not exceed the tray's range, and the actual length and width of the boxes in different orientations.
[0013] S7. Based on the mathematical model constructed in step S6, use the Gurobi solver to solve the first layer objective and obtain the relaxed solution for the maximum number of boxes placed on each layer of the pallet;
[0014] S8. Fine-tune the relaxed solution obtained in step S7 through neighborhood search to make it conform to the binary variable constraint and become a feasible solution;
[0015] S9. Based on the feasible solution in step S8 and the theoretical upper limit of the number of items placed in each layer in step S5, use a genetic algorithm to iteratively optimize and obtain the loading order and placement direction of the boxes.
[0016] S10. Based on the result of step S9, the maximum subspace decoding method is used to convert it into an actual loading scheme to obtain the final maximum number of trays per layer;
[0017] S11. Based on the maximum number of stacking layers obtained in step S3 and the maximum number of items per layer obtained in step S10, calculate the maximum number of boxes that can be loaded on this pallet.
[0018] S12. Based on the mathematical model constructed in step S6 and the maximum number of items per layer obtained in step S10, use the Gurobi solver to solve the second layer objective and obtain the most compact placement position of the boxes in each layer.
[0019] Furthermore, the formula for calculating the maximum number of stacking layers q in step S3 is as follows:
[0020]
[0021] Furthermore, in step S5, the formula for calculating the theoretical upper limit g of the number of items placed on each layer is:
[0022]
[0023] Furthermore, in step S6, the mathematical model includes:
[0024] Objective function:
[0025] First-level objective:
[0026] Second-level objective:
[0027] Constraints:
[0028]
[0029] Where I is the set of material boxes, the length, width, and height of which are l, w, and h respectively, and the number of material boxes in the set is equal to g; l i and w i Indicates the length and width of box i; x i and y i These are continuous variables, representing the x and y coordinates of box i in the coordinate system, respectively; s ij and b ij It is a binary variable representing the positional relationship between material box i and material box j, used to characterize the non-overlapping constraints in the length and width directions, respectively; δ i1 and δ i2 These are binary variables representing the orientation of the material boxes, used to characterize the length parallel to the x-axis and the width parallel to the x-axis of material box i, respectively. and It is a continuous variable, representing the actual length and width of box i in a specific orientation; u i It is a binary variable representing whether the container i is placed on the tray.
[0030] Furthermore, the specific method of step S7 includes:
[0031] 7.1 Input the box size, tray size, and theoretical upper limit of the number of items per layer obtained in steps S2, S4, and S5 as parameters;
[0032] 7.2 Define a set of binary variables and a set of continuous variables. The binary variables include placement orientation, positional relationship, and whether or not the variable is placed. The continuous variables include coordinates and actual length and width.
[0033] 7.3 Transform the first-level objective function and all constraint equations (1)-(12) into a linear programming model recognizable by Gurobi;
[0034] 7.4 Configure Gurobi solver parameters and enable pruning algorithm and heuristic search;
[0035] 7.5 By traversing the possible values of the variables through the branch and bound method, and combining the constraint conditions (2)-(8) to eliminate invalid solutions with overlapping boxes, and by using the constraint conditions (9)-(10) to eliminate solutions that exceed the range of the pallet, we finally obtain the relaxed solution that satisfies all constraints and maximizes the number of boxes placed on each layer of the pallet.
[0036] Furthermore, the specific method of step S8 includes:
[0037] 8.1 Starting with the relaxed solution, search for feasible solutions within its small neighborhood:
[0038] 8.2 If the rounding is infeasible, adjust the variable values in the neighborhood until a feasible solution is found;
[0039] 8.3 If feasible, further search for a solution with a better objective function value in the neighborhood as the final initial solution.
[0040] Furthermore, the specific method of step S9 includes:
[0041] 9.1 Construct an encoding based on random numbers between 0 and 1. The length of the encoding is 2g. The first g genes represent the selected box number each time, and the size of the number represents the loading order. The last g genes represent the placement direction of the corresponding box. A vector composed of these numbers can represent a feasible solution to the problem.
[0042] 9.2 Input the initial solution obtained in step S8;
[0043] 9.3 Perform replication operation, using an elite strategy to complete replication, selecting individuals with the best fitness from the current population according to a preset ratio and directly retaining them to the next generation population;
[0044] 9.4 Perform a crossover operation, where one parent is fixed to an individual from the elite population, and the other parent is randomly selected from all individuals in the population to balance convergence speed and solution diversity. Set the crossover probability to 0.7, meaning that offspring genes have a 70% probability of inheriting from the elite parent and a 30% probability of inheriting from the random parent. Gene selection is achieved by simulating a "skewed coin toss" to generate random numbers: when the random number is ≤0.7, the corresponding gene of the elite parent is selected; when the random number is >0.7, the corresponding gene of the random parent is selected.
[0045] 9.5 To avoid premature convergence of the population, a mutation method of adding new individuals is adopted. According to the initial population generation distribution, a certain number of new individuals are randomly generated and added to the next generation population.
[0046] 9.6 Through replication, crossover, and mutation operations, a chromosome code for the loading order and orientation of a feeding box is obtained.
[0047] Furthermore, the specific method of step S10 includes:
[0048] 10.1 Construct the initial set of the largest available subspace;
[0049] 10.2 Select a feeder box according to the size of the chromosome coding value;
[0050] 10.3 Determine if the largest subspace set can accommodate the selected box; if yes, load it and continue to step 10.4; otherwise, end the process.
[0051] 10.4 Update the largest subspace set after loading the material into the box;
[0052] 10.5 Repeat steps 10.2-10.4 iteratively according to the chromosome coding order until no more can be loaded, to obtain the maximum number of trays that can be placed on each layer.
[0053] Furthermore, in step S11, the formula for calculating the maximum load capacity SUMN is:
[0054] SUMN = MAXN × q
[0055] Where MAXN is the maximum number of items per layer obtained in step S10, and q is the maximum number of stacked layers obtained in step S3.
[0056] Furthermore, the specific method of step S12 includes:
[0057] 12.1 Fix the binary variables of the first-level objective, that is, retain all placed boxes, exclude unplaced boxes, fix the placement direction of each box, and convert the mixed-integer linear programming mathematical model into a linear programming model.
[0058] 12.2 Define the second-level optimization objective, and switch the objective function to minimize the sum of the x and y coordinates of all placed boxes. That is, the smaller the coordinates, the closer the box is to the origin (0,0) of the tray, and the more compact the overall placement.
[0059] 12.3 Under the premise of fixed number and placement of material boxes, by adjusting the coordinate position, the coordinates of the material boxes that minimize the sum of x and y coordinates are finally obtained, that is, the coordinate set of the most compact placement position, and the final most compact placement position of each layer of material boxes is obtained.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] 1. The method of the present invention can be implemented by computer programming, and has the advantages of high reliability, good practicality and fast calculation efficiency. It can replace manual planning, maximize the utilization of pallet space, reduce transportation and storage costs, and is suitable for pallet loading calculation scenarios of single-type material boxes in the field of automotive parts logistics.
[0062] 2. This invention creatively proposes to first calculate the maximum number of stacked layers of boxes on a pallet and the theoretical upper limit of the number of boxes per layer, then construct the objective function and constraints, and establish a mathematical model based on a two-dimensional coordinate system; after obtaining the relaxed solution through the Gurobi solver, a feasible solution is obtained through neighborhood search, and the maximum number of boxes per layer is determined by combining iterative optimization using a genetic algorithm and maximum subspace decoding, thereby calculating the maximum loading capacity; finally, the second layer objective is solved using the Gurobi solver to determine the most compact placement position. It features high computational efficiency, high reliability, and good practicality. Attached Figure Description
[0063] Figure 1 This is a flowchart of the method of the present invention.
[0064] Figure 2 This is a schematic diagram illustrating the optimized effect of the method of the present invention. Detailed Implementation
[0065] The present invention will now be described in further detail with reference to the embodiments and accompanying drawings.
[0066] See Figure 1 This invention provides a method for determining the optimal quantity and position of a single type of automotive parts box on a pallet, comprising the following steps:
[0067] S1. Obtain the maximum height limit for pallet loading, denoted by the symbol H;
[0068] S2. Obtain the length, width, and height of the target box to be loaded, represented by the symbols l, w, and h;
[0069] S3. Based on the maximum pallet loading height limit parameter H obtained in steps S1 and S2 and the height of the target box to be loaded, calculate the maximum number of stacking layers of the box on the pallet, denoted by the symbol q. The calculation formula for q is as follows:
[0070]
[0071] S4. Obtain the length and width of the pallet, represented by the symbols L and W;
[0072] S5. Based on steps S2 and S4, obtain the length and width of the target box to be loaded and the length and width of the tray. Calculate the theoretical upper limit of the number of items to be placed on each layer, denoted by the symbol g. The formula for calculating g is as follows:
[0073]
[0074] S6. Based on the parameters l, w, L, W, and g obtained in steps S2, S4, and S5, construct a mathematical model for the optimal quantity and position of single-type automotive parts boxes on the pallet using a two-dimensional coordinate system:
[0075] Objective function:
[0076] First-level objective:
[0077] Second-level objective:
[0078] Constraints:
[0079]
[0080]
[0081] Where I is the set of material boxes, the length, width, and height of which are l, w, and h respectively, and the number of material boxes in the set is equal to g; l i and w i Indicates the length and width of box i; x i and y i These are continuous variables, representing the x and y coordinates of box i in the coordinate system, respectively; s ij and b ij It is a binary variable representing the positional relationship between material box i and material box j, used to characterize the non-overlapping constraints in the length and width directions, respectively; δ i1 and δ i2 These are binary variables representing the orientation of the material boxes, used to characterize the length parallel to the x-axis and the width parallel to the x-axis of material box i, respectively. and It is a continuous variable, representing the actual length and width of box i in a specific orientation; u i It is a binary variable representing whether the container i is placed on the tray.
[0082] In the formula, the first objective is to maximize the number of boxes placed on each layer of the tray, and the second objective is to minimize the sum of the coordinates of the boxes.
[0083] Constraint (1) indicates that the sum of the original bottom areas of all the boxes placed on the pallet must not exceed the bottom area of the pallet; Constraints (2) to (5) indicate that any two boxes do not overlap in two-dimensional space and their positional relationship is unique; Constraint (6) indicates that the placement direction of the boxes is unique; Constraint (7) indicates that two boxes do not overlap in the length direction; Constraint (8) indicates that two boxes do not overlap in the width direction; Constraints (9) and (10) indicate that the boxes must not exceed the length and width range of the pallet; Constraints (11) and (12) indicate the actual length and width of the boxes under different placement orientations.
[0084] S7. Based on the mathematical model constructed in step S6, use the Gurobi solver to solve the first layer objective to obtain the relaxation solution for the maximum number of boxes placed on each layer of the tray. The specific steps are as follows:
[0085] 7.1 Input the box size, tray size, and theoretical upper limit of the number of items per layer obtained in steps S2, S4, and S5 as parameters;
[0086] 7.2 Define a set of binary variables and a set of continuous variables. The binary variables include placement orientation, positional relationship, and whether or not the variable is placed. The continuous variables include coordinates and actual length and width.
[0087] 7.3 Transform the first-level objective function and all constraint equations (1)-(12) into a linear programming model recognizable by Gurobi;
[0088] 7.4 Configure Gurobi solver parameters and enable pruning algorithm and heuristic search;
[0089] 7.5 By traversing the possible values of the variables through the branch and bound method, and combining the constraint conditions (2)-(8) to eliminate invalid solutions with overlapping boxes, and by using the constraint conditions (9)-(10) to eliminate solutions that exceed the range of the pallet, we finally obtain the relaxed solution that satisfies all constraints and maximizes the number of boxes placed on each layer of the pallet.
[0090] S8. Fine-tune the relaxed solution through neighborhood search to make it conform to the binary variable constraints and thus a feasible solution; specific methods include:
[0091] 8.1 Starting with a relaxed solution, search for feasible solutions within its small neighborhood (e.g., when the values of the two variables change to 0 or 1):
[0092] 8.2 If the rounding is infeasible, adjust the variable values in the neighborhood until a feasible solution is found;
[0093] 8.3 If feasible, further search for a solution with a better objective function value in the neighborhood as the final initial solution.
[0094] S9. Based on the final initial solution of step S8 and the theoretical upper limit of the number of items placed in each layer in step S5, use a genetic algorithm to iteratively optimize and obtain the loading order and placement direction of the boxes. Specific methods include:
[0095] 9.1 Construct an encoding based on random numbers between 0 and 1. The length of the encoding is 2g. The first g genes represent the selected box number each time, and the size of the number represents the loading order. The last g genes represent the placement direction of the corresponding box. A vector composed of these numbers can represent a feasible solution to the problem.
[0096] 9.2 Input the initial solution obtained in step S8;
[0097] 9.3 The replication operation is carried out using an elite strategy. Individuals with the best fitness are selected from the current population according to a preset ratio and directly retained to the next generation. This strategy can avoid the loss of excellent genes and ensure that the overall quality of the population solution continues to improve with the evolution process, which is better than the traditional probabilistic replication method for indiscriminate retention of solution quality.
[0098] 9.4 Perform a crossover operation, where one parent is fixed to an individual from the elite population, and the other parent is randomly selected from all individuals in the population to balance convergence speed and solution diversity. Assume a crossover probability of 0.7, meaning offspring genes have a 70% probability of inheriting from the elite parent and a 30% probability of inheriting from the random parent. Gene selection is achieved by simulating a "skewed coin toss" to generate random numbers: when the random number is ≤0.7, the corresponding gene from the elite parent is selected; when the random number is >0.7, the corresponding gene from the random parent is selected. This operation makes the offspring more closely resemble the characteristics of elite individuals, accelerating the population's convergence towards the optimal solution.
[0099] 9.5 Mutation operation is performed. To avoid premature convergence of the population, a mutation method of adding new individuals is adopted. According to the generation distribution of the initial population, a certain number of new individuals are randomly generated and added to the next generation population. By introducing new gene combinations, the diversity of the population is enriched, and the algorithm is prevented from getting stuck in local optima.
[0100] 9.6 Through replication, crossover, and mutation operations, a chromosome code for the loading order and orientation of a feeding box is obtained.
[0101] S10. Based on the chromosome encoding from step S9, the chromosome encoding is converted into an actual loading scheme using the maximum subspace decoding method, resulting in the final maximum number of items that can be placed on each layer of the tray, denoted by MAXN. The specific method includes:
[0102] 10.1 Construct the initial set of the largest available subspace;
[0103] 10.2 Select a feeder box according to the size of the chromosome coding value;
[0104] 10.3 Determine if the largest subspace set can accommodate the selected box; if yes, load it and continue to step 10.4; otherwise, end the process.
[0105] 10.4 Update the largest subspace set after loading the material into the box;
[0106] 10.5 Repeat steps 10.2-10.4 iteratively according to the chromosome coding order until no more can be loaded, to obtain the maximum number of trays that can be placed on each layer.
[0107] S11. Based on the maximum number of stacking layers obtained in step S3 and the maximum number of items per layer obtained in step S10, calculate the maximum number of boxes that can be loaded onto this pallet, denoted by the symbol SUMN. The formula for calculating SUMN is as follows:
[0108] SUMN = MAXN × q
[0109] S12. Based on the mathematical model constructed in step S6 and the maximum number of target boxes in each layer of the pallet obtained in S10, use the Gurobi solver to solve for the second layer target and obtain the most compact placement of boxes in each layer. The specific method includes:
[0110] 12.1 Fix the binary variables of the first-level objective, that is, retain all placed boxes, exclude unplaced boxes, fix the placement direction of each box, and convert the mixed-integer linear programming mathematical model into a linear programming model.
[0111] 12.2 Define the second-level optimization objective, and switch the objective function to minimize the sum of the x and y coordinates of all placed boxes. That is, the smaller the coordinates, the closer the box is to the origin (0,0) of the tray, and the more compact the overall placement.
[0112] 12.3 Under the premise of fixed number and placement of material boxes, by adjusting the coordinate position, the coordinates of the material boxes that minimize the sum of x and y coordinates are finally obtained, that is, the coordinate set of the most compact placement position, and the final most compact placement position of each layer of material boxes is obtained.
[0113] See Figure 2 As shown in the optimization effect diagram, the present invention can obtain the optimal number and position of single-type material boxes for automotive parts on the pallet, with the highest space utilization, good practicality, and high calculation efficiency.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A method for determining the optimal quantity and position of a single type of automotive parts box on a pallet, characterized in that, Includes the following steps: S1. Obtain the maximum height limit for pallet loading; S2. Obtain the length, width, and height of the target material box to be loaded; S3. Based on the maximum height limit H of pallet loading obtained in step S1 and the height h of the material box obtained in step S2, calculate the maximum number of stacking layers of the material box on the pallet; S4. Obtain the length and width of the pallet; S5. Based on the length l and width w of the box obtained in step S2 and the length L and width W of the tray obtained in step S4, calculate the theoretical upper limit of the number of items that can be placed on each layer. S6. Based on the parameters l, w, L, W obtained in steps S2, S4, and S5, and the theoretical upper limit of the number of boxes per layer, a mathematical model is constructed based on a two-dimensional coordinate system. The mathematical model includes an objective function and constraints. The objective function is to maximize the number of boxes per layer and minimize the sum of the x-axis coordinates and the sum of the y-axis coordinates of all boxes. The constraints include that the total bottom area of the boxes does not exceed the bottom area of the tray, that no two boxes overlap and that their positional relationship is unique, that the boxes are placed in a unique direction, that the boxes do not exceed the tray's range, and that the actual length and width of the boxes in different orientations are defined. S7. Based on the mathematical model constructed in step S6, use the Gurobi solver to solve the first layer objective and obtain the relaxed solution for the maximum number of boxes placed on each layer of the pallet; S8. Fine-tune the relaxed solution obtained in step S7 through neighborhood search to make it conform to the binary variable constraint and become a feasible solution; S9. Based on the feasible solution in step S8 and the theoretical upper limit of the number of items placed in each layer in step S5, use a genetic algorithm to iteratively optimize and obtain the loading order and placement direction of the boxes. S10. Based on the result of step S9, the maximum subspace decoding method is used to convert it into an actual loading scheme to obtain the final maximum number of trays per layer; S11. Based on the maximum number of stacking layers obtained in step S3 and the maximum number of items per layer obtained in step S10, calculate the maximum number of boxes that can be loaded on this pallet. S12. Based on the mathematical model constructed in step S6 and the maximum number of items per layer obtained in step S10, use the Gurobi solver to solve the second layer objective and obtain the most compact placement position of the boxes in each layer.
2. The method for determining the optimal quantity and position of single-type automotive parts boxes on a pallet according to claim 1, characterized in that, In step S3, the formula for calculating the maximum number of stacking layers q is:
3. The method for determining the optimal quantity and position of single-type automotive parts boxes on a pallet according to claim 1, characterized in that, In step S5, the formula for calculating the theoretical upper limit g of the number of items placed on each layer is:
4. The method for determining the optimal quantity and position of single-type automotive parts boxes on a pallet according to claim 1, characterized in that, In step S6, the mathematical model includes: Objective function: First-level objective: Second-level objective: Constraints: Where I is the set of material boxes, the length, width, and height of which are l, w, and h respectively, and the number of material boxes in the set is equal to g; l i and w i Indicates the length and width of box i; x i and y i These are continuous variables, representing the x and y coordinates of box i in the coordinate system, respectively; s ij and b ij It is a binary variable representing the positional relationship between material box i and material box j, used to characterize the non-overlapping constraints in the length and width directions, respectively; δ i1 and δ i2 These are binary variables representing the orientation of the material boxes, used to characterize the length parallel to the x-axis and the width parallel to the x-axis of material box i, respectively. and It is a continuous variable, representing the actual length and width of box i in a specific orientation; u i It is a binary variable representing whether the container i is placed on the tray.
5. The method for determining the optimal quantity and position of single-type automotive parts boxes on a pallet according to claim 4, characterized in that, Step S7 specifically includes the following methods: 7.1 Input the box size, tray size, and theoretical upper limit of the number of items per layer obtained in steps S2, S4, and S5 as parameters; 7.2 Define a set of binary variables and a set of continuous variables. The binary variables include placement orientation, positional relationship, and whether or not the variable is placed. The continuous variables include coordinates and actual length and width. 7.3 Transform the first-level objective function and all constraint equations (1)-(12) into a linear programming model recognizable by Gurobi; 7.4 Configure Gurobi solver parameters and enable pruning algorithm and heuristic search; 7.5 By traversing the possible values of the variables through the branch and bound method, and combining the constraint conditions (2)-(8) to eliminate invalid solutions with overlapping boxes, and by using the constraint conditions (9)-(10) to eliminate solutions that exceed the range of the pallet, we finally obtain the relaxed solution that satisfies all constraints and maximizes the number of boxes placed on each layer of the pallet.
6. The method for determining the optimal quantity and position of single-type automotive parts boxes on a pallet according to claim 5, characterized in that, Step S8 specifically includes the following methods: 8.1 Starting with the relaxed solution, search for feasible solutions within its small neighborhood: 8.2 If the rounding is infeasible, adjust the variable values in the neighborhood until a feasible solution is found; 8.3 If feasible, further search for a solution with a better objective function value in the neighborhood as the final initial solution.
7. The method for determining the optimal quantity and position of single-type automotive parts boxes on a pallet according to claim 6, characterized in that, Step S9 specifically includes the following methods: 9.1 Construct an encoding based on random numbers between 0 and 1. The length of the encoding is 2g. The first g genes represent the selected box number each time, and the size of the number represents the loading order. The last g genes represent the placement direction of the corresponding box. A vector composed of these numbers can represent a feasible solution to the problem. 9.2 Input the initial solution obtained in step S8; 9.3 Perform replication operation, using an elite strategy to complete replication, selecting individuals with the best fitness from the current population according to a preset ratio and directly retaining them to the next generation population; 9.4 Perform a crossover operation, where one parent is fixed to an individual from the elite population, and the other parent is randomly selected from all individuals in the population to balance convergence speed and solution diversity. Set the crossover probability to 0.7, meaning that offspring genes have a 70% probability of inheriting from the elite parent and a 30% probability of inheriting from the random parent. Gene selection is achieved by simulating a "skewed coin toss" to generate random numbers: when the random number is ≤0.7, the corresponding gene of the elite parent is selected; when the random number is >0.7, the corresponding gene of the random parent is selected. 9.5 To avoid premature convergence of the population, a mutation method of adding new individuals is adopted. According to the initial population generation distribution, a certain number of new individuals are randomly generated and added to the next generation population. 9.6 Through replication, crossover, and mutation operations, a chromosome code for the loading order and orientation of a feeding box is obtained.
8. The method for determining the optimal quantity and position of single-type automotive parts boxes on a pallet according to claim 7, characterized in that, The specific method for step S10 includes: 10.1 Construct the initial set of the largest available subspace; 10.2 Select a feeder box according to the size of the chromosome coding value; 10.3 Determine if the largest subspace set can accommodate the selected box; if yes, load it and continue to step 10.4; otherwise, terminate. 10.4 Update the largest subspace set after loading the material into the box; 10.5 Repeat steps 10.2-10.4 iteratively according to the chromosome coding order until no more can be loaded, to obtain the maximum number of trays that can be placed on each layer.
9. The method for determining the optimal quantity and position of single-type automotive parts boxes on a pallet according to claim 1, characterized in that, In step S11, the formula for calculating the maximum load capacity SUMN is: SUMN = MAXN × q Where MAXN is the maximum number of items per layer obtained in step S10, and q is the maximum number of stacked layers obtained in step S3.
10. The method for determining the optimal quantity and position of single-type automotive parts boxes on a pallet according to claim 8, characterized in that, The specific method for step S12 includes: 12.1 Fix the binary variables of the first-level objective, that is, retain all placed boxes, exclude unplaced boxes, fix the placement direction of each box, and convert the mixed-integer linear programming mathematical model into a linear programming model. 12.2 Define the second-level optimization objective, and switch the objective function to minimize the sum of the x and y coordinates of all placed boxes. That is, the smaller the coordinates, the closer the box is to the origin (0,0) of the tray, and the more compact the overall placement. 12.3 Under the premise of fixed number and placement of material boxes, by adjusting the coordinate position, the coordinates of the material boxes that minimize the sum of x and y coordinates are finally obtained, that is, the coordinate set of the most compact placement position, and the final most compact placement position of each layer of material boxes is obtained.