Scheduling method and device for a multi-process parallel machine shop for precious metal detection
By constructing a mathematical model and a dual-population variable neighborhood search algorithm based on Q-learning, the scheduling of multi-process parallel machine shops for precious metal detection is optimized, solving the problems of low efficiency and proneness to errors in existing technologies and achieving an efficient and accurate detection process.
Patent Information
- Application Number
- CN202411649683.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-11-19
AI Technical Summary
Existing methods for detecting precious metal alloys are inefficient and prone to errors, making it difficult to achieve efficient connection of various steps and rational allocation of resources under high-precision requirements.
A dual-population variable neighborhood search algorithm based on Q-learning is adopted to optimize the scheduling of multi-process parallel machine shops for precious metal detection by constructing mathematical models and constraints. Combined with intelligent scheduling algorithms, effective scheduling of multiple parallel detection equipment is achieved.
It improves the overall efficiency and accuracy of precious metal detection, shortens detection time, increases the utilization rate of detection equipment, and meets the strict requirements of high-tech manufacturing industry for precious metal alloy detection.
Smart Images

Figure CN119599353B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of scheduling of a multi-process parallel machine shop for precious metal alloy detection, and specifically relates to a scheduling method for a multi-process parallel machine shop for precious metal detection, and a scheduling device for a multi-process parallel machine shop for metal detection. Background Art
[0002] my country's manufacturing industry is accelerating its transformation toward intelligent and automated manufacturing, particularly in the areas of new materials and intelligent manufacturing. Improving technological innovation and production efficiency has become a crucial component of this national strategy. Precious metal alloys, as key high-tech materials, are widely used in aerospace, electronics, medical, and other fields, requiring extremely high quality. However, the testing process for precious metal alloys presents numerous challenges due to the complex steps involved and the high precision required.
[0003] Testing precious metal alloys typically involves multiple steps, including composition analysis, physical property testing, and structural testing. These testing steps are not only numerous and complex, but must also be completed under a strictly controlled environment to ensure the accuracy and consistency of the test results. Furthermore, precious metal testing involves the use of high-precision instruments and equipment, cumbersome procedures, and complex data processing. Any minor error can significantly impact the final test results. Therefore, the connection and coordination of each step in the testing process are crucial. Ensuring that each step is performed under optimal conditions and reducing the inefficiencies caused by the complexity of the testing steps has become a core challenge in precious metal alloy testing.
[0004] Traditional precious metals testing methods are mostly manual or semi-automated, which can lead to long testing cycles, low efficiency, and high error rates. Faced with these challenges, an efficient and accurate scheduling method is urgently needed to streamline the process, improve testing efficiency, and ensure the rational allocation of testing equipment and resources while maintaining high detection accuracy. Summary of the Invention
[0005] The main technical problem to be solved by the present invention is to overcome the above-mentioned defects of the prior art and provide a scheduling method and device for a multi-process parallel machine shop for precious metal detection, thereby improving scheduling efficiency and accuracy.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] According to one aspect of the present disclosure, a scheduling method for a multi-process parallel machine shop for precious metal detection is provided, comprising the following steps:
[0008] S1: Based on the analysis methods, analysis steps and corresponding testing instruments and equipment for precious metal alloy testing, with minimizing the maximum completion time as the optimization goal, a mathematical model for the multi-process parallel machine shop scheduling problem for precious metal testing is constructed, and the constraints of the mathematical model are determined;
[0009] S2: Solve the mathematical model and obtain a high-quality scheduling solution for the mathematical model;
[0010] Wherein, solving the mathematical model described in S2 includes:
[0011] S2.1: Initialize the population: This includes determining the sequence of test and analysis steps; determining the test instruments and equipment to be used for each analysis step; determining the test completion time; and setting parameters, including population size, maximum number of iterations, Q table, and number of local searches within a variable neighborhood.
[0012] S2.2: Population division: Divide the population into two equal-sized subpopulations, Pop1 and Pop2. Pop1 focuses on exploration, while Pop2 focuses on mining.
[0013] S2.3: Perform exploration operations on Pop1: Calculate the fitness value of each individual in Pop1 based on the individual objective function value and store the optimal individual in the external memory pool. Use roulette to select two individuals in Pop1 as parent individuals to perform evolution operations.
[0014] S2.4: Perform mining operations on Pop2: Calculate the fitness value of each individual in Pop2 according to the individual objective function value and use the roulette wheel method to select two individuals in Pop2 as parent individuals to perform mining operations based on uniform crossover;
[0015] S2.5: Population update: Use the greedy strategy to update the populations Pop1 and Pop2 respectively. After the update is completed, merge Pop1 and Pop2 into a new population newPop;
[0016] S2.6: Q-learning-based variable neighborhood search for high-quality individuals: Using a Q-learning-based variable neighborhood search algorithm, perturbations are performed on high-quality individuals to generate perturbed solutions. Local searches are then performed using multiple neighborhood structures, and solutions are dynamically updated when better solutions are found.
[0017] S2.7: Update Q-table: Update the state of the environment based on the actions performed in S2.6. At the same time, based on the relative performance of the new solution and the initial solution, calculate the reward value of the environment and update the Q-table based on the reward value.
[0018] S2.7: Determine whether the iteration termination condition is met. If so, output the high-quality scheduling solution for the precious metal alloy detection multi-process parallel machine shop scheduling problem model. Otherwise, jump to S2.2.
[0019] In one embodiment of the present disclosure, the mathematical model of the multi-process parallel machine shop scheduling problem for precious metal detection is constructed in S1, including:
[0020] The multi-process parallel machine scheduling problem of precious metal detection is described as follows: n precious metal samples A1, A2, ..., A n It requires m instruments and equipment M1, M2, ..., M m For detection, each sample contains q i (i=1,2,...,n) detection methods, each detection method consists of O j ,(j=1,2,…,|q i |) detection and analysis steps, where |q i | indicates the detection method q i The total number of analytical steps for the test;
[0021] Let O be the total number of detection steps for all precious metal samples to be detected, π=[π1,π2,...,π O ] is the arrangement of the test methods based on the test and analysis steps, which determines the order in which the sample test methods are assigned to specific testable devices;
[0022] Let O k For device M k The total number of detection steps on , k = 1, 2, ..., m, Equipment M k The above detection method is based on the arrangement of detection and analysis steps; Detection and analysis steps processing time, Detection and analysis steps The start time of processing, for The equipment used in the previous detection and analysis step, for The position of the previous inspection process on the equipment used, where o = 1, 2, ..., O k ;
[0023] like It means For the first test; if It means For machine M k The first detection and analysis step on the
[0024] The objective function of the multi-process parallel machine scheduling problem for precious metal detection is:
[0025]
[0026] Among them, formula (1) and formula (2) are used to calculate the maximum completion time corresponding to the sequence π, and formula (3) and formula (4) are used to find the optimal sorting π in all sequence sets π. * , so that C max (π) minimum.
[0027] In one embodiment of the present disclosure, in S1, the constraints include:
[0028] 1) Any instrument or equipment is available at time 0;
[0029] 2) Any precious metal sample can be tested at time 0;
[0030] 3) Each detection and analysis step can be completed by at least one instrument;
[0031] 4) Once the detection and analysis steps are started, they must not be interrupted;
[0032] 5) Each instrument can only perform one detection and analysis step at a time;
[0033] 6) Precious metal samples can only undergo one testing step at a time;
[0034] In one embodiment of the present disclosure, S2.3 and S2.4 select the parent individual according to formulas (5)-(6), including:
[0035]
[0036] Among them, C max (π i ) is the i-th individual π in the subpopulation i The corresponding maximum completion time, is the maximum completion time of all individuals in the subpopulation, popsize is the population size, fitness i is the fitness value of the individual with index i in the population, P i is the probability that the i-th individual in the subpopulation is selected as the parent individual; formula (4) represents the calculation of the fitness value of each individual, and formula (5) represents the calculation of the probability that each individual is selected.
[0037] In one embodiment of the present disclosure, in S2.5, a greedy strategy is adopted to update the subpopulations and merge the subpopulations to complete the population update, including:
[0038]
[0039] newPop=Pop1∪Pop2(9)
[0040] Among them, π i is the i-th individual in the population, π i ' is π i The offspring individuals generated by crossover mutation, C max (π i ) and C max (π i ') represent π i and π i 'The corresponding maximum completion time; Equations (7)-(8) indicate that if the new solution π i If the completion time of ' is not inferior to the old solution, the old solution is replaced by the new solution, otherwise the old solution is retained; Formula (9) indicates that the new population newPop is obtained by merging Pop1 and Pop2 to enter the next iteration.
[0041] In one embodiment of the present disclosure, the Q-learning-based variable neighborhood search in S2.6 includes:
[0042] A certain proportion of individuals are selected as high-quality individuals according to fitness to perform local search operations. The corresponding perturbation strategy action is selected according to the state determined by the Q table in the current environment. The corresponding perturbation operation is performed on the high-quality individuals to generate perturbation solutions. The perturbation strategies include three types: exchange, flip and insertion.
[0043] Among them, for the generated perturbation solution, a variable neighborhood local search is performed, starting from the first neighborhood structure, a local search operation is performed on the perturbation solution until an improved solution is found or a predetermined number of times is reached. In each search, the corresponding local search strategy is selected according to different neighborhood structures. When a better solution is found, the current solution is updated and the local search is stopped. If the current improved solution is better than the initial high-quality solution, the solution replaces the initial solution, otherwise the perturbation and variable neighborhood operations are continued;
[0044] In the Q-learning algorithm, states and actions both represent local search strategies. The number of states and actions is equal to the number of local search strategies. The current state is determined by the local search strategy currently in use, and the corresponding execution action is selected in the Q table using the ε-greedy strategy in the current state.
[0045]
[0046] Among them, a represents the action taken, Q(S t ,a t ) indicates that in the current state S t Next take action a t The Q value, arg{Q(S t ,at )}→max represents the action that maximizes the Q value; rand represents a random number between 0 and 1 that satisfies the normal distribution, and ε represents a very small positive number.
[0047] In one embodiment of the present disclosure, the perturbation operator and the variable neighborhood search operation operator in S2.6 include:
[0048] The search operations for the perturbation strategy performed by individuals include Shake 1-Shake 3:
[0049] Shake 1: Randomly select two different detection and analysis step positions in the detection sequence and swap the detection and analysis steps at these two positions;
[0050] Shake2: Randomly select two different detection analysis step positions in the detection sequence. If the first selected position is the first in the sequence, adjust the step at the second position to the first position in the sequence, and keep the relative order of the remaining steps unchanged. If the first position is not the first, first retain the order of the steps before the position, insert the step at the second position before the position, and rearrange the steps between the two selected positions, and then keep the order of the remaining steps unchanged.
[0051] Shake 3: Randomly selects two different detection and analysis step positions in the detection sequence and flips all steps between them, reversing the order of the steps in this interval.
[0052] The variable neighborhood local search operations performed on the solution generated after the perturbation are NS1-6:
[0053] NS1: Using the perturbed solution as the perturbed solution, a new solution is generated through an insertion operation. The completion times of the new solution and the perturbed solution are compared. If the new solution is better than the perturbed solution, the new solution is retained and the perturbed solution is discarded. If the insertion operation fails to find a better solution, the swap operation is continued to generate another new solution and compare it with the current solution again. Finally, the optimal solution found in this process is output.
[0054] NS2: Starting from the perturbed solution, a swap operation is first performed to generate a new solution. The new solution is then compared with the completion time of the original perturbed solution. If the solution generated by the swap operation is better than the original solution, the new solution is retained. Otherwise, an insertion operation is performed to generate a new solution and compare it with the old solution. Finally, the optimal solution after the swap and insertion operations is output.
[0055] NS3: First, a new solution is generated through a swap operation and its completion time is compared with that of the original perturbed solution. If the new solution performs better than the original perturbed solution, the new solution is retained. If the swap operation fails to improve the quality of the solution, a further flip operation is performed to generate a new solution and compare it with the current solution. Finally, the optimal solution is selected as the output.
[0056] NS4: Starting from the perturbed solution, it first performs an insertion operation to generate a new solution. The completion time of the new solution is compared with that of the perturbed solution. If the new solution is better than the perturbed solution, the solution is updated. If no improvement is achieved, a flip operation is performed to generate a new solution and compare the performance of the two solutions, ultimately outputting the optimal solution.
[0057] NS5: Starting with the perturbed solution, it performs a flip operation to generate a new solution. The new solution is then compared with the perturbed solution's makespan. If the new solution performs better, it is updated. If no better solution is found, a swap operation is performed, again generating a new solution and comparing it with the current solution. Finally, the optimal solution is output.
[0058] NS6: First, a new solution is generated by performing a flip operation and its completion time is compared with the perturbed solution. If the solution generated by the flip operation is better, it is retained. If not, the insertion operation is continued to generate and compare new solutions, and finally the optimal solution is selected for output.
[0059] In one embodiment of the present disclosure, the reward value after executing the action and updating the Q table in S2.7 are calculated as follows:
[0060] After performing a variable neighborhood local search based on Q-learning on the initial solution, the initial solution is compared with the new solution according to formula (11) to calculate the reward value obtained by the action, and then the corresponding Q(S) is updated according to formula (12). t ,a t )value;
[0061]
[0062]
[0063] Among them, reward t Indicates that the agent is in state S t Next, perform action a t The reward value obtained, C max (π i ) and C max (π i ') represent π i and π i ' and the maximum completion time of the solution obtained after performing variable neighborhood search; Q(S t ,a t ) indicates the state S tExecute action a t The Q value, a represents the learning rate, g represents the discount factor, Indicates state S t+1 The maximum Q value obtained by executing all actions under the given set, A represents the action set.
[0064] According to another aspect of the present disclosure, the present disclosure further provides a scheduling device for a multi-process parallel machine shop for precious metal detection, comprising:
[0065] The model building module is used to construct a mathematical model for the multi-process parallel machine shop scheduling problem of precious metal detection based on the analysis methods, analysis steps and corresponding detection instruments and equipment for precious metal alloy detection, with minimizing the maximum completion time as the optimization goal, and to determine the constraints of the mathematical model;
[0066] Model solving module, used to solve the mathematical model and obtain the high-quality scheduling solution of the mathematical model;
[0067] The model solving module includes: parameter initialization module, population division module, population exploration module, population mining module, population update module, variable neighborhood search module, Q table update module, iterative update module, among which,
[0068] The parameter initialization module is used to initialize the population: including determining the order of detection and analysis steps; determining the detection instruments and equipment selected for each analysis step; determining the detection completion time; setting parameters, including population size, maximum number of iterations, Q table, and number of variable neighborhood local searches;
[0069] The population division module is used to divide the population into two equal-sized sub-populations, Pop1 and Pop2, where Pop1 focuses on exploration and Pop2 focuses on mining.
[0070] The population exploration module is used to perform exploration operations on Pop1: the fitness value of each individual in Pop1 is calculated based on the individual objective function value, and the optimal individual is stored in the external memory pool. Two individuals in Pop1 are selected as parent individuals using a roulette wheel method to perform evolution operations;
[0071] The population mining module is used to perform mining operations on Pop2: the fitness value of each individual in Pop2 is calculated according to the individual objective function value, and two individuals of Pop2 are selected as parent individuals by roulette to perform mining operations based on uniform crossover;
[0072] The population update module is used to update the population: the greedy strategy is used to update the populations Pop1 and Pop2 respectively. After the update is completed, Pop1 and Pop2 are merged into a new population newPop;
[0073] The variable neighborhood search module is used to perform a Q-learning-based variable neighborhood search on high-quality individuals. This module uses a Q-learning-based variable neighborhood search algorithm to perform perturbations on high-quality individuals and generate perturbed solutions. It then uses multiple neighborhood structures to perform local searches and dynamically updates the solutions when a better solution is found.
[0074] The Q-table update module is used to update the Q-table: it updates the state of the environment according to the action executed in S2.6, and calculates the reward value of the environment based on the relationship between the output new solution and the initial solution, and updates the Q-table according to the reward value;
[0075] The iterative update module is used to determine whether the iteration termination condition is met. If so, it outputs a high-quality scheduling solution for the multi-process parallel machine shop scheduling problem model for precious metal alloy detection. Otherwise, it jumps to the population partition module for further iteration.
[0076] The beneficial effect of the present invention is that by optimizing the connection of steps and resource allocation in the detection process, combined with an intelligent scheduling algorithm, effective scheduling of multiple parallel detection equipment is achieved, aiming to improve the overall efficiency and accuracy of precious metal detection. An appropriate modeling method is used to dynamically schedule multiple processes in the precious metal detection process, and the scheduling problem is solved by a dual-population variable neighborhood search algorithm based on Q-learning, which can avoid the problems of low efficiency and easy errors in existing methods. This method can effectively shorten the detection time, improve the utilization rate of detection equipment, and ensure accurate result output in complex processes. Through the scheduling method of the present invention, the resource scheduling of precious metal detection workshops is more flexible, and the production efficiency and detection quality are significantly improved, meeting the strict requirements of high-tech manufacturing for precious metal alloy detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The present invention will be further described below with reference to the accompanying drawings and examples.
[0078] Figure 1 A flow chart of a scheduling method for a multi-process parallel machine shop for precious metal detection according to an embodiment of the present invention is shown.
[0079] Figure 2 A schematic diagram of a Pop1 population POX crossover operation according to an embodiment of the present invention is shown.
[0080] Figure 3 Schematic diagram of the Pop1 population mutation operation according to an embodiment of the present invention.
[0081] Figure 4 Schematic diagram of Pop2 population UX crossover operation according to an embodiment of the present invention.
[0082] Figure 5This is an example flow chart of a scheduling method for a multi-process parallel machine shop for precious metal detection according to an embodiment of the present invention.
[0083] Figure 6 This is an iterative decline curve diagram of an example of a scheduling method for a multi-process parallel machine shop for precious metal detection according to an embodiment of the present invention.
[0084] Figure 7 The present invention is a structural diagram of a scheduling device for a multi-process parallel machine shop for precious metal detection according to an embodiment of the present invention. DETAILED DESCRIPTION
[0085] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Those skilled in the art will readily understand the other advantages and effects of the present invention from the contents disclosed in this description, but the present invention is not limited in any form. It should be noted that those skilled in the art can make various changes and improvements without departing from the spirit of the present invention. These all fall within the scope of protection of the present invention.
[0086] Figure 1 The flowchart of a scheduling method for a multi-process parallel machine shop for precious metal detection according to an embodiment of the present invention is shown. Figure 1 As shown, in one embodiment, the present disclosure provides a scheduling method for a precious metal detection multi-process machine shop, which mainly includes the following steps:
[0087] S1: Based on the analysis methods, analysis steps and corresponding instruments and equipment for precious metal alloy detection, with minimizing the maximum completion time as the optimization goal, a mathematical model for the parallel machine shop scheduling problem of precious metal detection multi-processes is constructed, and the constraints of the model are determined;
[0088] S2: Solve the mathematical model and obtain a high-quality scheduling solution for the mathematical model;
[0089] The mathematical model is solved in S2, including the following sub-steps:
[0090] S2.1: Initialize the population: This includes determining the sequence of test and analysis steps; determining the test instruments and equipment to be used for each analysis step; determining the test completion time; and setting parameters, including population size, maximum number of iterations, Q table, and number of local searches within a variable neighborhood.
[0091] S2.2: Population division: Divide the population into two sub-populations of equal size, Pop1 and Pop2, where Pop1 focuses on exploration and Pop2 focuses on mining;
[0092] S2.3: Perform exploration operations on Pop1: Calculate the fitness value of each individual in Pop1 based on the individual objective function value and store the optimal individual in the external memory pool. Then, use the roulette wheel method to select two individuals in Pop1 as parent individuals to perform evolution operations;
[0093] S2.4: Perform mining operations on Pop2: Calculate the fitness value of each individual in Pop2 according to the individual objective function value and use the roulette wheel method to select two individuals in Pop2 as parent individuals to perform mining operations based on uniform crossover;
[0094] S2.5: Population update: Use the greedy strategy to update the populations Pop1 and Pop2 respectively. After the update is completed, merge Pop1 and Pop2 into a new population newPop;
[0095] S2.6: Perform Q-learning-based variable neighborhood search on high-quality individuals: Use a Q-learning-based variable neighborhood search algorithm to perform perturbations on high-quality individuals and generate perturbation solutions. Then, use multiple neighborhood structures to perform local searches and dynamically update the solutions when a better solution is found to improve global search efficiency and optimization effects.
[0096] S2.7: Update Q-table: Update the state of the environment based on the actions performed in S2.6. At the same time, based on the relative performance of the new solution and the initial solution, calculate the reward value of the environment and update the Q-table based on this value.
[0097] S2.7: Determine whether the iteration termination condition is met. If so, output the optimal scheduling solution for the problem scale. Otherwise, jump to S2.2.
[0098] The iteration termination condition can be determined according to actual needs, for example, the reward value of the environment is greater than or equal to the preset reward threshold, or the iteration duration exceeds the preset duration threshold, or the number of iterations exceeds the preset number threshold.
[0099] It should be noted that the preset reward threshold, preset duration threshold, and preset number threshold can be pre-configured in the scheduling device. The values of the above thresholds can be determined according to actual needs, and this disclosure does not make specific limitations on this.
[0100] In the disclosed embodiment, by optimizing the step connection and resource allocation in the detection process, combined with an intelligent scheduling algorithm, effective scheduling of multiple parallel detection equipment is achieved, aiming to improve the overall efficiency and accuracy of precious metal detection. An appropriate modeling method is used to dynamically schedule multiple processes in the precious metal detection process, and the scheduling problem is solved by a dual-population variable neighborhood search algorithm based on Q-learning, which can avoid the problems of low efficiency and easy errors in existing methods. This method can effectively shorten the detection time, improve the utilization rate of detection equipment, and ensure accurate result output in complex processes. Through the scheduling method of the present invention, the resource scheduling of precious metal detection workshops is more flexible, and the production efficiency and detection quality are significantly improved, meeting the strict requirements of high-tech manufacturing for precious metal alloy detection.
[0101] Furthermore, the mathematical model in the aforementioned step S1 is constructed as follows: The multi-process parallel machine scheduling problem for precious metal detection is described as follows: n precious metal samples A1, A2, ..., A n It requires m instruments and equipment M1, M2, ..., M m Each sample contains q i (i=1,2,...,n) detection methods, each detection method consists of O j ,(j=1,2,…,|q i |) detection and analysis steps, where |q i | indicates the detection method q i The total number of detection and analysis steps. Let O be the total number of detection steps for all precious metal samples to be detected, π=[π1,π2,...,π O ] is the arrangement of the detection and analysis steps of the method to be detected, which determines the order in which the sample detection methods are assigned to specific detectable devices. k For device M k The total number of detection steps on , k = 1, 2, ..., m, Equipment M k The above detection method is based on the arrangement of detection and analysis steps; Detection and analysis steps processing time, Detection and analysis steps The start time of processing, for The equipment used in the previous detection and analysis step, for The position of the previous inspection process on the equipment used, where o = 1, 2, ..., O k .like It means For the first test; if It means For machine M k The first detection analysis step on the problem. The objective function of this problem is:
[0102]
[0103] Among them, formula (1) and formula (2) are to calculate the maximum completion time corresponding to the sequence π, and formula (3) and formula (4) are to find the most ordered π in all sequence sets π. * , so that C max (π) minimum.
[0104] In one embodiment, in S1, the constraints include but are not limited to the following:
[0105] 1) Any instrument or equipment is available at time 0;
[0106] 2) Any precious metal sample can be tested at time 0;
[0107] 3) Each detection and analysis step can be completed by at least one instrument;
[0108] 4) Once the detection and analysis steps are started, they must not be interrupted;
[0109] 5) Each instrument can only perform one detection and analysis step at a time;
[0110] 6) Precious metal samples can only undergo one testing step at a time;
[0111] like Figure 2-Figure 4 As shown, in one embodiment, in S2.3 and S2.4, the parent individuals are selected according to formulas (5)-(6), specifically as follows:
[0112]
[0113] Among them, C max (π i ) is the i-th individual π in the subpopulation i The corresponding maximum completion time, is the maximum completion time of all individuals in the subpopulation, popsize is the population size, fitness i is the fitness value of the individual with index i in the population, P i is the probability that the i-th individual in the subpopulation is selected as the parent individual; formula (4) represents the calculation of the fitness value of each individual, and formula (5) represents the calculation of the probability that each individual is selected.
[0114] Figure 2 Schematic diagram of the Pop1 population POX crossover operation in an embodiment of the present invention is shown. Figure 2 As shown, the process of the POX crossover operation of the Pop1 population is shown, and the process of the POX crossover operation of the parent individual 1 and the parent individual 2 is shown, and the offspring individual 1 and the offspring individual 2 are obtained.
[0115] Figure 3 Schematic diagram of Pop1 population mutation operation in an embodiment of the present invention. Figure 3 As shown, an element in the parent individual can be moved to the insertion position to obtain the mutated population.
[0116] Furthermore, in S2.5, the greedy strategy is used to update the subpopulation and merge the subpopulations to complete the population update. Specifically:
[0117]
[0118] newPop=Pop1∪Pop2(9)
[0119] Among them, π i is the i-th individual in the population, π i ' is π i The offspring individuals generated by crossover mutation, C max (π i ) and C max (π i ') represent π i and π i 'The corresponding maximum completion time; Equations (7)-(8) indicate that if the new solution π i If the completion time of ' is not inferior to the old solution, the old solution is replaced by the new solution, otherwise the old solution is retained; Formula (9) indicates that the new population newPop is obtained by merging Pop1 and Pop2 to enter the next iteration.
[0120] Furthermore, in S2.6, the variable neighborhood search based on Q-learning is performed as follows:
[0121] According to the fitness, a certain proportion of individuals are selected as high-quality individuals to perform local search operations, and the corresponding perturbation strategy action is selected according to the state determined by the Q table in the current environment, and then the corresponding perturbation operation is performed on the high-quality individuals to generate a perturbation solution. There are three types of perturbation strategies: exchange, flip and insertion. For the generated perturbation solution, the present invention performs a variable neighborhood local search. First, a local search operation is performed on the perturbation solution starting from the first neighborhood structure until an improved solution is found or a predetermined number of times is reached. Each time a search is performed, a corresponding local search strategy is selected according to a different neighborhood structure. When a better solution is found, the current solution is updated and the local search is stopped. If the current improved solution is better than the initial high-quality solution, the solution replaces the initial solution, otherwise the perturbation and variable neighborhood operations continue to be performed;
[0122] In the designed Q-learning algorithm, states and actions both represent local search strategies, and the number of states and actions is equal to the number of local search strategies. The current state is determined by the currently used local search strategy, and the corresponding execution action is selected from the Q table using the ε-greedy strategy in the current state. The specific content is shown in Table 1 and Equation (10):
[0123] Table 1 Q table
[0124]
[0125]
[0126] Among them, a represents the action taken, Q(S t ,a t ) indicates that in the current state S t Next take action a t The Q value, arg{Q(S t ,a t )}→max represents the action that maximizes the Q value; rand represents a random number between 0 and 1 that satisfies the normal distribution, and ε represents a very small positive number.
[0127] Furthermore, the perturbation operator and the variable neighborhood search operator in S2.6 are specifically:
[0128] The search operations for the perturbation strategy performed by the individual are Shake 1-3:
[0129] Shake 1: Randomly select two different detection and analysis step positions in the detection sequence and swap the steps at these positions. This operation reconstructs the process path by swapping the order of the steps, thereby exploring the potential impact of different step orders on overall performance optimization.
[0130] Shake 2: Randomly select two different test analysis step positions within the test sequence. If the first selected position is at the beginning of the sequence, the step at the second position is adjusted to the beginning, while preserving the relative order of the remaining steps. If the first position is not at the beginning, the order of the steps before it is retained, and the step at the second position is inserted before it. The steps between the two selected positions are rearranged, while the order of the remaining steps remains unchanged. This strategy further explores the impact of local adjustments on overall process efficiency by reordering the steps within the sequence.
[0131] Shake 3: Randomly selects two different inspection and analysis step positions in the inspection sequence and flips all steps between them, reversing the order of the steps within that interval. This operation changes the direction of local step execution to explore the impact of different process sequences on the final performance indicators.
[0132] The variable neighborhood local search operations performed on the solution generated after the perturbation are NS1-6:
[0133] NS1: Using the perturbed solution as the initial solution, a new solution is generated through insertion. The completion times of the new solution are then compared with those of the original perturbed solution. If the new solution is better than the original, the new solution is retained and the old one is discarded. If the insertion operation fails to find a better solution, the swap operation is continued, generating another new solution and comparing it again with the current solution. Finally, the optimal solution found in this process is output.
[0134] NS2: Starting with the perturbed solution, a swap operation is performed to generate a new solution. The new solution is then compared with the makespan of the original perturbed solution. If the swap operation yields a better solution than the original, the new solution is retained. Otherwise, an insertion operation is performed to generate a new solution and compare it with the old solution. Finally, the optimal solution after the swap and insertion operations is output.
[0135] NS3: First, a new solution is generated through a swap operation and its completion time is compared with that of the original perturbed solution. If the new solution outperforms the original solution, it is retained. If the swap operation does not improve the solution quality, a further flip operation is performed to generate a new solution, which is compared with the current solution and the optimal solution is selected as the output.
[0136] NS4: Starting with the perturbed solution, the algorithm first performs an insertion operation to generate a new solution, comparing its completion time with the perturbed solution. If the new solution is better than the perturbed solution, the solution is updated. If no improvement is achieved, the algorithm performs a flip operation, generates a new solution, compares the performance of the two solutions, and ultimately outputs the optimal solution.
[0137] NS5: Starting with the perturbed solution, it performs a flip operation to generate a new solution. The new solution is then compared with the perturbed solution's makespan. If the new solution performs better, it is updated. If no better solution is found, a swap operation is performed, again generating a new solution and comparing it with the current solution. Finally, the optimal solution is output.
[0138] NS6: First, a new solution is generated by performing a flip operation and its completion time is compared with the perturbed solution. If the solution generated by the flip operation is better, it is retained. If not, the insertion operation is continued to generate and compare new solutions, and finally the optimal solution is selected for output.
[0139] Furthermore, the calculation of the reward value after executing the action and updating the Q table in the aforementioned step S2.7 is specifically performed as follows:
[0140] After performing a variable neighborhood local search based on Q-learning on the initial solution, the initial solution is compared with the new solution according to formula (11) to calculate the reward value obtained by the action, and then the corresponding Q(S) is updated according to formula (12). t ,a t )value;
[0141]
[0142] Among them, reward t Indicates that the agent is in state S t Next, perform action a t The reward value obtained, C max (π i ) and C max (π i ') represent π i and π i ' and the maximum completion time of the solution obtained after performing variable neighborhood search; Q(S t ,a t ) indicates the state S t Execute action a t The Q value, a represents the learning rate, g represents the discount factor, Indicates state S t+1 The maximum Q value obtained by executing all actions under the given set, A represents the action set.
[0143] Figure 5 This is an example flow chart of a scheduling method for a multi-process parallel machine shop for precious metal detection according to an embodiment of the present invention. Figure 5 As shown, the scheduling method for a multi-process parallel workshop for precious metal detection disclosed herein includes:
[0144] Initialize the population: Initialize the algorithm parameters including but not limited to: popsize, α, γ, ε, etc.;
[0145] The population is divided into subpopulation Pop1 and subpopulation Pop2;
[0146] Perform a POX-based crossover operation on the subpopulation Pop1, perform an insertion-based mutation operation on the generated offspring solution, and use a greedy strategy to update individuals;
[0147] Perform a UX-based crossover operation on the subpopulation Pop2, perform an insertion-based mutation operation on the generated offspring solution, and update individuals based on the greedy strategy;
[0148] Merge new subpopulations;
[0149] Perform Q-learning-based variable neighborhood search for high-quality individuals;
[0150] Update status and Q table;
[0151] Determine whether the iteration termination condition is met. If so, output the most optimal scheduling solution. If not, g=g+1, return to the step of dividing the population into sub-populations Pop1 and sub-population Pop2, and iterate again.
[0152] Figure 6 This is an iterative decline curve diagram of an example of a scheduling method for a multi-process parallel machine shop for precious metal detection according to an embodiment of the present invention. Figure 6 As shown in Figure 2, as the number of iterations increases, makespan gradually decreases and tends to be stable.
[0153] Figure 7 FIG. 1 is a schematic diagram showing a structural diagram of a scheduling device for a multi-process parallel machine shop for precious metal detection provided by an embodiment of the present disclosure. Figure 7 As shown, in one embodiment, the present disclosure provides a scheduling device for a multi-process parallel machine shop for precious metal detection, comprising:
[0154] Model building module 710 is used to construct a mathematical model for the precious metal detection multi-process parallel machine shop scheduling problem based on the analysis method, analysis steps, and corresponding detection instruments and equipment for precious metal alloy detection, with minimizing the maximum completion time as the optimization goal, and to determine the constraints of the mathematical model;
[0155] The model solving module 720 is used to solve the mathematical model and obtain a high-quality scheduling solution of the mathematical model;
[0156] The model solving module 720 includes: a parameter initialization module 721, a population division module 722, a population exploration module 733, a population mining module 724, a population update module 725, a variable neighborhood search module 726, a Q table update module 727, and an iterative update module 728, wherein:
[0157] Parameter initialization module 721 is used to initialize the population, including determining the sequence of detection and analysis steps; determining the detection instruments and equipment selected for each analysis step; determining the detection completion time; and setting parameters, including population size, maximum number of iterations, Q table, and number of variable neighborhood local searches;
[0158] A population division module 722 is configured to divide the population into two equal-sized subpopulations, a first subpopulation Pop1 and a second subpopulation Pop2, wherein Pop1 focuses on exploration and Pop2 focuses on mining;
[0159] The population exploration module 723 is used to perform exploration operations on Pop1: the fitness value of each individual in Pop1 is calculated based on the individual objective function value, the optimal individual is stored in the external memory pool, and two individuals in Pop1 are selected as parent individuals by roulette wheel to perform evolution operations;
[0160] The population mining module 724 is used to perform a mining operation on Pop2: the fitness value of each individual in Pop2 is calculated according to the individual objective function value and two individuals of Pop2 are selected as parent individuals by a roulette wheel method to perform a mining operation based on uniform crossover;
[0161] The population update module 725 is used for population update: the greedy strategy is used to update the populations Pop1 and Pop2 respectively, and after the update is completed, Pop1 and Pop2 are merged into a new population newPop;
[0162] Variable neighborhood search module 726, for performing a Q-learning-based variable neighborhood search on high-quality individuals: using a Q-learning-based variable neighborhood search algorithm, perturbations are performed on high-quality individuals to generate perturbed solutions, followed by local search using multiple neighborhood structures, and dynamically updating solutions when a better solution is found;
[0163] Q-table update module 727, used to update the Q-table: update the state of the environment according to the action executed in S2.6, and calculate the reward value of the environment based on the superiority relationship between the output new solution and the initial solution and update the Q-table according to the reward value;
[0164] The iterative update module 728 is used to determine whether the iteration termination condition is met. If so, it outputs a high-quality scheduling solution for the precious metal alloy detection multi-process parallel machine shop scheduling problem model; otherwise, it jumps to the population division module 722 for another iteration.
[0165] According to another aspect of an embodiment of the present invention, a solution system for a precious metal alloy inspection scheduling problem using a dual-population variable neighborhood search based on Q-learning is provided, comprising: 1. A construction module, configured to optimize the problem by minimizing total inspection time, including a method for constructing a model for a multi-process parallel machine shop scheduling problem for precious metal alloy inspection. 2. An execution module, which uses a global search process based on dual-population coevolution and combines a local search with an effective variable neighborhood search based on Q-learning to further search for high-quality solutions to improve the quality of the solutions, thereby effectively solving the problem.
[0166] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A scheduling method for a multi-process parallel machine shop for precious metal detection, characterized in that: The following steps are involved: S1: Based on the analysis methods, analysis steps and corresponding testing instruments and equipment for precious metal alloy testing, with minimizing the maximum completion time as the optimization goal, a mathematical model for the multi-process parallel machine shop scheduling problem for precious metal testing is constructed, and the constraints of the mathematical model are determined; S2: Solve the mathematical model and obtain a high-quality scheduling solution for the mathematical model; Wherein, solving the mathematical model described in S2 includes: S2.1: Initialize the population: This includes determining the sequence of test and analysis steps; determining the test instruments and equipment to be used for each analysis step; determining the test completion time; and setting parameters, including population size, maximum number of iterations, Q table, and number of local searches within a variable neighborhood. S2.2: Population division: Divide the population into two first sub-populations of equal size Pop1 and the second subpopulation Pop2 ,in, Pop1 Focus on exploration, Pop2 Focus on excavation; S2.3: Yes Pop1 Perform exploration operations: Calculate the value of the individual objective function Pop1 The fitness value of each individual in the pool is calculated and the best individual is stored in the external memory pool. The roulette wheel method is used to select the best individual. Pop1 The two individuals in perform evolutionary operations as parent individuals; S2.4: Yes Pop2 Perform mining operations: Calculate the value of the individual objective function Pop2 The fitness value of each individual in is selected by roulette wheel Pop2 The two individuals of are used as parent individuals to perform mining operations based on uniform crossover; S2.5: Population update: update the population Pop1 and Pop2 Use greedy strategy to update the population, and after the update is completed Pop1 and Pop2 Merge into a new population newPop ; S2.6: Q-learning-based variable neighborhood search for high-quality individuals: Using a Q-learning-based variable neighborhood search algorithm, perturbations are performed on high-quality individuals to generate perturbed solutions. Local searches are then performed using multiple neighborhood structures, and solutions are dynamically updated when better solutions are found. S2.7: Update Q-table: Update the state of the environment based on the actions performed in S2.
6. At the same time, based on the relative performance of the new solution and the initial solution, calculate the reward value of the environment and update the Q-table based on the reward value. S2.7: Determine whether the iteration termination condition is met. If so, output the optimal scheduling solution for the precious metal alloy testing multi-process parallel machine shop scheduling problem model. Otherwise, jump to S2.
2. The Q-learning-based variable neighborhood search in S2.6 includes: A certain proportion of individuals are selected as high-quality individuals according to fitness to perform local search operations. The corresponding perturbation strategy action is selected according to the state determined by the Q table in the current environment. The corresponding perturbation operation is performed on the high-quality individuals to generate perturbation solutions. The perturbation strategies include three types: exchange, flip and insertion. Among them, for the generated perturbation solution, a variable neighborhood local search is performed, starting from the first neighborhood structure, a local search operation is performed on the perturbation solution until an improved solution is found or a predetermined number of times is reached. In each search, the corresponding local search strategy is selected according to different neighborhood structures. When a better solution is found, the current solution is updated and the local search is stopped. If the current improved solution is better than the initial high-quality solution, the solution replaces the initial solution, otherwise the perturbation and variable neighborhood operations are continued; In the Q-learning algorithm, both states and actions represent local search strategies. The number of states and actions is equal to the number of local search strategies. The current state is determined by the local search strategy currently used. -Greedy strategy selects the corresponding execution action in the Q table; (10) in, Indicates the action taken, Indicates the current state Take action Q value, Indicates the action that maximizes the Q value; Represents a random number between 0 and 1 that satisfies the normal distribution. Represents a small positive number.
2. The method according to claim 1, characterized in that The mathematical model of the multi-process parallel machine shop scheduling problem for precious metal detection is constructed in S1, including: The multi-process parallel machine scheduling problem for precious metal detection is described as follows: n Precious metal samples to be tested Need to be m Instruments and equipment Each sample contains Channel detection method, each detection method is It consists of the following steps: Indicates the detection method The total number of analytical steps for the test; make is the total number of testing steps for all precious metal samples to be tested, The arrangement of the test methods based on the test analysis steps determines the order in which the sample test methods are assigned to specific testable equipment; make For equipment The total number of detection steps on , , equipment The above detection method is based on the arrangement of detection and analysis steps; Detection and analysis steps processing time, Detection and analysis steps The start time of processing, for The equipment used in the previous detection and analysis step, for The location of the previous inspection process on the equipment used, where: ; like , it means For the first test; if , it means For machines The first detection and analysis step on the The objective function of the multi-process parallel machine scheduling problem for precious metal detection is: (1) (2) (3) (4) Among them, formula (1) and formula (2) are the calculation sequences The corresponding maximum completion time, formula (3) and formula (4) represent the maximum completion time in all sequence sets. Find the optimal sort , making Minimum.
3. The method according to claim 1, characterized in that In S1, the constraints include: 1) Any instrument or equipment is available at time 0; 2) Any precious metal sample can be tested at time 0; 3) Each detection and analysis step can be completed by at least one instrument; 4) Once the detection and analysis steps are started, they must not be interrupted; 5) Each instrument can only perform one detection and analysis step at a time; 6) Precious metal samples can only undergo one testing step at a time.
4. The method according to claim 1, wherein S2.3 and S2.4 select parent individuals according to formulas (5)-(6), including: (5) (6) in, For the subpopulation i Individual The corresponding maximum completion time, is the maximum completion time of all individuals in the subpopulation, popsize is the population size, The index in the population is i The fitness value of an individual, For the subpopulation i The probability of an individual being selected as a parent individual; Formula (4) represents the calculation of the fitness value of each individual, and Formula (5) represents the calculation of the probability of each individual being selected.
5. The method according to claim 1, wherein In S2.5, the greedy strategy is used to update the subpopulation and merge the subpopulations to complete the population update, including: (7) (8) (9) in, For the population i Individuals, for The offspring individuals generated by crossover mutation, and Respectively represent and The corresponding maximum completion time; Equations (7)-(8) indicate that if the new solution If the completion time is not inferior to the old solution, the old solution is replaced by the new solution, otherwise the old solution is retained; Formula (9) means that by Pop1 and Pop2 Merge to get a new population newPop Enter the next iteration.
6. The method according to claim 1, wherein The perturbation operator and the variable neighborhood search operation operator in S2.6 include: The search operations for the perturbation strategy performed by individuals include Shake 1-Shake 3: Shake 1: Randomly select two different detection and analysis step positions in the detection sequence and swap the detection and analysis steps at these two positions; Shake 2: Randomly select two different detection analysis step positions in the detection sequence. If the first selected position is the first in the sequence, adjust the step at the second position to the first position in the sequence, and keep the relative order of the remaining steps unchanged. If the first position is not the first, first retain the order of the steps before it, insert the step at the second position before it, and rearrange the steps between the two selected positions, and then keep the order of the remaining steps unchanged. Shake 3: Randomly selects two different detection and analysis step positions in the detection sequence and flips all steps between them, reversing the order of the steps in this interval. The variable neighborhood local search operations performed on the solution generated after the perturbation are NS1-6: NS1: Using the perturbed solution as the perturbed solution, a new solution is generated through an insertion operation. The completion times of the new solution and the perturbed solution are compared. If the new solution is better than the perturbed solution, the new solution is retained and the perturbed solution is discarded. If the insertion operation fails to find a better solution, the swap operation is continued to generate another new solution and compare it with the current solution again. Finally, the optimal solution found in this process is output. NS2: Starting from the perturbed solution, a swap operation is first performed to generate a new solution. The new solution is then compared with the completion time of the original perturbed solution. If the solution generated by the swap operation is better than the original solution, the new solution is retained. Otherwise, an insertion operation is performed to generate a new solution and compare it with the old solution. Finally, the optimal solution after the swap and insertion operations is output. NS3: First, a new solution is generated through a swap operation and its completion time is compared with that of the original perturbed solution. If the new solution performs better than the original perturbed solution, the new solution is retained. If the swap operation fails to improve the quality of the solution, a further flip operation is performed to generate a new solution and compare it with the current solution. Finally, the optimal solution is selected as the output. NS4: Starting from the perturbed solution, it first performs an insertion operation to generate a new solution. The completion time of the new solution is compared with that of the perturbed solution. If the new solution is better than the perturbed solution, the solution is updated. If no improvement is achieved, a flip operation is performed to generate a new solution and compare the performance of the two solutions, ultimately outputting the optimal solution. NS5: Starting from the perturbed solution, it first performs a flip operation to generate a new solution, then compares its completion time with the perturbed solution. If the new solution performs better, it is updated. If no better solution is found, it performs a swap operation, also generates a new solution and compares it with the current solution, and finally outputs the optimal solution. NS6: First, a new solution is generated by flipping the solution and the completion time is compared with the perturbed solution. If the solution generated by the flipping operation is better, it is retained. If there is no improvement, the insertion operation is continued to generate and compare new solutions, and finally the optimal solution is selected for output.
7. The method according to claim 1, characterized in that In S2.7, the reward value after executing the action is calculated and the Q table is updated. The specific operations are: After performing a Q-learning-based variable neighborhood local search on the initial solution, the initial solution is compared with the new solution according to formula (11) to calculate the reward value obtained by the action, and then the corresponding value; (11) (12) in, Indicates that the agent is in state Next action The reward value obtained, and Respectively and and the maximum completion time of the solution obtained after performing variable neighborhood search; Indicates the status Execute an action Q value, represents the learning rate, represents the discount factor, Indicates status The maximum Q value obtained by executing all actions under Represents an action set.
8. A scheduling device for a multi-process parallel machine shop for precious metal detection, based on a scheduling method for a multi-process parallel machine shop for precious metal detection according to any one of claims 1 to 7, characterized in that: include: The model building module is used to construct a mathematical model for the multi-process parallel machine shop scheduling problem of precious metal detection based on the analysis methods, analysis steps, and corresponding detection instruments and equipment for precious metal alloy detection, with minimizing the maximum completion time as the optimization goal, and to determine the constraints of the mathematical model; Model solving module, used to solve the mathematical model and obtain the high-quality scheduling solution of the mathematical model; The model solving module includes: parameter initialization module, population division module, population exploration module, population mining module, population update module, variable neighborhood search module, Q table update module, iterative update module, among which, The parameter initialization module is used to initialize the population: including determining the order of detection and analysis steps; determining the detection instruments and equipment selected for each analysis step; determining the detection completion time; setting parameters, including population size, maximum number of iterations, Q table, and number of local searches in variable neighborhoods; The population division module is used to divide the population into two first sub-populations of equal size Pop1 and the second subpopulation Pop2 ,in, Pop1 Focus on exploration, Pop2 Focus on excavation; Population exploration module, used to Pop1 Perform exploration operations: Calculate the value of the individual objective function Pop1 The fitness value of each individual in the pool is calculated and the best individual is stored in the external memory pool. The roulette wheel method is used to select the best individual. Pop1 The two individuals in perform evolutionary operations as parent individuals; Population mining module, used to Pop2 Perform mining operations: Calculate the value of the individual objective function Pop2 The fitness value of each individual in is selected by roulette wheel Pop2 The two individuals of are used as parent individuals to perform mining operations based on uniform crossover; Population update module, used for population update: respectively Pop1 and Pop2 Use greedy strategy to update the population, and after the update is completed Pop1 and Pop2 Merge into a new population newPop ; The variable neighborhood search module is used to perform a Q-learning-based variable neighborhood search on high-quality individuals. This module uses a Q-learning-based variable neighborhood search algorithm to perform perturbations on high-quality individuals and generate perturbed solutions. It then uses multiple neighborhood structures to perform local searches and dynamically updates the solutions when a better solution is found. The Q-table update module is used to update the Q-table: it updates the state of the environment according to the action executed in S2.6, and calculates the reward value of the environment based on the relationship between the output new solution and the initial solution, and updates the Q-table according to the reward value; The iterative update module is used to determine whether the iteration termination condition is met. If so, it outputs a high-quality scheduling solution for the multi-process parallel machine shop scheduling problem model for precious metal alloy detection. Otherwise, it jumps to the population partition module for further iteration.
Citation Information
Patent Citations
Flexible job shop scheduling method based on improved seagull optimization algorithm
CN114926023A
Production line scheduling method based on deep reinforcement learning and multi-objective optimization
CN117540990A