A workshop production scheduling method based on improved heuristic algorithm
By improving the initial temperature, annealing factor adjustment, and tabu set of the simulated annealing algorithm, and optimizing the strategy for generating and accepting new solutions, the problem of fixed parameters in workshop production scheduling is solved, and the search efficiency and the rationality of scheduling results are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU UNIV OF SCI & TECH
- Filing Date
- 2023-03-20
- Publication Date
- 2026-07-03
AI Technical Summary
Existing heuristic algorithms have fixed parameters, low search efficiency, and are prone to generating invalid solutions and losing high-quality solutions in workshop production scheduling, resulting in unsatisfactory scheduling results.
An improved simulated annealing algorithm is adopted. By dynamically adjusting the initial temperature and annealing factor, combined with a piecewise temperature decay function and a tabu set, the strategy for generating and accepting new solutions is optimized, thereby improving search efficiency and retaining high-quality solutions.
This improves the search efficiency of workshop production scheduling, reduces the generation of invalid solutions, ensures that high-quality solutions are not lost, and obtains more reasonable scheduling results.
Smart Images

Figure CN116300744B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of task scheduling technology, and specifically to a workshop production scheduling method based on an improved heuristic algorithm. Background Technology
[0002] The workshop scheduling problem is a resource allocation problem that satisfies task configuration and sequence constraints. It is one of the most difficult combinatorial optimization problems and belongs to the NP-hard category. Because its solution space is massive, and a massive number of feasible solutions corresponds to a massive amount of computation, general solutions cannot effectively obtain better feasible solutions.
[0003] Currently, heuristic algorithms, such as simulated annealing and genetic algorithms, are widely used in workshop production scheduling. However, existing methods have the following problems: 1) the parameters are fixed values; 2) invalid solutions are easily generated during the process of generating new solutions; 3) the search efficiency is low; 4) high-quality solutions are easily lost. Summary of the Invention
[0004] The purpose of this invention is to provide a workshop scheduling method based on an improved heuristic algorithm to address the shortcomings of existing methods, improve search efficiency, and make scheduling results more reasonable.
[0005] To achieve the above objectives, the present invention employs the following technical solution: a workshop production scheduling method based on an improved heuristic algorithm, comprising the following steps:
[0006] S1. Initialization: Determine the parameters of the cooling schedule. The parameters of the cooling schedule include the initial temperature T0, the temperature decay function that determines how the temperature is reduced, and the number of iterations L at each temperature. k The final value T of the control parameter f The initial temperature T0 is determined based on the complexity of the scheduling task.
[0007] The initial temperature T0 is calculated according to formula (1):
[0008] ;
[0009] In the formula, x represents the complexity of the task, which depends on the number of operations and the number of machine tools in the scheduled task, and x = (0.1~0.2) * number of operations * number of machine tools;
[0010] The temperature decay function adopts a piecewise function, with a smaller annealing factor α in the early stage of iteration and a larger annealing factor α in the later stage of iteration. The temperature decay function is shown in formula (2).
[0011] (2)
[0012] In formula (2), α1 < α2 < α3;
[0013] L k Approximately 100-200 times; final value T f Take the value 1 to 2;
[0014] S2. Define the workshop production scheduling task as including n job tasks, denoted as: J1, J2, ..., J... n The number of steps in each operation are O1, O2, ..., O n ;
[0015] The encoding uses O1 J1, O2 J2, ..., O n J n A string consisting of characters J1, J2, ..., J n The order in which they appear in the string represents their process number;
[0016] S3. Construct the objective function: The objective function is to minimize the time span for completing all processing tasks;
[0017] S4. Randomly arrange O1 J1s, O2 J2s, ..., O n J n The character is processed 10 to 20 times, generating 10 to 20 initial solutions. The objective function value of each solution is calculated, and the average value is used as the threshold for the objective function value. A tabu set is constructed, and the generated initial solutions are added to the tabu set. The initial solution with the shortest time span to complete all processing tasks is saved as the current optimal solution and the current solution.
[0018] S5. Generate a new solution: Compare the objective function value of the current solution with the objective function value threshold, determine the number of times to randomly select two different characters in the current solution to swap their positions and generate a new solution, and determine whether the new solution exists in the taboo set, and then determine whether to generate a new solution again;
[0019] S6. Determine whether to accept the new solution: Determine whether to accept the new solution based on the transition probability P corresponding to the Metropolis criterion shown in formula (3); Determine whether the new solution replaces the current optimal solution based on whether the objective function value of the new solution is better than the current solution.
[0020] (3);
[0021] In formula (3) It is the objective function. This is the current solution. This is a new interpretation. This is the current temperature;
[0022] S7. Repeat S5 and S6 until the required number of iterations at the current temperature is met. ;
[0023] S8, Cooling: Determines whether the current temperature has reached the final value. Then determine whether to use the current optimal solution as the final scheduling result.
[0024] In S1, when the complexity of the scheduling task is low, the initial temperature T0 takes a larger value; when the complexity of the scheduling task is high, the initial temperature T0 takes a smaller value.
[0025] In step S5, if the objective function value of the current solution is greater than twice the objective function value threshold, then the process of randomly selecting two different characters in the current solution and swapping their positions is executed 2 to 3 times to generate a new solution; if the objective function value of the current solution is less than twice the objective function value threshold but greater than the objective function value threshold, then the process of randomly selecting two different characters in the current solution and swapping their positions is executed 1 to 2 times to generate a new solution; if the objective function value of the current solution is less than the objective function value threshold, then the process of randomly selecting two different characters in the current solution and swapping their positions is executed once to generate a new solution.
[0026] In step S5, if the new solution exists in the taboo set, it is discarded and a new solution is generated; otherwise, the new solution is added to the taboo set.
[0027] In step S6, if the objective function value of the new solution is better than the current solution, then the new solution replaces the current optimal solution.
[0028] When the objective function value of the new solution is smaller than that of the current solution, the new solution is always accepted. However, when the objective function value of the new solution is larger than that of the current solution, there is still a probability of acceptance. The objective function value of the current solution is then judged to be better than that of the current optimal solution. If the objective function value of the current solution is better than that of the current optimal solution, the current solution is used to replace the current optimal solution.
[0029] According to the above technical solution, the present invention has the following effects:
[0030] 1) In traditional simulated annealing algorithms, the annealing factor of the temperature decay function is a fixed value throughout the iteration process. If the annealing factor α is too large, the temperature drops too quickly in the early stages of iteration, easily skipping better solutions; if the annealing factor α is too small, there will be too many iterations, resulting in excessive computational time complexity. The temperature decay function in this invention uses a piecewise function, employing a relatively small annealing factor α in the early stages of iteration and a relatively large annealing factor α in the later stages. This allows for a higher probability of finding the optimal solution without causing excessive time complexity.
[0031] 2) Traditional simulated annealing algorithms use a fixed initial temperature. When the initial temperature is high enough, the algorithm has a greater probability of converging to the global optimum, but the running time will also increase accordingly. To obtain better scheduling results and reasonable time complexity, this invention determines the initial temperature based on the complexity of the scheduling task. When the complexity of the scheduling task is low, a larger initial temperature is used; when the complexity of the scheduling task is high, a relatively smaller initial temperature is used.
[0032] 3) In the process of generating a new solution in this invention, the magnitude of the change of the new solution relative to the current solution is determined based on the magnitude of the objective function value of the current solution, so that the optimal solution can be searched with a higher probability.
[0033] 4) This invention can effectively avoid roundabout search by adding a taboo set, which greatly improves the search efficiency.
[0034] 5) In the search process, the present invention adopts an elite retention strategy, which can effectively avoid the loss of high-quality solutions found in the search. Attached Figure Description
[0035] Figure 1 A block diagram of a shop floor scheduling method based on an improved heuristic algorithm;
[0036] Figure 2 The example shows the scheduling results in a Gantt chart. Detailed Implementation
[0037] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0038] This invention provides a workshop scheduling method based on an improved multi-objective genetic algorithm, such as... Figure 1 As shown, it includes:
[0039] S1: Initialization, determining the parameters of the cooling schedule. Appropriate selection of cooling schedule parameters has a significant impact on the performance of the simulated annealing algorithm. The cooling schedule parameters include the initial temperature T0, the temperature decay function determining how the temperature is reduced, and the number of iterations at each temperature (also known as the Mapkob chain length) L. k The final value T of the control parameter f .
[0040] When the initial temperature T0 is high enough, the algorithm has a greater probability of converging to the global optimum, but the running time will also increase accordingly. In order to obtain better scheduling results and reasonable time complexity, the initial temperature T0 is determined according to the complexity of the scheduling task. When the complexity of the scheduling task is low, the initial temperature T0 takes a larger value; when the complexity of the scheduling task is high, the initial temperature T0 takes a relatively smaller value. The value of the initial temperature T0 is calculated according to formula (1).
[0041] ;
[0042] In the formula, x represents the complexity of the task, which depends on the number of operations and the number of machine tools in the scheduled task. x = (0.1~0.2) * number of operations * number of machine tools.
[0043] In traditional simulated annealing algorithms, the temperature decay function is generally defined as... ,in Annealing factor, In traditional temperature decay functions, the annealing factor is a fixed value throughout the iteration process. If the annealing factor α is too large, the temperature drops too quickly in the early stages of iteration, easily skipping better solutions; if the annealing factor α is too large, the temperature will drop too quickly in the early stages of iteration, easily skipping better solutions. If the value is too small, there will be too many iterations, resulting in excessive computation time complexity.
[0044] The temperature decay function of the present invention adopts a piecewise function. A relatively small annealing factor α is used in the early stage of the iteration, and a relatively large annealing factor α is used in the later stage of the iteration. The temperature decay function is shown in formula (2).
[0045] (2)
[0046] In formula (2), .
[0047] Chain length It can be around 100-200 times; final value The value is usually taken as 1 to 2.
[0048] S2: Encoding.
[0049] In the definition of a workshop production scheduling task, there are n job tasks, denoted as J1, J2, ..., Jn. n The number of steps in each operation are O1, O2, ..., O n .
[0050] The encoding uses O1 J1, O2 J2, ..., O n J n A string consisting of characters J1, J2, ..., J nThe order in which they appear in the string represents their process number.
[0051] S3: Construct the objective function
[0052] The objective function is to minimize the time span for completing all processing tasks.
[0053] S4: Randomly arrange O1 J1s, O2 J2s, ..., O n J n The character is processed 10-20 times, generating 10-20 initial solutions. The objective function value of each solution is calculated, and the average value is used as the threshold for the objective function value. A tabu set is constructed, and the generated initial solutions are added to the tabu set. The initial solution with the shortest time span to complete all processing tasks is saved as the current optimal solution and the current solution.
[0054] S5: A new solution is generated.
[0055] Based on the objective function value of the current solution, determine the number of times to randomly select two different characters and swap their positions within the current solution. If the objective function value of the current solution is greater than twice the objective function value threshold, perform 2-3 swaps to generate a new solution. If the objective function value of the current solution is less than twice the objective function value threshold but greater than the threshold, perform 1-2 swaps to generate a new solution. If the objective function value of the current solution is less than the threshold, perform 1 swap to generate a new solution. Check if the new solution already exists in the tabu set. If it does, discard it and generate a new solution; otherwise, add the new solution to the tabu set. Increasing the tabu set effectively avoids roundabout searches and greatly improves search efficiency.
[0056] S6: Determine whether to accept the new solution. The decision to accept the new solution is based on the transition probability P corresponding to the Metropolis criterion shown in formula (3). If the objective function value of the new solution is better than the current solution, then the new solution replaces the current optimal solution.
[0057] (3);
[0058] In formula (3), f is the objective function, a is the current solution, a' is the new solution, and t is the current temperature. That is, when the objective function value of the new solution is smaller than that of the current solution, the new solution is always accepted. When the objective function value of the new solution is larger than that of the current solution, it is not simply discarded as in the hill-climbing method, but accepted with a certain probability. It is determined whether the objective function value of the current solution is better than that of the current optimal solution. If the objective function value of the current solution is better than that of the current optimal solution, then the current solution is used to replace the current optimal solution.
[0059] S7: Repeat steps S5 and S6 until the Mapkob chain length is satisfied. .
[0060] S8: Cooling down. Determine if the current temperature has reached the final value. If the condition is not met, a new current temperature is generated according to formula (2), and the process proceeds to step S5; otherwise, the current optimal solution is taken as the final scheduling result.
[0061] S9: Decoding
[0062] Draw a Gantt chart based on the current optimal solution.
[0063] To verify the feasibility of the workshop production scheduling method disclosed in this invention, a simulation experiment will be conducted on scheduling case LA01 (10*5). The process, machine tool, and time relationship of scheduling case LA01 are shown in Table 1.
[0064] Table 1. Time Relationship Table for Scheduling Case LA01
[0065]
[0066] Ten simulation experiments were conducted on scheduling case LA01 using both the traditional simulated annealing algorithm-based workshop production scheduling method and the workshop production scheduling method disclosed in this invention. The data obtained are shown in Table 2 below:
[0067] Table 2 Comparison of simulation results of scheduling case LA01 between traditional method and the method of the present invention.
[0068]
[0069] The optimal solution for scheduling case LA01 is currently 666s. As shown in Table 2, in the aforementioned 10 simulation experiments, the traditional scheduling method did not obtain the optimal solution of 666s for scheduling case LA01. One experiment yielded a relatively good solution of 672s. However, the scheduling method of this invention almost always obtained the optimal solution of 666s for scheduling case LA01, demonstrating the feasibility of the workshop production scheduling method disclosed in this invention. As is known from common technical knowledge, this invention can be implemented through other embodiments that do not depart from its spirit or essential characteristics. Therefore, the disclosed embodiments described above are merely illustrative in all respects and are not the only ones. All modifications within the scope of this invention or equivalent to the scope of this invention are included in this invention.
Claims
1. A method for job shop production scheduling based on improved heuristic algorithm, characterized in that, Includes the following steps: S1. Initialization: Determine the parameters of the cooling schedule, including the initial temperature. The temperature decay function that determines how the temperature is reduced, and the number of iterations at each temperature. Final value of control parameters The initial temperature is determined based on the complexity of the scheduled task. ; initial temperature The value is calculated according to formula (1); (1); In the formula Indicates the complexity of the task. It depends on the number of operations and machine tools in the scheduled task. = (0.1~0.2) * number of processes * number of machine tools; The temperature decay function is a piecewise function, with a smaller annealing factor used in the early stages of iteration. A suitable annealing factor is used in the middle of the iteration. A larger annealing factor is used in the later stages of the iteration. The temperature decay function is shown in formula (2); (2) In formula (2), , , These are the annealing factors for the early, middle, and late stages of the iteration, respectively. < < ; and The first and Temperature of the next iteration; 100-200 times; Final value Take the value 1 to 2; S2, Define workshop production scheduling tasks, including The assignments are categorized as follows: The number of steps in each operation are as follows: ; Encoding uses indivual , indivual , ..., indivual A string composed of characters, characters The order in which these characters appear in the string represents their process number; S3. Construct the objective function: The objective function is to minimize the time span for completing all processing tasks; S4, Random Arrangement indivual , indivual , ..., indivual The character is processed 10 to 20 times, generating 10 to 20 initial solutions. The objective function value of each solution is calculated, and the average value is used as the threshold for the objective function value. A tabu set is constructed, and the generated initial solutions are added to the tabu set. The initial solution with the shortest time span to complete all processing tasks is saved as the current optimal solution and the current solution. S5. Generate a new solution: Compare the objective function value of the current solution with the objective function value threshold, determine the number of times to randomly select two different characters in the current solution to swap their positions and generate a new solution, and determine whether the new solution exists in the taboo set; S6. Determine whether to accept the new solution: Determine whether to accept the new solution based on the transition probability corresponding to the Metropolis criterion shown in formula (3); Determine whether the new solution replaces the current optimal solution based on whether the objective function value of the new solution is better than the current solution. (3); In formula (3), f is the objective function, and a is the current solution. This is a new interpretation. This is the current temperature. This represents the transition probability of accepting a new solution; S7. Repeat S5 and S6 until the required number of iterations at the current temperature is met. ; S8, Cooling: Determines whether the current temperature has reached the final value. Then determine whether to use the current optimal solution as the final scheduling result.
2. The workshop production scheduling method based on an improved heuristic algorithm according to claim 1, characterized in that, In S1, when the complexity of the scheduling task is low, the initial temperature... Take the larger value; when the complexity of the scheduled task is high, the initial temperature Take the smaller value.
3. The workshop production scheduling method based on an improved heuristic algorithm according to claim 1, characterized in that, In step S5, if the objective function value of the current solution is greater than twice the threshold of the objective function value, then execute 2 to 3 times to randomly select two different characters in the current solution and swap their positions to generate a new solution; If the objective function value of the current solution is less than twice the objective function value threshold but greater than the objective function value threshold, then execute 1 to 2 times to randomly select two different characters in the current solution and swap their positions to generate a new solution; If the objective function value of the current solution is less than the objective function value threshold, then execute once to randomly select two different characters in the current solution and swap their positions, thereby generating a new solution.
4. A workshop production scheduling method based on an improved heuristic algorithm according to claim 1 or 3, characterized in that, In step S5, if the new solution exists in the tabu set, the new solution is discarded and a new solution is generated; otherwise, the new solution is added to the tabu set.
5. A workshop production scheduling method based on an improved heuristic algorithm according to claim 1, characterized in that, In step S6, if the objective function value of the new solution is better than the current solution, then the new solution replaces the current optimal solution. When the objective function value of the new solution is smaller than that of the current solution, the new solution is always accepted. When the objective function value of the new solution is larger than that of the current solution, it is determined whether the objective function value of the current solution is better than that of the current optimal solution. If the objective function value of the current solution is better than that of the current optimal solution, the current solution is used instead of the current optimal solution.