Retail order automatic packing method based on hybrid genetic spotted hyena optimization algorithm

The cigarette packing process is optimized by using a hybrid genetic spotted hyena optimization algorithm, which solves the problems of waste and instability in traditional cigarette packing algorithms. This results in an efficient and stable packing solution that is suitable for automatic packing of cigarette retail orders.

CN115311044BActive Publication Date: 2026-05-15KUNMING KSEC LOGISTIC INFORMATION IND
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210877467.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-25
Publication Date
2026-05-15
Estimated Expiration
2042-07-25

AI Technical Summary

Technical Problem

Existing technologies have problems in the cigarette packing process, such as large number of packs but large waste of space, inconsistent center of gravity, irregular pack shape, and uneven packing. In addition, traditional algorithms have slow convergence speed and low convergence accuracy, which makes it difficult to meet the actual industrial needs.

Method used

The hybrid genetic spotted hyena optimization algorithm (GASHO) is adopted, combined with robotics technology, to optimize the cigarette packing process by simulating the foraging behavior of spotted hyenas. It considers minimizing the number of packs, pack stability, pack regularity, and pack unpacking balance. Chaotic initialization and roulette wheel selection strategies are introduced to enhance the algorithm's optimization ability.

Benefits of technology

It achieves a more scientific and efficient cigarette packing solution, reduces packaging material waste, increases the full packing rate, enhances pack stability and unpacking balance, and improves the automation efficiency of the packing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115311044B_ABST
    Figure CN115311044B_ABST
Patent Text Reader

Abstract

The application discloses a cigarette retail order automatic packing method based on a hybrid adaptive genetic spotted hyena optimization algorithm, which comprises the following steps: step one, planning a general design flow of the cigarette automatic packing, and clearly defining an optimization target, variables, constraint conditions and the interrelation among various size data; step two, establishing a multi-objective optimization model with priority for the actual cigarette packing problem, and quantitatively expressing a plurality of constraint conditions in the actual operation flow; step three, improving the spotted hyena optimization algorithm by using an improved adaptive genetic algorithm, a chaos initialization and a roulette wheel selection strategy, and obtaining the best scheme of the cigarette retail order automatic packing by solving the cigarette packing model through the obtained hybrid adaptive genetic spotted hyena optimization algorithm. The application example provides an optimization algorithm for the cigarette retail order automatic packing, can solve the problems of large space waste, large number of cigarette packs and large consumption of packing materials in the traditional packing method, and provides effective technical support for the cigarette retail order automatic packing and other box-type cargo packing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic order packaging technology, specifically to an automatic retail order packaging method based on the Hybrid Genetic Spotted Hyena Optimization Algorithm (GASHO). Background Technology

[0002] With the continuous development of IoT, mobile internet, robotics, and swarm intelligence optimization algorithms, the logistics industry is entering the era of smart logistics, with logistics operations gradually moving towards intelligence, automation, informatization, and networking. In the warehousing and logistics industry, unmanned warehouses have emerged, and automated packaging technology has been widely applied in the automated production process of these warehouses. In today's rapidly developing e-commerce landscape, order timeliness is increasingly important for improving customer experience. Therefore, to improve order outbound efficiency, automated packaging technology has been implemented in the outbound process, especially in the tobacco logistics sector. Due to the large number of tobacco brands and categories, automated order systems are already an existing technology and system. However, currently, when assembling orders, it is often only possible to pre-set the packaging pattern, and the system performs packaging operations according to a fixed method. The automated packaging process for cigarette orders belongs to the packing optimization stage of logistics operations. Currently, packaging operations are primarily carried out using industrial robots. However, simply relying on robots for mechanized operations, while saving manpower and improving work efficiency, does not offer significant advantages in terms of saving on packaging costs or increasing box fullness. This leads to several defects in the packaged boxes, such as large quantities of packages with ample empty space, resulting in wasted space; inconsistent center of gravity of the packaged items, leading to misalignment, imbalances, or even being too high or crooked, causing potential hazards and transportation difficulties; poor uniformity of package shape, making stacking and placement during transport difficult, increasing the risk of damage during transit; and poor unpacking balance and inconsistent sealing methods, resulting in poor uniformity, inconvenience in unpacking and shipping, and low unpacking efficiency. Current systems and methods lack consideration and solutions for these detailed issues.

[0003] Scholars at home and abroad have proposed a technology that integrates robotics with intelligent optimization algorithms in order to maximize the advantages of mechanized operations.

[0004] The essence of the cigarette packing problem is a bin packing problem, which is theoretically an NP-hard problem. Currently, there are no algorithms that can find an exact solution to an NP-complete problem in an efficient time, making the bin packing problem extremely difficult to solve. Although the cigarette packing problem is essentially a bin packing optimization problem, compared to the bin packing problem, cigarette packing, due to the lack of a physical box shell constraining the three-dimensional shape of the cigarette stack, involves more complex independent variables and constraints during the optimization process, making it even more difficult to solve.

[0005] Current technologies typically employ traditional heuristic algorithms and improved swarm optimization algorithms to automate cigarette packing for orders. However, these algorithms fail to consider the coupling relationship between the height difference and length of cigarette pack layers and the maximum stackable number of layers; they also fail to consider the coupling relationship between the dimensions of individual cigarette packs and the dimensions of the upper and lower stacks within the bundle; and they do not consider the influence of the height difference on the layer width. Therefore, cigarette packing in actual industrial processes is a complex and coupled multi-constraint problem, and existing algorithms struggle to design scientifically efficient cigarette packing solutions while satisfying these constraints.

[0006] Most current articles focus on space utilization and item stability as optimization goals. There are almost no articles that, while satisfying these two goals, also include package regularity and unpacking balance as optimization goals. Furthermore, very few articles consider the real-world constraints of the packaging process in such a comprehensive way.

[0007] There are currently no patents applying the Hybrid Adaptive Genetic Spotted Hyena Optimization Algorithm (GASHO) to the problem of automatic packing of cigarette retail orders. Summary of the Invention

[0008] To address the shortcomings and defects of the existing technology, the inventors, through research and development, solved the problems of slow convergence speed and low convergence accuracy when using traditional heuristic algorithms to solve the packing optimization problem, thus designing a more scientific and efficient cigarette packing scheme. Specifically, this invention is implemented as follows: an automatic packing method for retail orders based on a hybrid genetic spotted hyena optimization algorithm, comprising the following steps:

[0009] Step S1: Based on the overall design process of automatic product packaging, determine the optimization objectives, variables, constraints, and interrelationships between various dimensional data. Based on the interrelationship data, determine the functional expression and weight coefficients of each optimization objective, and thus determine the optimization objective function for this packaging process. Based on product order data including historical retail order data, product specifications, and inbound / outbound specifications, as well as constraint data during the packaging process, establish a three-dimensional product packaging model.

[0010] Step S2: Based on the established 3D packaging model of the goods, a multi-objective optimization model with priority is established for the actual cigarette packaging problem, and multiple constraints in the actual operation process are quantitatively expressed. The spotted hyena optimization algorithm is used to solve the model, mapping the optimization process of the goods packaging scheme to the foraging behavior of spotted hyenas. It imitates the process of spotted hyenas searching, surrounding, hunting and attacking prey, and gradually optimizes the optimal way of goods packaging. The position of each individual in the population Q composed of N goods in the kth iteration is determined. This represents a solution to the problem. During the iteration process, other spotted hyenas continuously move towards the spotted hyena closest to the prey to update their positional state, thus realizing the optimization process of the algorithm.

[0011] Step S3: The chaotic sequence generated by the Tent mapping is used to initialize the spotted hyena population with chaos. A roulette wheel selection strategy is introduced into the spotted hyena optimization algorithm. The solution obtained by the spotted hyena optimization algorithm is used as the initial state. Then, a genetic algorithm is used to optimize it to enhance the algorithm's optimization ability. The hybrid genetic spotted hyena optimization algorithm is used to optimize and solve the problem of automatic packing of cigarette retail orders, thereby obtaining the optimal cigarette packing scheme.

[0012] Preferably, the optimization objectives include multiple or all of the following: minimizing the number of packs, optimizing pack shape stability, optimizing pack shape regularity, and maximizing unpacking balance, and these objectives must be satisfied simultaneously with priority. Minimizing the number of packs means minimizing the volumetric waste rate of the packs; optimizing pack shape stability means minimizing the overall center-of-gravity eccentricity of the packs; a spatial rectangular coordinate system is established with the top left corner of the bottom layer of the pack as the origin, and the center-of-gravity coordinates of each layer are calculated, with the center-of-gravity coordinates of the first layer as the reference, to calculate the eccentricity; optimizing pack shape regularity is expressed as a function of the size difference between layers within the same packaging unit; maximizing unpacking balance is expressed as a function of the size difference between packaging units; a weight coefficient is assigned to each optimization objective to indicate its priority.

[0013] The working principle and technical effects of this invention are as follows: This invention fully considers the constraints and objective function of the automatic packing problem for cigarette retail orders under the background of finished cigarette orders leaving the warehouse of tobacco enterprises. Unlike existing research, this invention aims to minimize the number of packs, optimize pack stability, optimize pack regularity, and optimize pack unpacking balance. It also fully considers the real constraints in the actual operation process and the coupling relationships between these constraints. Based on this, a hybrid adaptive genetic spotted hyena optimization algorithm (GASHO) is further proposed. This algorithm improves the standard spotted hyena optimization algorithm by using an improved adaptive genetic algorithm, chaotic initialization, and roulette wheel selection strategy. This solves the problems of slow convergence speed and low convergence accuracy in solving the packing optimization problem using traditional heuristic algorithms, thus designing a more scientific and efficient cigarette packing scheme. This invention provides a scientific and efficient automatic packing method for cigarette retail orders. Taking the outbound shipment of finished cigarette orders from tobacco companies as an example, it proposes an optimization method with the objectives of minimizing the number of packs, optimizing pack type stability, optimizing pack type regularity, and achieving the best packing balance. It considers the real constraints in the packing process and the coupling relationships between these constraints, and establishes a corresponding packing optimization model based on this. Furthermore, to improve the algorithm's optimization ability, solution accuracy, and stability, a hybrid adaptive genetic spotted hyena optimization algorithm (GASHO) is proposed to solve the cigarette packing optimization problem. The application of this method can help companies save on packaging and increase the full-fill rate, which is of great significance in helping companies reduce costs and increase efficiency. In addition, although this application proposes an automatic packing method for cigarette orders, this method is also applicable to the packing problems of boxed goods in other industries. The promotion and application of this method can contribute to the country's early achievement of the "dual-carbon" goal by saving packaging materials. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of cigarette packing methods;

[0015] Figure 2 This is a schematic diagram of a three-dimensional coordinate system and the coordinates of the center of gravity;

[0016] Figure 3 This is a flowchart of the hybrid adaptive genetic spotted hyena optimization algorithm;

[0017] Figure 4 This is the iterative convergence rate curve from Example 2; Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.

[0019] Example 1:

[0020] Based on historical data of cigarette retail orders, cigarette pack specifications, and feed port specifications, this invention establishes a three-dimensional cigarette packing model and proposes an automatic cigarette retail order packing method based on a hybrid adaptive genetic spotted hyena optimization algorithm. This method is a product of the integration of robotics technology and intelligent optimization algorithms.

[0021] The automatic packing method for cigarette retail orders based on the Hybrid Adaptive Genetic Spotted Hyena Optimization Algorithm (GASHO) in this example adopts the following steps:

[0022] Step 1: Establish a three-dimensional cigarette packing model based on the actual constraints such as layer width, layer height difference, layer length, and packing requirements in the cigarette order packing process.

[0023] The aforementioned automatic cigarette retail order packing model includes the objective function and constraints for cigarette packing optimization.

[0024] The optimization objectives for automated packing of cigarette retail orders are to minimize the number of packs, optimize pack shape stability, optimize pack shape regularity, and achieve the best pack unpacking balance, as shown below:

[0025] Objective 1 – Minimize the number of packs. In the same order, maximizing the volume utilization of each cigarette pack can effectively reduce the number of cigarette packs. Therefore, the first objective of cigarette pack assembly is to maximize the volume utilization of the cigarette pack, that is, to minimize the volume waste rate of the cigarette pack. The objective function is shown in Equation (1).

[0026]

[0027] in

[0028] In the formula, P represents the waste volume of the cigarette pack, P j Let A represent the waste volume of the j-th cigarette pack. jl A jw A jh Let X represent the length, width, and height of the j-th cigarette pack, respectively. ij L is a 0-1 variable used to determine whether the i-th pack of cigarettes is inside the j-th pack. i W i H iLet represent the length, width, and height of the i-th cigarette, respectively.

[0029] Objective 2 – Packaging Stability. As physics tells us, the lower the overall center of gravity of the cigarette pack, the better its stability. Therefore, while satisfying the first objective, the second objective for the cigarette pack is to minimize the overall center of gravity eccentricity. A spatial rectangular coordinate system is established with the top left corner of the bottom layer of the pack as the origin (e.g., ...). Figure 2 As shown in the figure, calculate the centroid coordinates of each layer, and calculate the eccentricity based on the centroid coordinates of the first layer. The objective function is shown in equation (2).

[0030]

[0031] In the formula, S represents the eccentricity of the overall center of gravity of the cigarette pack. Let r represent the length, width, and height of the k-th layer of the j-th cigarette pack, respectively. j This represents the maximum number of stacked layers for cigarette pack j.

[0032] Objective 3 – Packet Shape Regularity. To facilitate material transportation and reduce damage to cigarette packs, enterprises require cigarette packs to be square and regular in shape with a flat surface. Therefore, while meeting the first two objectives, the pack shape regularity is set as the third objective. The pack shape regularity is converted into a function expressing the dimensional difference between the inner layers of the same cigarette pack, as shown in Equation (3).

[0033]

[0034] In the formula, B represents the dimensional difference between the inner layers of the cigarette pack. and Let r represent the length, width, and height of the (k+1)th and kth layers of the j-th cigarette pack, respectively. j This indicates the maximum number of stacked layers for cigarette pack j.

[0035] Objective 4 – Packaging Balance. In reality, materials from the same order are packaged in different cigarette packs. To facilitate later distribution, companies will combine the individual cigarette packs into a single package according to their needs. To ensure the overall stability and regularity of the combined package, the dimensions of the individual cigarette packs should be as balanced as possible. Therefore, given that the first three objectives are met, packaging balance is set as the fourth objective. Packaging balance is expressed as a function of the size difference between cigarette packs, as shown in Equation (4).

[0036]

[0037] In the formula, E represents the size difference between cigarette packs, and A (j+1)l A (j+1)w A (j+1)h and Ajl A jw A jh Let represent the length, width, and height of the (j+1)th cigarette pack and the length, width, and height of the jth cigarette pack, respectively.

[0038] In summary, the three-dimensional packing problem of cigarettes has four optimization objectives. For the sake of convenience, this paper introduces a weight coefficient α to transform the multi-objective optimization model with priority into a single-objective model for optimization.

[0039] Therefore, the objective function of this paper is:

[0040] min C=α1P+α2S+α3B+α4E (5)

[0041] In the formula, P, S, B, and E represent four optimization objectives, namely minimizing the number of packets, packet stability, packet regularity, and packet splitting balance. α1, α2, α3, and α4 are all weight coefficients with values ​​ranging from [0,1].

[0042] After establishing the 3D cigarette pack model, it is necessary to establish packing constraints. There are seven constraints in total: cigarette material size constraints, pack specifications constraints, layer width constraints, layer height difference constraints, layer length constraints, packing constraints, and layout constraints. Details are as follows:

[0043] Size constraints for cigarette packs: The size range is determined based on the cigarette specifications in historical orders.

[0044] 268≤L i ≤480; 75≤W i ≤347; 22≤H i ≤320 (6)

[0045] Cigarette pack specifications are constrained by the size of the packaging machine's passageway and the conveyor belt.

[0046] 0≤A jl ≤480; 0≤A jw ≤450; 0≤A jh ≤240 (7)

[0047] Layer width constraint: In order to ensure the overall stability of the cigarette pack, the dimensional relationship between the layers within the same cigarette pack is constrained.

[0048]

[0049]

[0050] Height difference constraint: The allowable difference range between the heights of adjacent layers within the same tobacco pack, the measurement of layer width, and the number of stackable layers of tobacco packs are all closely related to the height difference.

[0051]

[0052] Layer length constraint: The inner layer length of the cigarette pack is closely related to the number of stackable layers of the cigarette pack.

[0053]

[0054] Combination constraints: Based on customer needs, individual cigarette packs are combined into a single pack. The total height of the combined pack is constrained by the specifications of the packaging machine. In order to ensure the overall stability of the combined pack, the dimensions of the upper and lower cigarette stacks are limited.

[0055]

[0056]

[0057] Arrangement constraints: In order to ensure the overall stability, regularity and balance of the cigarette packs, a set of arrangement rules are formulated for the cigarette packing process, and the packing operation must be carried out in strict accordance with these rules.

[0058]

[0059]

[0060]

[0061] Among them, L i W i H i Let A represent the length, width, and height of the i-th cigarette, respectively. jl A jw A jh Let the length, width, and height of the j-th cigarette pack be represented respectively. and Let X represent the length, width, and height of the (k+1)th and kth layers of the j-th cigarette pack, respectively. ij Y ijk Z i U jq All variables are 0-1, used to determine whether the i-th cigarette pack is inside the j-th pack, whether the i-th cigarette pack is in the k-th layer of the j-th pack, whether the height of cigarette pack i is within its maximum height and allowable height range, and whether the j-th individual pack is inside the q-th pack. D qh A represents the height of the combined package q. jh This represents the height of the j-th pack of cigarettes. and They represent the q-th package and the t-th package respectively. q The width of the topmost layer and the qth merged layer t q The width of the bottom layer, c qIndicates the number of layers in the package q. and These represent the heights of the cigarettes in the k-th layer of the j-th group, specifically the β-th and β+α-th cigarettes, respectively. and These represent the numbers γ and γ within the j-th group, respectively. The width of the cigarette pack and These represent the numbers γ and γ within the j-th group package, respectively. The length of the cigarette pack.

[0062] Step 2: Based on the established 3D cigarette packing model, the spotted hyena optimization algorithm is used to map the optimization process of the cigarette packing scheme onto the foraging behavior of spotted hyenas. This mimics the spotted hyena's search, encirclement, hunting, and attack process for prey, progressively optimizing the cigarette packing problem. During the algorithm's solution process, the position of each individual in the population Q consisting of N individuals in the k-th iteration is determined. This represents one solution to the problem. During the iteration process, other spotted hyenas continuously move towards the spotted hyena closest to the prey to update their positional state, thus realizing the optimization process of the algorithm. The steps are as follows:

[0063] Step 2.1: Initialize the location of the spotted hyena population;

[0064] Step 2.2: Initialize relevant parameters;

[0065] Step 2.3: Calculate the fitness value of each individual based on the objective function. The smaller the fitness value, the better the individual.

[0066] Step 2.4: Map the process of packing cigarette materials to the iterative evolution of the spotted hyena population exchanging information and following the search. Calculate and update the fitness value of the searched individual and update the position of the spotted hyena population until the position corresponding to the optimal fitness value of the individual is found.

[0067] Step 3: Initialize the spotted hyena population using the chaotic sequence generated by the Tent mapping. Introduce a roulette wheel selection strategy into the spotted hyena optimization algorithm, using the solution obtained from the algorithm as the initial state. Then, optimize it using a genetic algorithm to enhance the algorithm's optimization ability. Use the hybrid genetic spotted hyena optimization algorithm to optimize and solve the automatic packing problem of cigarette retail orders, thereby obtaining the optimal cigarette packing scheme. The steps are as follows:

[0068] Step 3.1: Initialize the population location X i The chaotic sequence generated by the Tent mapping is selected to perform chaotic initialization on the spotted hyena population. The expression for the Tent mapping is as follows:

[0069]

[0070] After Bernoulli displacement transformation, we can obtain:

[0071] y t+1 =(2y t mod1

[0072] Step 3.2: Initialize parameters h, B, E, and N, and define the maximum number of iterations, Max_interation.

[0073] Step 3.3: Calculate the fitness value for each individual.

[0074] Step 3.4: Use a roulette wheel selection strategy to select individuals in the spotted hyena population based on their fitness values. First, transform the fitness function into its reciprocal to change the objective from minimizing to maximizing. Then, calculate the individual selection probability P(i) and cumulative probability Q(x) based on the transformed fitness values. i A number is randomly generated within the interval [0 1]. The spotted hyena individuals corresponding to the interval in which the number falls enter the offspring population, and the resulting individuals constitute a new generation of spotted hyena population.

[0075]

[0076] Step 3.5: Determine whether the algorithm performs a global search or a local search based on the value of the convergence factor E. If |E| < 1, then the improved adaptive genetic algorithm is used for a local search; if |E| > 1, the algorithm performs a global search, searching for new group solutions for the spotted hyenas, calculating and updating the fitness value of each individual, determining whether the algorithm has reached the termination condition, and outputting the optimal solution of the algorithm.

[0077] Step 3.6: When |E| < 1, perform a local search using the improved adaptive genetic algorithm. Update the adaptive crossover probability P. c and adaptive mutation probability P m Then, crossover and mutation operations are performed. The fitness function F of the adaptive genetic algorithm is improved, and the improved fitness function F is used to calculate the fitness of the new generation of spotted hyena individuals. At this point, if the algorithm termination condition is not met, the roulette wheel selection strategy is continued to generate the next generation of individuals, and |E| is used to determine whether to perform a global search or a local search in the next step. If the algorithm termination condition is met, the optimal solution is output, and the algorithm ends.

[0078]

[0079]

[0080] F = f(X) * e(1 + λ * |f(X)|)

[0081] Step 3.7, Algorithm Termination Condition. Determine if the maximum number of iterations has been reached. If it has, output the position of the optimal individual, which is the optimal solution to the problem. If not, return to step 3.4.

[0082] Example 2:

[0083] Experimental Case Simulation

[0084] Based on Example 1, the data for this experiment came from historical retail order data of front-line tobacco companies, which included 3473 batches of orders and 8118 sample packs of cigarettes of four different types. The method of Example 1 was used to process the optimal packing scheme. Each batch of orders was highly unique. For example, an order ending in 294 required 40 packs of type A cigarettes, 15 packs of type B cigarettes, and 5 packs of type C cigarettes; an order ending in 233 required 33 packs of type A cigarettes, 3 packs of type B cigarettes, 1 pack of type C cigarettes, and 4 packs of type D cigarettes. The specifications of the different types of cigarettes were different, as shown in Table 2.

[0085] Table 1 Specifications of Cigarettes

[0086] Tab.1 Strip cigarette specifications

[0087]

[0088] Note: l -- length of the cigarette pack; w -- width of the cigarette pack; h -- height of the cigarette pack

[0089] Experimental process

[0090] Step 1: Determine the weight coefficients in objective formula (1). The Analytic Hierarchy Process (AHP) is used to assign weights to the four optimization objectives, and the importance of the objective functions is determined to be in the following order: minimization of packet number, packet stability, packet regularity, and packet splitting balance. Referring to the importance scaling table, the importance analysis results are shown in Table 3. Finally, the optimal weight scheme is determined to be α1 = 0.5 α2 = 0.3 α3 = 0.1 α4 = 0.1 (retain one significant figure).

[0091] Table 2 Importance Analysis Table

[0092] Tab.2 Importance analysis table

[0093]

[0094] Step 2: Simulation training was performed on 3473 order data. The population size was set to 30, and the maximum number of iterations was set to 200. Particle Swarm Optimization (PSO), Whale Optimization (WOA), Improved Whale Optimization (IWOA), Genetic Algorithm (GA), Spotted Hyena Optimization (SHO), and Hybrid Adaptive Genetic Spotted Hyena Optimization (GASHO) were used to solve the problem. The specific implementation process is as follows: First, all data was imported from Excel. Then, a cell array was defined to store the data. Each element in the array corresponds to the demand data of each order. Next, this array was used as the input condition for the program. Running the program will output the optimal value and the optimal packaging scheme. The program was set to run automatically 100 times, and a new variable was defined to store the result of each run.

[0095] Step 3: Export the results to Origin for data analysis and graphing. In SHO and GASHO, set parameter C to 2, parameter β to 6, mutation rate F to 0.4, and crossover rate C... r The value is 0.1.

[0096] Test results

[0097] This article takes a retail order as an example (the order includes 4 types of cigarettes, totaling 68 cartons), calculates the average value after 100 iterations for each algorithm model, and obtains the following result: Figure 4 The iterative convergence rate curve shown is shown.

[0098] Simulation experiments show that the total cost of packaging orders according to the optimal scheme is 3,354,473.792. The optimal packaging scheme is shown in Tables 3 and 4, and the optimal combined packaging scheme is shown in Table 5.

[0099] Table 3 Optimal Package Combination Scheme

[0100] Tab.4-1 Optimal packaging scheme

[0101]

[0102] Note: - indicates that cigarette packs are not placed on this floor.

[0103] Table 4 Optimal Package Combination Scheme

[0104] Tab.4-2 Optimal packaging scheme

[0105]

[0106] Note: Packets 5, 6, 7, and 8 (the third and fourth layers) do not contain any packs of cigarettes, therefore they are not shown in the table. Table 5 shows the optimal combined pack solution.

[0107] Tab.5 Optimal contracting scheme

[0108]

[0109] Note: The cigarette pack numbers are arranged in the order of the packs from bottom to top.

[0110] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.

Claims

1. A method for automatically assembling retail orders based on a hybrid genetic spotted hyena optimization algorithm, characterized in that... Includes the following steps: Step S1: Based on the overall design process of automatic product packaging, determine the optimization objectives, variables, and constraints. The functional expressions for the optimization objectives are as follows: The function expression for minimizing the number of packets is as follows: ; ;(1) In the formula, P represents the waste volume of the cigarette pack, P j This represents the waste volume of the j-th cigarette pack. Let X represent the length, width, and height of the j-th cigarette pack, respectively. ij This is a 0-1 variable used to determine whether the i-th cigarette pack is inside the j-th pack. , , Let represent the length, width, and height of the i-th cigarette pack, respectively. The optimal function expression for bag stability: ; In the formula, a spatial rectangular coordinate system is established with the top left corner of the cigarette pack as the origin. The coordinates of the center of gravity of each layer are calculated, and the eccentricity is calculated based on the coordinates of the center of gravity of the first layer. S represents the overall eccentricity of the center of gravity of the cigarette pack. , , Let x, y, y represent the length, width, and height of the k-th layer of the j-th cigarette pack, respectively. This represents the maximum number of stacked layers for cigarette pack j; The optimal function expression for package type regularity: ; In the formula, B represents the dimensional difference between the layers inside the cigarette pack. , , and , , Let r represent the length, width, and height of the (k+1)th and kth layers of the j-th cigarette pack, respectively. j This represents the maximum number of stacked layers for cigarette pack j; The best functional expression for packet unpacking balance: ; In the formula, E represents the size difference between cigarette packs. and Let x represent the length, width, and height of the (j+1)th cigarette pack and the length, width, and height of the jth cigarette pack, respectively. The objective function for this packet grouping optimization is the sum of the objective functions for minimizing the number of packets, optimizing packet stability, optimizing packet regularity, and optimizing packet unpacking balance, along with their respective weight coefficients. The constraints are multiple or all of the following: cigarette material size constraints, cigarette pack specification constraints, layer width constraints, layer height difference constraints, layer length constraints, packing constraints, and layout constraints; wherein, the layer width constraint restricts the dimensional relationship between layers within the same cigarette pack; the layer height difference constraint restricts the allowable difference range between the heights of adjacent layers within the same cigarette pack; the layer length constraint restricts the length of the inner layers of the cigarette pack and the number of stackable layers of the cigarette pack; the packing constraint restricts the total height after packing to be constrained by the specifications of the packaging machine; and the layout constraint establishes a set of layout rules for the cigarette packing process. Step S2: The spotted hyena optimization algorithm is used to solve the model, mapping the optimization process of the product packaging scheme to the foraging behavior of spotted hyenas. It imitates the spotted hyena's search, encirclement, hunting, and attack process for prey, progressively optimizing the product packaging method. The position of each individual in the population Q composed of N product individuals in the kth iteration is determined. This represents a solution to the problem. During the iteration process, other spotted hyenas continuously move towards the spotted hyena closest to the prey to update their positional state, thus realizing the optimization process of the algorithm. Step S3: The chaotic sequence generated by the Tent mapping is used to initialize the spotted hyena population with chaos. A roulette wheel selection strategy is introduced into the spotted hyena optimization algorithm. The solution obtained by the spotted hyena optimization algorithm is used as the initial state. Then, a genetic algorithm is used to optimize it to enhance the algorithm's optimization ability. The hybrid genetic spotted hyena optimization algorithm is used to optimize and solve the problem of automatic packing of cigarette retail orders, thereby obtaining the optimal cigarette packing scheme.

2. The method for automatically packaging retail orders according to claim 1, characterized in that, Cigarette pack material size constraints: The size range is determined based on the product specifications in historical orders. ; Packaging specifications are constrained by the dimensions of the packaging machine's aisle and the conveyor belt. ; Layer width constraint: To ensure the overall stability of the cigarette pack, constraints are imposed on the dimensional relationships between the layers within the same cigarette pack. (8) (9) Height difference constraint: The allowable range of height difference between adjacent layers within the same cigarette pack. The number of stackable layers of cigarette packs is closely related to the height difference. (10)(11)(12) Layer length constraint: The inner layer length of the cigarette pack is closely related to the number of stackable layers of the cigarette pack; (13) Packing Constraints: Based on customer needs, individual cigarette packs are combined into one package. The total height of the combined package is constrained by the packaging machine specifications. Furthermore, to ensure the overall stability of the combined package, restrictions are placed on the dimensions of the upper and lower cigarette stacks. (14) (15) Layout constraints: To ensure the overall stability, regularity, and balance of the cigarette packs, a set of layout rules has been established for the cigarette packing process, and the packing operation must be strictly carried out in accordance with these rules: (16) (17) (18) in, , , Let the length, width, and height of the i-th cigarette be represented respectively. Let the length, width, and height of the j-th cigarette pack be represented respectively. , , and , , Let the length, width, and height of the (k+1)th and kth layers of the j-th cigarette pack be represented respectively. , , , All variables are 0-1, used to determine whether the i-th cigarette pack is inside the j-th pack, whether the i-th cigarette pack is in the k-th layer of the j-th pack, whether the height of cigarette pack i is within its maximum height and allowable height range, and whether the j-th individual pack is inside the q-th pack. Indicates the height of the combined package q. This represents the height of the j-th pack of cigarettes. and They represent the q-th package and the t-th package respectively. q The width of the topmost layer and the qth merged layer t q The width of the bottom layer, c q Indicates the number of layers in the package q. and These represent the j-th group package being ranked in the β-th and k-th layers, respectively. The height of a single pack of cigarettes, and These represent the numbers within the j-th group package. and The width of the cigarette pack and These represent the numbers within the j-th group package. and The length of the cigarette pack.

3. The method for automatically packaging retail orders according to claim 1, characterized in that, Step S2 also includes: Step 2.1: Initialize the location of the spotted hyena population; Step 2.2: Initialize relevant parameters; Step 2.3: Calculate the fitness value of each individual based on the objective function. Individuals with lower fitness values ​​are better. Step 2.4: Map the process of product packaging to the iterative evolution of information exchange and follow-up search within the spotted hyena population, calculate and update the fitness value of the search individual, update the position of the spotted hyena population, until the position corresponding to the optimal fitness value of the individual is found.

4. The automatic retail order packaging method according to claim 1, characterized in that, Step S3 also includes: Step 3.1: Initialize the population location X i The chaotic sequence generated by the Tent mapping is selected to perform chaotic initialization on the spotted hyena population; Step 3.2: Initialize parameters h, B, E, and N, and define the maximum number of iterations Max_interation; where: h represents the convergence coefficient, B represents the behavior coefficient, E represents the escape coefficient, and parameter N represents the total number of search agents; Step 3.3: Calculate the fitness value for each individual; Step 3.4: Use the roulette wheel strategy to select individuals from the spotted hyena population based on their fitness values, and the resulting individuals will constitute a new generation of spotted hyena population. Step 3.5: Determine whether the algorithm performs a global search or a local search based on the value of the convergence factor h; Step 3.6: When performing local search using the improved adaptive genetic algorithm, the fitness function F of the adaptive genetic algorithm is improved, and the fitness of the new generation of spotted hyena individuals is calculated using the improved fitness function F. If the algorithm's termination condition is not met at this point, the roulette wheel selection strategy continues to generate the next generation of individuals. Determine whether to perform a global search or a local search next. If the algorithm's termination condition is met, output the optimal solution and the algorithm ends. Step 3.7: Algorithm termination condition. Determine if the maximum number of iterations has been reached. If it has, output the position of the optimal individual, which is the optimal solution to the problem. If it has not been reached, return to step 3.4.