K-parallel row sorting problem solving method considering multiple channels
Through Q-learning enhanced genetic algorithm (QVGA) optimization facility layout, the problem of collaborative optimization of multi-row layout and longitudinal material handling channels in the existing technology is solved, and efficient facility planning is achieved to adapt to the rapid response and flexible production needs of modern manufacturing.
Patent Information
- Application Number
- CN202510632536.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-08-22
AI Technical Summary
The existing research on parallel row sorting problems mainly focuses on two-row layouts, which are difficult to reflect the actual production needs of multi-row layouts, and ignores the coordinated optimization of vertical material handling channels and the interactive impact of AGV cluster scheduling, resulting in limited application value in complex industrial environments.
The variable neighborhood search genetic algorithm (QVGA) that integrates Q-learning is adopted to generate populations through greed strategies, and combined with the roulette mechanism and Q-learning's mutation operation, the facility layout is optimized to solve the problem of k-parallel row sorting in multiple channels, and to realize the collaborative planning of multi-row layout.
It improves the algorithm performance and can provide optimized solutions in a short time, significantly improves the solution efficiency and accuracy, and adapts to the facility layout needs in complex industrial environments.
Smart Images

Figure CN120525112A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of facility layout, in particular to a method for solving a k-parallel row sorting problem considering multiple channels. Background Art
[0002] The present invention relates to a facility layout mode and method, and more specifically to a modeling and optimization method for a parallel row sorting problem that collaboratively considers longitudinal material handling channels and multi-party layout.
[0003] The Parallel Row Ordering Problem (PROP) is an emerging optimization model in the field of facility planning. Its core goal is to minimize material handling costs by optimizing the spatial arrangement of facilities. This problem focuses on how to rationally layout production facilities in a parallel arrangement. This design approach is particularly suitable for production environments that require equipment partitioning, such as food fermentation, machining, and semiconductor industries. The use of a parallel row layout can effectively improve material transportation efficiency and enhance the flexibility of the production system, making it better adapted to the modern manufacturing industry's demand for rapid response and flexible production. Because this layout method can significantly improve the operational efficiency of the workshop, it has attracted widespread attention in the field of industrial engineering in recent years and has become one of the important research directions for promoting the intelligent upgrading of manufacturing.
[0004] In the planning and design of smart workshops, material handling channels serve as the core hub of the logistics system, and the rationality of their layout directly determines the overall efficiency of the production system. Channel design is not only related to material flow efficiency and production cost control, but is also closely related to key indicators such as operational safety and the optimal allocation of spatial resources. With the advent of the Industry 4.0 era, modern manufacturing systems have placed higher demands on channel design. They must simultaneously meet the requirements of flexible production, rapid changeovers, and the operation of intelligent logistics equipment. In particular, they must adapt to the collaborative operation requirements of intelligent equipment such as automated guided vehicles (AGVs) and autonomous mobile robots in the high-variety, low-batch production model.
[0005] However, current research in the field of PROP has obvious limitations. Through literature review, it is found that existing research focuses on the optimization of two-row layout, mainly exploring the optimal configuration of facility units in the horizontal arrangement. Although this simplified model is convenient for theoretical analysis, it is difficult to reflect the complex scenarios in actual production. Specifically, (1) it ignores the more universal industrial scenario of multi-row (three or more rows) layout; (2) there is a lack of systematic research on longitudinal material handling channels, especially the collaborative optimization problem of channel width, location and facility layout; (3) it fails to fully consider the interactive effect of AGV cluster scheduling and channel layout in modern intelligent workshops. These research gaps seriously restrict the application value of PROP theory in complex industrial environments. On this basis, the k-parallel row ordering problem with multi-handling passes (kPROP_P) is proposed to explain and supplement the weak links in PROP theory. At the same time, it can be seen that the investigation and research on kPROP_P will be more helpful to establish a multi-row layout optimization model that better meets the actual production needs. Summary of the Invention
[0006] In view of this, the present invention combines the global search capability of genetic algorithm with the learning ability of Q-learning and proposes a Q-learning enhanced Variable Neighborhood Search Genetic Algorithm (QVGA) to solve kPROP_P. It can conduct in-depth investigation on the collaborative planning of multi-row layout and longitudinal material handling channels, thereby obtaining a multi-row layout optimization model that is closer to reality.
[0007] The technical solution of the present invention is a method for solving the k-parallel row sorting problem considering multiple channels, comprising the following steps:
[0008] Step S1: Collect facility layout information and determine the objective function with material handling cost as the optimization target;
[0009] Step S2: Initialize parameters and calculate the channel coordinate information within the area;
[0010] Step S3: Generate population P1 and randomly generate population P2 using the greedy strategy, and combine them into the initial population P;
[0011] Step S4: Calculate the fitness of all solutions in the initial population and select the elite solutions;
[0012] Step S5: Based on fitness, a roulette wheel mechanism is used to select solutions other than the elite solutions in the initial population to execute a genetic cycle and retain the elite solutions;
[0013] Step S6: performing a crossover operation on the selected solution;
[0014] Step S7: Perform a Q-learning-based mutation operation on the crossover solution;
[0015] Step S8: The mutated population that retains the elite solution is combined with the populations P1 and P2 obtained by the greedy strategy and random generation to update the population;
[0016] Step S9: Determine whether the maximum number of iterations has been reached. If not, return to step S4 to continue iterative calculation. If reached, output the result.
[0017] The technical effects of the present invention are:
[0018] The variable domain genetic algorithm based on Q-learning proposed in this invention effectively improves the performance of the algorithm. A mixed integer linear programming model is established to consider kPROP_P, which can provide an optimal solution to kPROP_P in a relatively short time. Its solution efficiency is significantly better than that of conventional exact solvers, and its solution effect is also better than other algorithms. It provides reliable support for solving problems such as parallel row layout planning in facility layout. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments.
[0020] Figure 1 This is the overall flow chart of the algorithm in the present invention;
[0021] Figure 2 Schematic diagram of the encoding and decoding process of kPROP_P in the present invention;
[0022] Figure 3 Schematic diagram of the state space of Q-learning in the mutation operation of the present invention;
[0023] Figure 4 Schematic diagram of the Q-learning action in the mutation operation of the present invention;
[0024] Figure 5 The box plot is a comparison of the results of ITSGA and QVGA in the present invention. DETAILED DESCRIPTION
[0025] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings.
[0026] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0027] A method for solving the k-parallel row sorting problem considering multiple channels includes the following steps:
[0028] Step S1: Collect facility layout information and determine the objective function with material handling cost as the optimization target. The objective function is:
[0029]
[0030] In formula (1), F is the material handling cost; i, j are facility numbers; dx ij is the distance between facility i and facility j in the x direction; dy ij is the distance between facility i and facility j in the y direction;
[0031]
[0032] y ik =(k-1)(w+c),1≤k≤K,i∈N (4)
[0033] dx ij ≥x i -x j ,1≤i<j≤n (5)
[0034] dx ij ≥x j -x i ,1≤i<j≤n (6)
[0035] dx ij ≥x i +x j -2xc m -L(1-P ijm ),1≤i<j≤n,1≤m≤M(7)
[0036] dx ij ≥2xc m -x i -x j -L(1-P ijm ),1≤i<j≤n,1≤m≤M (8)
[0037]
[0038]
[0039] dy ij ≥w+c, 1≤i<j≤n (11)
[0040]
[0041]
[0042] In formulas (2) to (32), i, j, and p are facility numbers; n is the number of facilities; m is the number of longitudinal channels; M is the number of longitudinal channels; w is the width of the facility; l i is the length of facility i; l j is the length of facility j; N z N is the set of intermediary bank facility numbers; k is the set of the first and last row facility numbers; k is the number of the distribution row; K is the total number of rows; z ijk is a 0-1 variable. When facilities i and j are arranged in the kth row and facility j is arranged to the right of facility i, z ijk =1;z jik is a 0-1 variable. When facilities i and j are arranged in the kth row and facility i is arranged to the right of facility j, z jik =1; s is the switch variable, s∈{1,2}, s=1 represents the left side of the channel, s=2 represents the right side of the channel; y ik is the y coordinate of facility i in row k; x i is the horizontal coordinate of facility i; x j is the horizontal coordinate of facility j; y i is the vertical coordinate of facility i; j is the vertical coordinate of facility j; c is the width of the channel; xc m is the horizontal coordinate of the longitudinal channel m; β is is a 0-1 variable. When facility i is on the left side of the middle channel, β is =1;β js is a 0-1 variable. When facility j is on the left side of the middle channel, β js =1;α ijs is a 0-1 variable. When facility i is on the left side of facility j, and i and j are on the same side of the middle channel, α ijs =1;α jis is a 0-1 variable. When facility j is on the left side of facility i and i and j are on the same side of the middle channel, α jis =1;α jps is a 0-1 variable. When facility j is on the left side of facility p, and p and j are on the same side of the middle channel, α jps =1;α pisis a 0-1 variable. When facility p is on the left side of facility i, and i and p are on the same side of the middle channel, α pis =1;dx ij is the distance between facility i and facility j in the x direction; dy ij is the distance between facility i and facility j in the y direction; P ijm is a 0-1 variable. When the materials of facilities i and j interact through the mth channel, P ijm =1;Y ik is a 0-1 variable. When facility i is arranged in the kth row, Y ik =1;Y jk is a 0-1 variable. When facility j is arranged in the kth row, Y jk =1; L is a constant greater than the sum of the lengths of all facilities; q ij is a 0-1 variable. When facilities i and j are arranged in the same row or adjacent rows, q ij =1.
[0043] Among them, formulas (2) to (4) are used to determine the horizontal and vertical coordinates of the facilities; formulas (5) to (11) are used to determine the horizontal and vertical material handling distances between facilities; formulas (12) to (13) are used to prevent overlapping interference between facilities; and formulas (14) to (15) are used to prevent overlapping interference between facilities and longitudinal channels.
[0044] Formulas (16) and (17) are used to determine the vertical relative relationship between facilities i and j, q ij = 0 means that facilities i and j are in two non-adjacent rows and need to pass through a certain longitudinal channel for material interaction; Formulas (18) to (19) are used to determine whether the material interaction between facilities i and j must pass through the longitudinal channel m; Formula (20) constrains that the material interaction between the two facilities can only pass through one longitudinal channel at most; Formulas (21) to (22) are used to determine the constraint variable q ij and z ijk The value of; Formula (23) restricts facility i to be arranged in one row; Formulas (24) to (25) are used to constrain z ijk The range of values; Formulas (26) to (27) are used to limit the facilities in the middle row and can only be arranged on one side of the middle longitudinal channel; Formulas (28) to (30) are used to constrain α ijs The value range of ; Equations (31) to (32) are used to limit the value range of decision variables;
[0045] Step S2: Initialize parameters and calculate the channel coordinate information within the area;
[0046] The parameters mainly include the total number of rows k, population size N, maximum genetic generations Gg, selection rate Sr, crossover rate Pc, mutation rate Pm, elite rate Er, number of Q-learning training rounds Qg, learning rate α, discount factor γ and exploration rate ε. The channel coordinate information that needs to be calculated and determined includes: channel width c, vertical coordinate y of each row of facilities, horizontal coordinate x_c of the first channel on the left and the middle channel.
[0047] Step S3: Generate population P1 and randomly generate population P2 using the greedy strategy, and combine them into the initial population P;
[0048] Step S4: Calculate the fitness of all solutions in the initial population and select the elite solutions;
[0049] Step S5: Based on fitness, a roulette wheel mechanism is used to select solutions other than the elite solutions in the initial population to execute a genetic cycle and retain the elite solutions;
[0050] In kPROP_P, for the first and last rows, the facilities are adjacent to each other. However, for the middle rows, the existence of the vertical channel needs to be considered, so the horizontal coordinates need to be calculated to find possible interference. If interference occurs, the facilities are arranged close to the channel, that is, the elements starting from the interfering facilities are moved to the right to achieve sequence decoding, as shown below. Figure 2 shown.
[0051] To improve the algorithm's solution efficiency, this study proposed a greedy strategy based on material handling volume and gaps. Its core concept is to prioritize facility pairs with the most frequent logistics interactions within the same row, reducing the handling distance between facilities with high logistics interaction. At the same time, any gaps in the middle rows should be minimized, thereby reducing the material handling distance required to cross these gaps. Before entering the genetic algorithm, we use this strategy to generate half of the initial population. After the mutation operation, we use this strategy to repair the population before entering the next genetic cycle.
[0052] In addition, in order to prevent the loss of high-quality solutions during the iteration process, the algorithm proposed in this invention also introduces an elite strategy. Its core idea is to copy the first several individuals with the highest fitness in each generation and retain them for the next generation of genetic operations. This strategy can ensure that the algorithm will not degenerate, but the elite solution is likely to dominate the population and reduce population diversity. Therefore, after each generation of mutation operations, half of the population is randomly generated to enrich the diversity of the population and improve the global search ability of the algorithm. These two strategies provide a candidate solution set that is both directional and diverse for subsequent selection and crossover operations.
[0053] Therefore, in the population initialization stage, a hybrid initialization strategy is adopted to generate high-quality individuals through greedy heuristic rules and combine them with random generation methods to construct the initial population, effectively balancing the diversity of the population and the quality of the initial solution.
[0054] Step S6: performing a crossover operation on the selected solution, where the crossover operation may adopt a conventional single-point or multi-point crossover;
[0055] Step S7: Perform a Q-learning-based mutation operation on the crossover solution;
[0056] Among them, the mutation operation based on Q-learning includes the following steps:
[0057] Step S71: Calculate the Hamming distance D of the solution H The target value F corresponding to the solution;
[0058] Step S72: Determine the solution state, generate a random number R, and compare it with the exploration rate ε. When the random number R is less than the exploration rate ε, randomly select an action to explore the solution space. When the random number R is greater than the exploration rate ε, select the action with the largest Q value in the Q table to execute.
[0059] Step S73: Update the solution and its status, calculate the fitness of the new solution, and update the Q table;
[0060] Step S74: Determine whether the upper limit of the number of training rounds of Q-learning has been reached. If so, end the mutation operation and output the current population. If not, return to step S71 to continue the mutation operation.
[0061] The action value function update formula of Q-learning is shown in formula (33). Where α is the learning rate, γ is the discount factor, s is the state, a is the action, r t+1 To perform action a t The immediate reward obtained after the action is completed. In Q-learning, the design of the state space and action space directly affects the learning efficiency and strategy quality of the algorithm. Based on the characteristics of the problem, this paper sets 12 states in the state space and six actions in the action space.
[0062] Q(s t ,a t )←Q(s t ,a t )+α[r t+1 +γmax a Q(s t+1 ,a)-Q(s t ,a t )](33)
[0063] ε-greedy is a classic exploration-exploitation balance strategy in reinforcement learning. This paper uses this strategy to explore a neighborhood: a random number is generated. If the random number is less than the exploration rate ε, an action is randomly selected to explore the solution space. If the random number is greater than the exploration rate ε, the action with the highest Q value in the Q-table is selected.
[0064] The state space of Q-learning needs to reflect the optimization state of the current population, including characteristics such as gene diversity and expression diversity. In the present invention, the state space of Q-learning is represented by the Hamming distance D H , the target value F and the genetic algebra gen of the algorithm as a whole are composed of three key variables, such as Figure 3 As shown, the Hamming distance D H There are two states: "greater than half of the problem size (rounded up)" and "less than or equal to half of the problem size"; the target value F includes three states: "the current target value Fp is less than (better than) the target value Fc of the solution before the neighborhood search", "the current target value Fp is equal to the target value Fc of the solution before the neighborhood search", and "the current target value Fp is greater than the target value Fc of the solution before the neighborhood search"; and the genetic algebra gen includes two states: "greater than half of the maximum genetic algebra" and "less than or equal to half of the maximum genetic algebra". The above three key variables can be combined in different states to produce a total of 12 situations, i.e. 12 states. Among them, the Hamming distance can quantify the genotype diversity of the population, avoid premature convergence, and guide the selection of mutation operators; the target value can reflect the quality of the current solution; and the genetic algebra can identify the optimization stage and enhance the dynamic adaptability of the algorithm in the early and late stages.
[0065] Among them, the Hamming distance is a metric used to measure the number of different genes at the same position in two coding sequences of equal length. The core idea is to quantify their similarity by comparing the number of bits of difference between the two sequences. Suppose there are two sequences x and y of length n, and their Hamming distance D H The calculation formula is shown in formula (34), where 1(x i ≠y i ) is the indicator function, when x i ≠y i The value is 1 when , otherwise it is 0.
[0066]
[0067] In the optimization algorithm framework based on Q-learning, the structural design of the action space is the core factor affecting the agent's strategy selection and search efficiency. Figure 4As shown, the algorithm framework proposed in the present invention constructs a composite action space containing six heterogeneous neighborhood search operators, including single-segment 2-opt exchange, multi-segment 2-opt exchange, single-segment sequence reversal, multi-segment sequence reversal, single-segment single-point insertion and multi-segment multi-point insertion. Among them, the single-segment and multi-segment operations correspond to the number of subsequences processed in a single mutation, respectively. The multi-segment operation realizes the breadth exploration of the solution space by adjusting multiple subsequences at the same time, while the single-segment operation focuses on the fine adjustment of a single subsequence to perform local deep optimization. Through the deep coupling design of the action space and the state space, the intelligent agent can dynamically adjust the neighborhood search strategy according to the algorithm operation stage, give priority to multi-segment operations in the early stage of genetic algorithm iteration to enhance the exploration ability, and focus on single-segment operations to improve the convergence accuracy in the later optimization stage. This hierarchical action structure effectively balances the dynamic needs of global exploration and local development, and significantly improves the efficiency and stability of the optimization process.
[0068] The 2-opt operation involves randomly selecting two elements from the solution sequence and swapping their positions; the inversion operation involves reversing the order of a subsequence within the solution sequence; and the insertion operation involves randomly selecting an element from a segment and inserting it into a new position within the segment. This design achieves dynamic coupling with state space characteristic parameters through a gradient combination of single-segment and multi-segment operations, effectively responding to optimization requirements at different stages of the evolutionary process. Through a Q-learning-driven online strategy selection mechanism, the algorithm adaptively selects the optimal neighborhood search operator based on population diversity indicators and convergence state characteristics, significantly enhancing its ability to explore complex solution spaces while ensuring convergence speed.
[0069] Step S8: The mutated population that retains the elite solution is combined with the populations P1 and P2 obtained through the greedy strategy and random generation to update the population. Specifically, the non-elite solution population selected from the initial population according to the roulette wheel is mutated, and the remaining part is filled with populations P1 and P2 to form a new population with the same size as the initial population P. The new population consists of four parts: the solution population after the mutation operation, the elite solution population, the P1 population, and the P2 population. When filling, the sizes of populations P1 and P2 are equal.
[0070] Step S9: Determine whether the maximum number of iterations has been reached. If not, return to step S4 to continue iterative calculation. If reached, output the result.
[0071] The following is a demonstration of the actual operation of this embodiment:
[0072] Program testing environment:
[0073] The simulation computing environment is an Intel(R) Core(TM) i5-9300H processor with a main frequency of 2.4GHz, Windows 11 operating system, and 16.00GB of memory.
[0074] Algorithm performance test:
[0075] Therefore, in order to verify the accuracy of the established model, the present invention uses Pycharm2024.3 to call the precise solver Gurobi to solve the model. In order to verify the solving performance of QVGA, three algorithm programs, GA, improved taboo search genetic algorithm (ITSGA) and QVGA, are written in Python language to solve several examples with kPROP_P scales of 9 to 60. The length of the facility and the logistics matrix are taken from classic examples in the field of facility layout.
[0076] After experimental testing, the various parameters of QVGA were determined as shown in Table 1. Then, the same parameters were kept consistent in the three algorithms of GA, ITSGA and QVGA. The algorithm was run 10 times for each case, and the results were rounded to one decimal place and organized in Table 2, where Gap is the solution deviation, Obj represents the minimum target value, and SD is the standard deviation.
[0077] Table 1 QVGA algorithm parameters
[0078] scale N Gg Sr PC Pm Er Q α γ ε 9≤n≤13 20 20 0.2 0.4 0.8 0.1 20 0.1 0.9 0.1 25≤n≤30 30 30 0.4 0.4 0.8 0.1 40 0.1 0.9 0.1 n=40 40 40 0.5 0.5 0.6 0.05 60 0.1 0.9 0.2 n=60 60 60 0.5 0.5 0.6 0.05 100 0.1 0.9 0.2
[0079] As shown in Table 2, for small-scale examples with a size of less than 13, the Gurobi solver can effectively obtain the global optimal solution with a Gap of 0%, verifying the accuracy of the mathematical model established in this paper:
[0080] Table 2. Solution results of small-scale examples using Gurobi solver, GA, ITSGA, and QVGA
[0081]
[0082] However, as the problem size increases, the number of variables and constraints also increases, leading to a sharp increase in the complexity of the solution space, increasing the difficulty of solving the problem and even making it impossible to converge within a reasonable time. Therefore, to balance solution quality and computational time, this paper sets the Gurobi runtime to 18,000 seconds, as shown in Table 3:
[0083] Table 3. Results of large-scale examples solved by Gurobi solver, GA, ITSGA and QVGA
[0084]
[0085]
[0086] Tables 2 and 3 show that the QVGA algorithm demonstrates significant advantages in solving cases of varying scales. For small cases of 13 or fewer, QVGA's results are consistent with Gurobi's, with standard deviations of 0. This demonstrates its ability to stably converge to the global optimal solution for small-scale problems, validating the algorithm's fundamental solving capabilities. For medium and large cases of 25 to 60, QVGA's target values outperform the other two algorithms, demonstrating its superior global search capabilities for complex problems. Furthermore, compared with the other algorithms, QVGA's SD values are the lowest in the vast majority of cases, indicating less fluctuation in results across multiple runs and superior stability. In particular, for large-scale cases, QVGA not only outperforms the comparison algorithms in target values, but also maintains low SD values, demonstrating its comprehensive advantage in balancing solution quality and stability in complex scenarios. In summary, QVGA, through optimized algorithmic mechanisms, improves solution accuracy while effectively suppressing result fluctuations. It is particularly suitable for large-scale applications and demonstrates high practical value.
[0087] Afterwards, 10 cases from the 9 to 60 scales were randomly selected and solved using ITSGA and QVGA respectively. Each case was run ten times and the results were stored. The obtained data was processed using the formula to calculate the relative percentage deviation (RPD): RPD = (rR) / R × 100%. Where r represents the current target value and R represents the minimum target value among the 20 data in the same group. The processed data was plotted into a box plot, as shown in the figure below. Figure 5 As shown, the red solid line, black dotted line, upper and lower edge lines of the rectangular box, and upper and lower black solid lines represent the median, mean, upper and lower quartiles, and maximum value of the data, respectively.
[0088] like Figure 5 As shown in the figure, both ITSGA and QVGA demonstrate good performance when solving small-scale examples. However, as the problem size increases, the box plots of the two methods show significant differences. The interquartile range of QVGA is narrower than that of ITSGA. Furthermore, ITSGA exhibits outliers in some examples, which statistically confirms QVGA's superior numerical stability. Furthermore, in most examples, the median of QVGA is significantly lower than that of ITSGA, further demonstrating that QVGA has higher reliability in solution quality and a smaller degree of dispersion in its results.
[0089] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the embodiments of the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for solving the k-parallel row sorting problem considering multiple channels, characterized in that: The following steps are involved: Step S1: Collect facility layout information and determine the objective function with material handling cost as the optimization target. The objective function is: In formula (1), F is the material handling cost; i, j are facility numbers; dx ij is the distance between facility i and facility j in the x direction; dy ij is the distance between facility i and facility j in the y direction; Step S2: Initialize parameters and calculate the channel coordinate information within the area; Step S3: Generate population P1 and randomly generate population P2 using the greedy strategy, and combine them into the initial population P; Step S4: Calculate the fitness of all solutions in the initial population and select the elite solutions; Step S5: Based on fitness, a roulette wheel mechanism is used to select solutions other than the elite solutions in the initial population to execute a genetic cycle and retain the elite solutions; Step S6: performing a crossover operation on the selected solution; Step S7: Perform a Q-learning-based mutation operation on the crossover solution; Step S8: The mutated population that retains the elite solution is combined with the populations P1 and P2 obtained by the greedy strategy and random generation to update the population; Step S9: Determine whether the maximum number of iterations has been reached. If not, return to step S4 to continue iterative calculation. If reached, output the result.
2. The method for solving the k-parallel row sorting problem considering multiple channels according to claim 1, characterized in that: The constraints of the optimization objective are: dx ij ≥x i +x j -2xc m -L(1-P ijm ),1≤i<j≤n,1≤m≤M (7) dx ij ≥2xc m -x i -x j -L(1-P ijm ),1≤i<j≤n,1≤m≤M (8) of ij ≥w+c,1≤i<j≤n (11) P ijm ≤1-q ij ,1≤i,j≤n,i≠j,1≤m≤M (19) In formulas (2) to (32), i, j, and p are facility numbers; n is the number of facilities; m is the number of longitudinal channels; M is the number of longitudinal channels; w is the width of the facility; l i is the length of facility i; l j is the length of facility j; N z N is the set of intermediary bank facility numbers; k is the set of the first and last row facility numbers; k is the number of the distribution row; K is the total number of rows; z ijk is a 0-1 variable. When facilities i and j are arranged in the kth row and facility j is arranged to the right of facility i, z ijk =1;z jik is a 0-1 variable. When facilities i and j are arranged in the kth row and facility i is arranged to the right of facility j, z jik =1; s is the switch variable, s∈{1,2}, s=1 represents the left side of the channel, s=2 represents the right side of the channel; y ik is the y coordinate of facility i in row k; x i is the horizontal coordinate of facility i; x j is the horizontal coordinate of facility j; y i is the vertical coordinate of facility i; j is the vertical coordinate of facility j; c is the width of the channel; xc m is the horizontal coordinate of the longitudinal channel m; β is is a 0-1 variable. When facility i is on the left side of the middle channel, β is =1;β js is a 0-1 variable. When facility j is on the left side of the middle channel, β js =1;α ijs is a 0-1 variable. When facility i is on the left side of facility j, and i and j are on the same side of the middle channel, α ijs =1;α jis is a 0-1 variable. When facility j is on the left side of facility i and i and j are on the same side of the middle channel, α jis =1;α jps is a 0-1 variable. When facility j is on the left side of facility p, and p and j are on the same side of the middle channel, α jps =1;α pis is a 0-1 variable. When facility p is on the left side of facility i, and i and p are on the same side of the middle channel, α pis =1;dx ij is the distance between facility i and facility j in the x direction; dy ij is the distance between facility i and facility j in the y direction; P ijm is a 0-1 variable. When the materials of facilities i and j interact through the mth channel, P ijm =1;Y ik is a 0-1 variable. When facility i is arranged in the kth row, Y ik =1;Y jk is a 0-1 variable. When facility j is arranged in the kth row, Y jk =1; L is a constant greater than the sum of the lengths of all facilities; q ij is a 0-1 variable. When facilities i and j are arranged in the same row or adjacent rows, q ij =1.
3. The method for solving the k-parallel row sorting problem considering multiple channels according to claim 1, characterized in that: The parameters in step S2 include the total number of rows k, the population size N, the maximum genetic generation Gg, the selection rate Sr, the crossover rate Pc, the mutation rate Pm, the elite rate Er, the number of training rounds Qg of Q-learning, the learning rate α, the discount factor γ and the exploration rate ε.
4. The method for solving the k-parallel row sorting problem considering multiple channels according to claim 1, characterized in that: The channel coordinate information that needs to be calculated and determined in step S2 includes: the width c of the channel, the vertical coordinate y of each row of facilities, and the horizontal coordinate x_c of the first channel on the left and the middle channel.
5. The method for solving the k-parallel row sorting problem considering multiple channels according to claim 1, characterized in that: The Q-learning-based mutation operation includes the following steps: Step S71: Calculate the Hamming distance D of the solution H The target value F corresponding to the solution; Step S72: Determine the solution state, generate a random number R, and compare it with the exploration rate ε. When the random number R is less than the exploration rate ε, randomly select an action to explore the solution space. When the random number R is greater than the exploration rate ε, select the action with the largest Q value in the Q table to execute. Step S73: Update the solution and its status, calculate the fitness of the new solution, and update the Q table; Step S74: Determine whether the upper limit of the number of training rounds of Q-learning has been reached. If so, end the mutation operation and output the current population. If not, return to step S71 to continue the mutation operation.
6. The method for solving the k-parallel row sorting problem considering multiple channels according to claim 5, characterized in that: The state space of the solution in the Q-learning-based mutation operation is represented by the Hamming distance D H , target value F and genetic algebra gen three variables.
7. The method for solving the k-parallel row sorting problem considering multiple channels according to claim 5, characterized in that: The solutions in the Q-learning-based mutation operation include single-segment 2-opt exchange, multi-segment 2-opt exchange, single-segment sequence reversal, multi-segment sequence reversal, single-segment single-point insertion, and multi-segment multi-point insertion.
Citation Information
Cited By
Flexible cable assembly parameter optimization method and device based on Q-Learning genetic algorithm and medium
CN120805732A
Flexible cable assembly parameter optimization method, device and medium based on q-learning genetic algorithm
CN120805732B
Method for solving multi-vehicle coverage distribution problem through state-guided reinforcement learning-driven evolutionary algorithm
CN122114801A
