A method for solving the job shop scheduling problem based on the red deer algorithm

The Job Shop scheduling problem is optimized by the red deer algorithm, and random key encoding and multiple operations are used to optimize the scheduling solution. This solves the problems of high time complexity and difficulty in obtaining satisfactory solutions in the existing technology, and achieves efficient and robust scheduling optimization.

CN116300701BActive Publication Date: 2025-09-19YANGTZE DELTA REGION INST OF UNIV OF ELECTRONICS SCI & TECH OF CHINE (HUZHOU)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211094063.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-08
Publication Date
2025-09-19
Estimated Expiration
2042-09-08

AI Technical Summary

Technical Problem

Traditional mathematical programming methods have the problems of high time complexity and difficulty in obtaining satisfactory scheduling solutions when facing large-scale job shop scheduling problems.

Method used

The red deer algorithm is used to encode the scheduling solution through random keys, and the roaring, fighting and pairing operations are used to update the population, optimize the scheduling scheme, and combine the elitist criterion and Euclidean distance to generate the optimal solution.

Benefits of technology

A satisfactory scheduling solution is obtained in polynomial time, which reduces the computational complexity and improves the robustness, avoids local optimal solutions, and achieves efficient scheduling optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116300701B_ABST
    Figure CN116300701B_ABST
Patent Text Reader

Abstract

This invention discloses a method for solving the job shop scheduling problem based on the red deer algorithm, belonging to the field of shop scheduling. The method decodes the job shop schedule using a random key, explores and utilizes a balancing algorithm of roaring, fighting, and pairing operations, and uses the Euclidean distance to measure the distance between male and female deer to solve the job shop scheduling problem. This invention is the first to attempt to apply the red deer algorithm to the job shop scheduling problem. Compared with traditional mathematical programming methods, this method can obtain satisfactory scheduling solutions for large-scale scheduling problems in polynomial time, while maintaining low computational complexity and high robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of job shop scheduling, and more specifically, relates to a method for solving job shop scheduling problems based on a red deer algorithm. Background Art

[0002] With the continuous advancement of China's Smart Manufacturing 2025 policy, improving manufacturing production levels and workshop efficiency has become a crucial research issue. Research conducted by the International Academy for Production Engineering (CIPR) indicates that the 40 most advanced manufacturing models are based on excellent workshop production scheduling optimization solutions. An excellent scheduling solution can rationally arrange the organizational, transportation, manufacturing, and adjustment steps involved in an enterprise's production process, reducing production costs and increasing production efficiency. Therefore, the effectiveness of scheduling technology plays a crucial role in the management and control of production systems. The job shop scheduling problem, as a generalized workshop scheduling problem, is widely found in various production workshops and is at the core of modern smart factory management and control, as well as advanced manufacturing technologies. It can be specifically described as: n workpieces are processed on m machines. Each workpiece has multiple processes, and each process can only be completed on one machine. Furthermore, there are two types of constraints: for each workpiece, each process has a sequential constraint, meaning that the previous process must be completed before the current process can begin. For each machine, a machine can only process one process at a time, which is a temporal uniqueness constraint. The job shop scheduling problem is a classic combinatorial optimization problem. However, the increasing scale and complexity of current real-world workshops have made it both NP-Complete and NP-hard. Traditional mathematical programming methods can yield optimal solutions to job shop scheduling problems, but when faced with large-scale problems, they face high computational complexity and difficulty obtaining satisfactory results. Therefore, designing efficient scheduling solutions is crucial for improving manufacturing efficiency and reducing production costs.

[0003] The Red Deer Algorithm (RDA) is a metaheuristic algorithm inspired by the unusual mating behavior of Scottish red deer during the breeding season. The RDA begins with an initial population, which is then divided into males and females. The males roar, then compete to determine a commander and a stag. Ultimately, a red deer tribe is formed, consisting of the commander and a certain number of females. As a state-of-the-art intelligent optimization algorithm, this algorithm has attracted increasing attention in various fields. Due to its efficiency, intelligence, versatility, and robustness, it has demonstrated excellent performance in solving the traveling salesman problem, the fixed-cost transportation problem, and vehicle routing problems, achieving superior results compared to traditional intelligent optimization algorithms such as genetic algorithms, particle swarm optimization algorithms, and imperial competition algorithms. However, the RDA has been rarely applied to workshop scheduling problems, and even less so to job shop scheduling. Summary of the Invention

[0004] The purpose of the present invention is to solve the problems of high time complexity and difficulty in obtaining satisfactory results in traditional mathematical programming methods when facing large-scale Job Shop scheduling problems, and to provide a method for solving Job Shop scheduling problems based on the red deer algorithm.

[0005] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:

[0006] A method for solving the Job Shop scheduling problem based on the red deer algorithm includes the following steps:

[0007] Step 1: Input the data to be produced and processed to build a scheduling instance and initialize the parameters;

[0008] Step 2: Use a random key to encode the scheduling solution and randomly generate an initialized scheduling solution population;

[0009] Step 3: Taking the minimum total completion time as the objective function, evaluate the fitness of all individuals in the population, and use the elite criterion to determine the male and female individuals based on the individual fitness;

[0010] Step 4: All male individuals perform the roar operation, and the fitness of the male individuals after roaring is recalculated. The commander and the stag are selected based on the fitness of the male individuals;

[0011] Step 5: The Commander and the Stag conduct combat operations, further updating the Commander;

[0012] Step 6: Based on the commander's fitness, randomly assign a corresponding number of female deer to him, and the commander and the female deer assigned to him form a red deer tribe;

[0013] Step 7: The commander pairs with female deer from his own tribe and any other tribes respectively, and the male deer pairs with the nearest female deer based on the Euclidean distance to generate the next generation population;

[0014] Step 8: Return to step 3 to evaluate the fitness of the next generation population, iterate until the algorithm meets the stopping condition, and output the optimal solution.

[0015] Preferably, in step 1, inputting the data to be produced and processed specifically includes:

[0016] Number of workpieces n, number of machines m, number of processing steps required for each workpiece n i 、Machine number OM for each process ij , Processing time OT for each process ij ;

[0017] Preferably, in step 1, the initialization parameters specifically include:

[0018] The total number of individuals in the red deer algorithm N, the number of algorithm iterations M, the proportion of elite male individuals in the population s, the proportion of commanders among male deer γ, the proportion of commanders pairing with female deer in their own tribe α, the proportion of commanders pairing with female deer from any other tribe β, the upper bound UB of the search space, and the lower bound LB of the search space.

[0019] Preferably, in step 2, encoding the scheduling solution using a random key is specifically as follows:

[0020] Taking a system consisting of 3 workpieces and 4 machines as an example, where each workpiece includes 4 processes, the encoding length of each individual is 12. To generate a random key, 12 random numbers are first uniformly drawn in [0,1) through a random function, and then arranged in sequence. Assuming that the random key of an individual in the initial solution population is {0.13 0.02 0.05 0.15 0.35 0.23 0.370.69 0.87 0.58 0.42 0.91}, the decoding process is divided into two layers: the first layer decoding, sorts the random key sequence from small to large, and then puts the sort number of each element into the position of the element in the random key, that is, the first layer decoding result is [3 1 2 4 6 5 7 11 10 8 9 12]; considering the order constraint of each process in the workpiece, the second layer decoding is performed, the sort number (1,2,3,4) is decoded as 1, that is, corresponding to workpiece No. 1, the sort number (5,6,7,8) is decoded as 2, that is, corresponding to workpiece No. 2, the sort number (9,10,11,12) is decoded as 3, that is, corresponding to workpiece No. 3; the second layer decoding result is [11 1 1 2 2 2 3 2 3 3 3]. The second-layer decoding results represent the arrangement order of the workpieces from left to right during scheduling, thus corresponding to a scheduling solution.

[0021] Preferably, in step 3, the formula for the objective function of minimizing the total completion time is:

[0022]

[0023] Among them, f is the maximum completion time, n is the number of workpieces; n i is the number of processes for the i-th workpiece; OT ij is the processing time of the jth process of the i-th workpiece; OD ij The difference between the start time of the jth process of the i-th workpiece and the end time of the j-1th process of the workpiece, that is, the process delay time. When j = 1, OD ij It is the difference between the start processing time of the i-th job and the scheduling start time, that is, the job delay time.

[0024] Preferably, in step 3, the elite criterion is used to determine the male individuals and female deer based on the individual fitness, specifically:

[0025] The fitness values ​​of all individuals in the population are calculated and sorted in descending order. The elite criterion is to determine the top s% of individuals as males and the remaining individuals as females based on the elite ratio s, which is an adjustable parameter.

[0026] Preferably, in step 4, all male individuals perform a roaring operation, the fitness of the male individuals after roaring is recalculated, and the commander and the stag are selected based on the fitness of the male individuals. The specific steps are:

[0027] (1) Male individuals increase their fitness through roaring. The roaring process is to search for individuals in their territory and select the individual with better fitness between the current individual and the territory individuals as the new individual after roaring. In order to generate feasible territory individuals, the search space is limited. The roaring formula is as follows:

[0028]

[0029] Among them, male new A new individual after roaring; male old is the male individual before roaring; a1, a2, and a3 are random numbers uniformly distributed between [0, 1); UB is the upper bound of the search space; LB is the lower bound of the search space;

[0030] (2) To the male after the roar new The new individual is decoded through the decoding process described in step 2 to obtain the specific workpiece arrangement order, and each process of the workpiece is arranged on the corresponding machine in turn, and then the male is calculated through the objective function. new The fitness value of

[0031] (3) After roaring, the male individuals are sorted in descending order using their fitness values. According to the proportion γ of commanders among stags, the first γ% of the individuals are selected as commanders, and the remaining male individuals are stags.

[0032] Preferably, in step 5, the commander and the stag perform combat operations, and further updating the commander is specifically as follows;

[0033] Each commander randomly selects a stag from the stag set to fight. The battle process is mainly achieved through the following formula:

[0034]

[0035] Among them, new1 and new2 represent two new solutions generated by the battle process; com is the commander; stag is the stag; b1 and b2 are randomly generated with an equal distribution between [0,1); UB is the upper bound of the search space; LB is the lower bound of the search space.

[0036] Calculate the fitness values ​​of new1 and new2, and select the individual with the best fitness among new1, new2 and com as the commander after the battle. The stag remains unchanged.

[0037] Preferably, in step 6, a corresponding number of female deer are randomly assigned to the commander based on his fitness, and the commander and the female deer assigned to him form a red deer tribe. Specifically,

[0038] First, calculate the fitness value of the commander obtained in step 5; then normalize the fitness of each commander using the following normalization formula:

[0039]

[0040] in, is the fitness value after normalization; fit is the fitness value before normalization; N com is the number of commanders;

[0041] Then the commander's power is calculated. Combined with the total number of female deer in the population, the number of female deer to be allocated to each commander is obtained. The specific formula is:

[0042]

[0043] Among them, Nharem i N is the number of female deer to be assigned to the i-th commander; hind is the total number of female deer in the population;

[0044] Each commander randomly selects a corresponding number of doe from the doe pool, based on their assigned number of doe. According to statistical probability theory, since each commander's selection of doe is independent of the others, the probability of each selection is independent of the order in which they are drawn. Therefore, sequential sampling can be used, assigning commanders to select doe in sequence. This ensures that each commander has the same probability of selecting each doe. Finally, a commander and the doe they select constitute a red deer tribe.

[0045] Preferably, in step 7, the specific steps for the commander to pair up with female deer from his own tribe and any other tribe are as follows:

[0046] The commander randomly selects α% of female deer from his own tribe for pairing; then randomly selects any other tribe and randomly selects β% of female deer from that tribe for pairing. The pairing will produce new individuals, which are:

[0047]

[0048] Among them, offs is the offspring produced by the pairing; com is the commander; hind is the male deer;

[0049] Preferably, in step 7, the male deer is paired with the nearest female deer based on the Euclidean distance as follows:

[0050] For a particular male deer, first calculate the Euclidean distance from it to each female deer. The distance formula is:

[0051]

[0052] Among them, d i is the Euclidean distance from the male deer to the i-th female deer; J is the total number of male deer; stag j for the buck j; is the i-th female deer;

[0053] Then the doe with the smallest Euclidean distance is selected for pairing, and the formula for the offspring produced by the pairing is the same as the pairing of the commander and the doe.

[0054] Preferably, in step 7, generating the next generation population is specifically as follows:

[0055] The roulette wheel method is used to evaluate the fitness of the offspring individuals produced by pairing the commander, the male deer and the female deer. Roulette is performed based on the fitness size. At the same time, each individual is sampled with replacement. According to the population size N, N roulette wheels are completed to generate the offspring population.

[0056] Return to step 3 to evaluate the fitness of the next generation population, iterate until the algorithm meets the stopping condition, and output the optimal solution.

[0057] The present invention solves the Job Shop scheduling problem by using the red deer algorithm, which has the following advantages:

[0058] 1. This paper attempts to apply the red deer algorithm to the job shop scheduling problem for the first time. Compared with traditional mathematical programming methods, it can obtain satisfactory scheduling solutions in polynomial time for large-scale scheduling problems while maintaining low computational complexity and high robustness.

[0059] 2. The present invention adopts a random key encoding method to encode the scheduling scheme, thereby realizing the application of the red deer algorithm to the discrete solution space problem.

[0060] 3. The present invention uses roaring, fighting, and pairing operations to update the offspring population. Under the premise of ensuring the convergence speed, it can jump out of the local optimal solution and balance the exploration and utilization of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is a flow chart of solving the Job Shop scheduling problem based on the red deer algorithm of the present invention;

[0062] Figure 2 This is a 6*9 scheduling example diagram in the present invention;

[0063] Figure 3 It is a convergence curve diagram of the maximum completion time in the present invention;

[0064] Figure 4 This is the optimal scheduling Gantt chart obtained by the method of the present invention. DETAILED DESCRIPTION

[0065] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments:

[0066] like Figure 1 As shown, a method for solving the Job Shop scheduling problem based on the red deer algorithm includes the following steps:

[0067] Step 1: Input the data to be produced and processed, including: number of workpieces n, number of machines m, number of processing steps required for each workpiece n i 、Machine number OM for each process ij , Processing time OT for each process ij The initialization parameters include: the total number of individuals in the red deer algorithm N, the number of algorithm iterations M, the proportion of elite male individuals in the population s, the proportion of commanders in male deer γ, the ratio of commanders to female deer in their own tribe α, the ratio of commanders to female deer in any other tribe β, the upper bound of the search space UB, and the lower bound of the search space LB.

[0068] Specifically, in this example, the number of workpieces n = 6, the number of machines m = 9, and the number of processing steps required for each workpiece n i All are 9, and the processing machine number for each process is OM ij And the processing time OT of each process ij ,like Figure 2 As shown; the initialization parameters specifically include: the total number of individuals in the red deer algorithm N = 600, the number of algorithm iterations M = 40, the proportion of elite male individuals in the population s = 0.20, the proportion of commanders in male deer γ = 0.4, the pairing ratio of commanders and female deer in their own tribe α = 0.8, the pairing ratio of commanders and female deer from any other tribe β = 0.9, the upper bound of the search space UB = 1, and the lower bound of the search space LB = 0.

[0069] Step 2: Use a random key to encode the scheduling solution and randomly generate an initialized scheduling solution population.

[0070] Take a workshop with 3 workpieces and 4 machines as an example, where each workpiece includes 4 processes, then the encoding length of each individual is 12; to generate the random key, first use a random function to uniformly extract 12 random numbers in [0,1), and then arrange them in sequence. Assuming that the random key of an individual in the initial solution population is {0.13 0.02 0.05 0.150.35 0.23 0.37 0.69 0.87 0.58 0.42 0.91}, the decoding process is divided into two layers: the first layer decoding, sorts the random key sequence from small to large, and then puts the sort number of each element into the position of the element in the random key, that is, the first layer decoding result is [3 12 4 6 5 7 11 10 8 9 12]; considering the order constraint of each process in the workpiece, the second layer decoding is performed, the sort number (1,2,3,4) is decoded as 1, that is, corresponding to workpiece No. 1, the sort number (5,6,7,8) is decoded as 2, that is, corresponding to workpiece No. 2, the sort number (9,10,11,12) is decoded as 3, that is, corresponding to workpiece No. 3; the second layer decoding result is [1 1 1 1 2 2 2 3 2 3 3 3]. The second-level decoding results, from left to right, represent the order in which the workpieces are scheduled, corresponding to a scheduling solution. Similarly, when the number of machines is m, and each workpiece contains m processes, each of the m sequence numbers decodes to the same workpiece number. Using the above method, N individuals are randomly initialized, where N corresponds to the number of individuals in the initial population, to generate N random scheduling solutions.

[0071] Step 3: Taking the minimum total completion time as the objective function, evaluate the fitness of all individuals in the population, and use the elite criterion to determine the male and female individuals based on the individual fitness.

[0072] The formula for the objective function with the minimum total completion time is:

[0073]

[0074] Among them, f is the maximum completion time, n is the number of workpieces; n i is the number of processes for the i-th workpiece; OT ij is the processing time of the jth process of the i-th workpiece; OD ij The difference between the start time of the jth process of the i-th workpiece and the end time of the j-1th process of the workpiece, that is, the process delay time. When j = 1, OD ij is the difference between the start processing time of the i-th workpiece and the scheduling start time, that is, the workpiece delay time. This formula is then used to calculate the objective function value of all individuals in the population. The specific implementation steps are:

[0075] (1) Based on the decoding process of the random key in step 2, the workpiece arrangement order of each scheduling solution is obtained;

[0076] (2) Arrange each process of the workpiece to the corresponding machine in sequence. Considering the order constraint of the workpiece process, the start time of a process should be the maximum value between the time when the machine completes the current last process and the time when the workpiece completes the previous process;

[0077] (3) During the scheduling process, for the workpiece, the completion time of the previous process is updated in real time and recorded as last_op_time i ; For machines, update the scheduled processing operation set recorded as ms_op_name j , and update its own scheduling timetable as ms_se_time j , where each element is [start, end], start is the start processing time of a certain process, and end is the end processing time of the process.

[0078] (4) Arrange each process directly, and finally take the set {last_op_time i ,i=1,2,…,n}, is the maximum completion time of the individual, that is, the objective function value, and the reciprocal of it is the fitness value, where n is the number of workpieces;

[0079] Then, using the elite criterion, the male and female deer are determined based on their individual fitness. The specific steps are as follows:

[0080] (1) Arrange all individuals in the population in descending order according to the objective function value;

[0081] (2) The elite criterion is that, based on the elite ratio s, the top s% of individuals are identified as males, and the remaining individuals are identified as females. The elite ratio s is an adjustable parameter.

[0082] Step 4: All male individuals perform the roar operation, and the fitness of the male individuals after roaring is recalculated. The commander and the stag are selected based on the fitness of the male individuals. The specific steps are as follows:

[0083] (1) Male individuals increase their fitness through roaring. The roaring process is to search for individuals in their territory and select the individual with better fitness between the current individual and the territory individuals as the new individual after roaring. In order to generate feasible territory individuals, the search space is limited. The roaring formula is as follows:

[0084]

[0085] Among them, male new A new individual after roaring; male old is the male individual before roaring; a1, a2, and a3 are random numbers uniformly distributed between [0, 1); UB is the upper bound of the search space; LB is the lower bound of the search space;

[0086] (2) To the male after the roar new The new individual is decoded through the decoding process described in step 2 to obtain the specific workpiece arrangement order, and each process of the workpiece is arranged on the corresponding machine in turn, and then the male is calculated through the objective function. new The fitness value of

[0087] (3) After roaring, the male individuals are sorted in descending order using their fitness values. According to the proportion γ of commanders among stags, the first γ% of the individuals are selected as commanders, and the remaining male individuals are stags.

[0088] Step 5: The Commander and the Stag conduct combat operations, further updating the Commander.

[0089] Each commander randomly selects a stag from the stag set to fight. The battle process is mainly achieved through the following formula:

[0090]

[0091] Among them, new1 and new2 represent two new solutions generated by the battle process; com is the commander; stag is the stag; b1 and b2 are randomly generated with an equal distribution between [0,1); UB is the upper bound of the search space; LB is the lower bound of the search space.

[0092] Calculate the fitness values ​​of new1 and new2, and select the individual with the best fitness among new1, new2 and com as the commander after the battle. The stag remains unchanged.

[0093] Step 6: Based on the commander's fitness, randomly assign a corresponding number of female deer to him, and the commander and the female deer assigned to him form a red deer tribe.

[0094] First, calculate the fitness value of the commander obtained in step 5; then normalize the fitness of each commander using the following normalization formula:

[0095]

[0096] in, is the fitness value after normalization; fit is the fitness value before normalization; N com is the number of commanders;

[0097] Then the commander's power is calculated. Combined with the total number of female deer in the population, the number of female deer to be allocated to each commander is obtained. The specific formula is:

[0098]

[0099] Among them, Nharem i N is the number of female deer to be assigned to the i-th commander; hind is the total number of female deer in the population;

[0100] Each commander randomly selects a corresponding number of doe from the doe pool, based on their assigned number of doe. According to statistical probability theory, since each commander's selection of doe is independent of the others, the probability of each selection is independent of the order in which they are drawn. Therefore, sequential sampling can be used, assigning commanders to select doe in sequence. This ensures that each commander has the same probability of selecting each doe. Finally, a commander and the doe they select constitute a red deer tribe.

[0101] Step 7: The commander pairs up with female deer from his own tribe and any other tribes, and the male deer pairs up with the nearest female deer based on the Euclidean distance to generate the next generation population.

[0102] The specific steps for the commander to pair up with female deer from his own tribe or any other tribe are as follows:

[0103] The commander randomly selects α% of female deer from his own tribe for pairing; then randomly selects any other tribe and randomly selects β% of female deer from that tribe for pairing. The pairing will produce new individuals, which are:

[0104]

[0105] Among them, offs is the offspring produced by the pairing; com is the commander; hind is the male deer;

[0106] The male deer then calculates the Euclidean distance between itself and each female deer, and pairs up with the nearest female deer, specifically:

[0107] For a particular male deer, first calculate the Euclidean distance from it to each female deer. The distance formula is:

[0108]

[0109] Among them, d i is the Euclidean distance from the male deer to the i-th female deer; J is the total number of male deer; stag j for the buck j; is the i-th female deer;

[0110] Then the doe with the smallest Euclidean distance is selected for pairing, and the formula for the offspring produced by the pairing is the same as the pairing of the commander and the doe.

[0111] After all commanders and stags have been paired, the next generation of population is generated, specifically:

[0112] The roulette wheel method is used to evaluate the fitness of the offspring individuals produced by pairing the commander, the male deer and the female deer. Roulette is performed based on the fitness size. At the same time, each individual is sampled with replacement. According to the population size N, N roulette wheels are completed to generate the offspring population.

[0113] Step 8: Return to step 3 to evaluate the fitness of the next generation population, iterate until the algorithm meets the stopping condition, and output the optimal solution.

[0114] According to the above steps, the present invention Figure 2 The algorithm solves the example given in the example. After completing 40 iterations, it obtains an optimal scheduling solution for the example, that is, the shortest completion time is 127, and the convergence iteration curve is as follows: Figure 3 As shown, one of the optimal scheduling Gantt charts is as follows Figure 4 As shown, the effectiveness of the method proposed in the present invention is reflected.

Claims

1. A method for solving the Job Shop scheduling problem based on the red deer algorithm, characterized by: The Job Shop scheduling problem is solved by decoding the Job Shop schedule with random keys, exploring and utilizing the roaring, fighting and pairing operation balance algorithm, and using the Euclidean distance to measure the distance between male and female deer. The method for solving the Job Shop scheduling problem based on the red deer algorithm comprises the following steps: Step 1: Input the data to be produced and processed to build a scheduling instance and initialize the parameters; Step 2: Use a random key to encode the scheduling solution and randomly generate an initialized scheduling solution population; Step 3: Taking the minimum total completion time as the objective function, evaluate the fitness of all individuals in the population, and use the elite criterion to determine the male and female individuals based on the individual fitness; Step 4: All male individuals perform the roar operation, and the fitness of the male individuals after roaring is recalculated. The commander and the stag are selected based on the fitness of the male individuals; Step 5: The Commander and the Stag conduct combat operations, further updating the Commander; Step 6: Based on the commander's fitness, randomly assign a corresponding number of female deer to him, and the commander and the female deer assigned to him form a red deer tribe; Step 7: The commander pairs with female deer from his own tribe and any other tribes respectively, and the male deer pairs with the nearest female deer based on the Euclidean distance to generate the next generation population; Step 8: Return to step 3 to evaluate the fitness of the next generation population, iterate until the algorithm meets the stopping condition, and output the optimal solution; In step 3, the formula for the objective function with the minimum total completion time is: Among them, f is the maximum completion time, n is the number of workpieces; n i is the number of processes for the i-th workpiece; OT ij is the processing time of the jth process of the i-th workpiece; OD ij The difference between the start time of the jth process of the i-th workpiece and the end time of the j-1th process of the workpiece, that is, the process delay time. When j = 1, OD ij is the difference between the start processing time of the i-th workpiece and the scheduling start time, that is, the workpiece delay time; In step 3, the elite criterion is used to determine male and female deer based on the individual fitness. Specifically, the fitness values ​​of all individuals in the population are calculated and arranged in descending order. The elite criterion is manifested in that, based on the elite ratio s, the top s% of individuals are determined as male individuals, and the remaining individuals are determined as female deer, where the elite ratio s is an adjustable parameter.

2. The method for solving the Job Shop scheduling problem based on the red deer algorithm according to claim 1, wherein: In step 1, the input data to be produced and processed include: the number of workpieces n, the number of machines m, and the number of processing steps required for each workpiece n. i 、Machine number for each process OM ij , Processing time OT for each process ij The initialization parameters include: the total number of individuals in the red deer algorithm N, the number of algorithm iterations M, the proportion of elite male individuals in the population s, the proportion of commanders in male deer γ, the ratio of commanders to female deer in their own tribe α, the ratio of commanders to female deer in any other tribe β, the upper bound of the search space UB, and the lower bound of the search space LB.

3. The method for solving the Job Shop scheduling problem based on the red deer algorithm according to claim 1, wherein: In step 2, the scheduling solution is encoded using a random key. Specifically, it contains 3 workpieces and 4 machines, where each workpiece contains 4 processes, and the encoding length of each individual is 12. To generate the random key, first, 12 random numbers are uniformly drawn in [0, 1) through a random function, and then arranged in sequence. Assuming that the random key of an individual in the initialization solution population is {0.13 0.02 0.05 0.15 0.35 0.23 0.37 0.69 0.87 0.58 0.42 0.91}, the decoding process is divided into two layers. Specifically, in the first layer of decoding, the random key sequence is sorted from small to large, and then the sorting number of each element is placed in the position of the element in the random key, and the first layer decoding result is [3 1 2 4 6 5 7 11 10 8 9 12]; considering the sequence constraints of each process in the workpiece, the second-level decoding is performed, the sequence numbers (1, 2, 3, 4) are all decoded as 1, which corresponds to workpiece No. 1, the sequence numbers (5, 6, 7, 8) are all decoded as 2, which corresponds to workpiece No. 2, and the sequence numbers (9, 10, 11, 12) are all decoded as 3, which corresponds to workpiece No. 3; the second-level decoding result is [1 1 1 1 2 2 2 3 2 3 3 3].

4. The method for solving the Job Shop scheduling problem based on the red deer algorithm according to claim 3, wherein: In step 4, all male individuals perform the roar operation, and the fitness of the male individuals after roaring is recalculated. The commander and the stag are selected based on the fitness of the male individuals. The specific steps are as follows: (1) Male individuals increase their fitness through roaring. The roaring process is to search for individuals in their territory and select the individual with better fitness between the current individual and the territory individuals as the new individual after roaring. In order to generate feasible territory individuals, the search space is limited. The roaring formula is as follows: Among them, male new A new individual after roaring; male old is the male individual before roaring; a1, a2, and a3 are random numbers uniformly distributed between [0, 1); UB is the upper bound of the search space; LB is the lower bound of the search space; (2) To the male after the roar new The new individual is decoded through the decoding process described in step 2 to obtain the specific workpiece arrangement order, and each process of the workpiece is arranged on the corresponding machine in turn, and then the male is calculated through the objective function. new The fitness value of (3) After roaring, the male individuals are sorted in descending order using their fitness values. According to the proportion γ of commanders among stags, the first γ% of the individuals are selected as commanders, and the remaining male individuals are stags.

5. The method for solving the Job Shop scheduling problem based on the red deer algorithm according to claim 2, wherein: In step 5, the commander and the stag perform combat operations, further updating the commander specifically as follows; Each commander randomly selects a stag from the stag set to fight. The battle process is implemented by the following formula: Where new1 and new2 represent two new solutions generated by the battle process; com is the commander; stag is the stag; b1 and b2 are randomly generated with an even distribution between [0,1); UB is the upper bound of the search space; LB is the lower bound of the search space; Calculate the fitness values ​​of new1 and new2, and select the individual with the best fitness among new1, new2 and com as the commander after the battle. The stag remains unchanged.

6. The method for solving the Job Shop scheduling problem based on the red deer algorithm according to claim 1, characterized in that: In step 6, based on the commander's fitness, a corresponding number of female deer are randomly assigned to him, and the commander and the female deer assigned to him form a red deer tribe. Specifically: First, calculate the fitness value of the commander obtained in step 5; then normalize the fitness of each commander using the following normalization formula: in, is the fitness value after normalization; fit is the fitness value before normalization; N com is the number of commanders; The commander's rights are then calculated, and the total number of female deer in the population is combined to obtain the number of female deer to be allocated to each commander. The specific formula is: Among them, Nharem i N is the number of female deer to be assigned to the i-th commander; hind is the total number of female deer in the population.

7. The method for solving the Job Shop scheduling problem based on the red deer algorithm according to claim 1, characterized in that: In step 7, the commander pairs up with female deer from his own tribe and any other tribes. The specific steps are as follows: The commander randomly selects α% of female deer from his own tribe for pairing; then randomly selects any other tribe and randomly selects β% of female deer from that tribe for pairing. The pairing will produce new individuals, which are: Among them, offs is the offspring produced by the pairing; com is the commander; hind is the male deer; The specific pairing of male deer and the nearest female deer based on Euclidean distance is: For a particular male deer, first calculate the Euclidean distance from it to each female deer. The distance formula is: Among them, d i is the Euclidean distance from the male deer to the i-th female deer; J is the total number of male deer; stag j for the buck j; is the i-th female deer; Then, the doe with the smallest Euclidean distance is selected for pairing. The formula for the offspring produced by this pairing is the same as the pairing of the commander and the doe. Generating the next generation population is as follows: The roulette wheel method is used to evaluate the fitness of the offspring individuals produced by pairing the commander, the male deer and the female deer. Roulette is performed based on the fitness size. At the same time, each individual is sampled with replacement. According to the population size N, N roulette wheels are completed to generate the offspring population.

8. The method for solving the Job Shop scheduling problem based on the red deer algorithm according to claim 1, characterized in that: Step 8: Return to step 3 to evaluate the fitness of the next generation population, iterate until the algorithm meets the stopping condition, and output the optimal solution.

Citation Information

Patent Citations

  • Multi-region decomposition and coordination dynamic economic dispatching method based on modified generalized Benders decomposition

    CN106208075A

  • Task scheduling system and method suitable for mobile health

    US20180136974A1