Multi-target flexible workshop scheduling method based on NSGA-II and ant colony hybrid algorithm
The NSGA-Ⅱ and ant colony hybrid algorithm addresses the inefficiencies of single-objective scheduling by optimizing production speed, equipment utilization, and energy consumption, resulting in a cost-effective and efficient production plan.
Patent Information
- Application Number
- CN202410970700.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-12-27
AI Technical Summary
Existing single-objective flexible job shop scheduling methods fail to balance production speed, equipment utilization, and energy consumption, leading to resource waste and increased costs, and are unable to respond to order changes timely.
A multi-objective flexible workshop scheduling method using the NSGA-Ⅱ and ant colony hybrid algorithm, which includes dual coding of chromosomes, constraints, and a hybrid optimization approach to minimize completion time and machine load, employing NSGA-Ⅱ for initial population generation and ant colony optimization for local search.
The method improves production efficiency and reduces operating costs by obtaining an optimal production plan with the shortest time consumption and smallest total machine load, enhancing scheduling efficiency and solution quality.
Smart Images

Figure CN119203467A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of workshop production scheduling, and in particular relates to a multi-objective flexible workshop scheduling method, which is used for scheduling and management of workshop production plans. Background Art
[0002] With the rapid development of modern manufacturing, the fixed mode of traditional workshop scheduling has indeed been difficult to adapt to the diversified and personalized production needs. In this context, the importance of flexible workshop scheduling has become increasingly prominent. As a core component of the flexible manufacturing system, the core concept of flexible workshop scheduling is flexibility and adaptability. A good scheduling method can not only quickly adjust the configuration of the production line according to production needs, but also optimize resource allocation, thereby improving production efficiency.
[0003] In current production practice, single-objective solutions to the flexible job shop scheduling problem (FJSP) often fail to fully balance the various influencing factors in the production process. Existing technologies for solving single-objective optimization problems still face some challenges, such as: single-objective scheduling may only focus on production speed, but ignore equipment utilization and energy consumption optimization, resulting in resource waste and increased costs; this makes multi-objective optimization an important research direction. However, most existing technologies rely on a single algorithm, which exposes some significant problems and shortcomings in practical applications. For example, when using a scheduling solution with a single algorithm to deal with workshop scheduling problems, the scheduling solution often leads to low production efficiency due to slow scheduling speed and cannot respond to order changes in a timely manner. These problems highlight the limitations of a single algorithm in practical applications. Summary of the invention
[0004] In order to overcome the shortcomings of the prior art, the present invention proposes a multi-objective flexible workshop scheduling method based on NSGA-Ⅱ and ant colony hybrid algorithm, in order to quickly obtain a good production scheduling plan, thereby improving the overall production efficiency and reducing the operating cost of the workshop.
[0005] To achieve the above object, the technical solution of the present invention is as follows:
[0006] The multi-objective flexible workshop scheduling method based on NSGA-Ⅱ and ant colony hybrid algorithm of the present invention is characterized in that it includes the following steps:
[0007] Step 1: Obtain the processing information in the flexible job shop scheduling, including: the number of workpieces n, the i-th workpiece J i , i∈n, number of machines m, kth machine M k , k∈m, the i-th workpiece J i The number of processes is A i , the i-th workpiece J i The g-th process O ig , g∈Ai , Boolean variable O igk , when O igk =1, indicating the kth device M k Processing the i-th workpiece J i The g-th process, otherwise, let O igk =0, process O igk Processing time t igk , O igk The start time of ST igk 、Process O igk Completion time ET igk , the completion time of the plan t finish , W is the total load of the machine, W k is the kth machine M k The load on
[0008] Step 2: Taking the minimum value of the maximum completion time and the minimum value of the total machine load as the objective function, and setting constraints, including process constraints, machine constraints and time constraints, to establish a multi-objective flexible job shop scheduling model;
[0009] Step 3, use the process and machine mixed double-layer real number coding method to encode the chromosome;
[0010] Step 4: According to the processing information in the flexible job shop scheduling, the multi-objective flexible job shop scheduling model is solved by using the NSGA-II algorithm to obtain an initial production scheduling plan;
[0011] Step 5: Initialize the parameters of the ant colony algorithm, and use the ant colony algorithm to solve the initial production scheduling plan to obtain the optimal production scheduling plan.
[0012] The multi-objective flexible workshop scheduling method based on NSGA-Ⅱ and ant colony hybrid algorithm described in the present invention is also characterized in that the step 2 includes:
[0013] Step 2.1: Use equation (1) to establish the first objective function f1 of minimum and maximum completion time:
[0014] f1=min(max(t finish )) (1)
[0015] The second objective function f2 of minimum machine total load is established using formula (2):
[0016]
[0017] In formula (2), O igk A Boolean value indicating that the kth machine M k Whether to process the i-th workpiece J iThe g-th process, if O igk =1, it means that on the kth machine M k Processing the i-th workpiece J i The g-th process O ig , otherwise, let O igk =0;
[0018] Step 2.2: Use formula (3) to construct the processing start time constraint:
[0019] ST igk ≥ET i(g-1)k (3)
[0020] In formula (3), ET i(g-1)k represents the kth machine M k Processing the i-th workpiece J i The g-1th process O i(g-1)k completion time;
[0021] Use formula (4) to construct the completion time constraint:
[0022] ET igk =ST igk +t igk (4)
[0023] Use formula (5) to construct the equipment processing time constraint:
[0024]
[0025] Use formula (6) to construct the workpiece processing time constraint:
[0026]
[0027] In formula (5)-formula (6), if on the kth machine M k Processing the i-th workpiece J i The g-th process, let O igk =1, otherwise, let O igk =0.
[0028] The step 3 comprises:
[0029] The overall coding of the chromosome is composed of a process code and a machine code in sequence; the process code is composed of the serial numbers of all workpieces and their processes in random order, and the value corresponding to each code in the process code represents the serial number of the corresponding workpiece, and the number of occurrences of each code corresponds to the processing process number of the workpiece with the corresponding serial number;
[0030] According to the process code, the machine serial numbers used in the processing process corresponding to the workpiece are selected in sequence to form the machine code.
[0031] Described step 4 is carried out according to the following process:
[0032] Step 4.1 Initialize the relevant parameters of the NSGA-Ⅱ algorithm and determine the selection, crossover and mutation operators;
[0033] Generate an initial population of N as the parent population;
[0034] Step 4.2: After selecting, crossing over, and mutating the parent population, the offspring population is generated;
[0035] After merging the parent population and the child population to form a merged population, the fitness value of each individual in the merged population is calculated and a fast non-dominated sort is performed, so as to select the next parent population of N in number according to the non-dominated relationship and the crowding degree; the fitness value is the inverse of the two objective functions;
[0036] Step 4.3 determines whether the current generation has reached the maximum number of iterations. If so, the Pareto solution set in the last generation of the parent population is output as the initial production scheduling plan.
[0037] Described step 5 is carried out according to the following process:
[0038] Step 5.1: Define the current number of iterations as t and the maximum number of iterations as t max , and initialize t=1;
[0039] Determine the total number of ants to be B, the serial number of the current ant is b, b∈B;
[0040] Establish the set of processes and machines to be searched for the bth ant in the tth generation ant colony To_visit b (t) and the set of processes and machines that have been searched To_visit b (t);
[0041] The pheromone concentration of (x, m) in the xth process of the bth ant in the tth generation ant colony is initialized by using the initial production scheduling scheme.
[0042] Let the volatility coefficient of pheromone be ρ, the pheromone weight factor be α, and the visibility weight factor be β;
[0043] Step 5.2, initialize b=1;
[0044] Step 5.3: Use formula (9) to calculate the number of visited ants in the tth generation ant colony. b The xth process in (t) processes (x,m) on the mth machine to To_visit b The state transition probability of the yth process in (t) processing (y,k) on the kth machine
[0045]
[0046] In formula (9), represents the pheromone concentration of the bth ant in the tth generation ant colony from processing (x,m) in the xth step on the mth machine to processing (y,k) in the yth step on the kth machine, It represents the visibility coefficient from the xth process of the bth ant in the tth generation ant colony processing (x,m) on the mth machine to the yth process processing (y,k) on the kth machine. represents the pheromone concentration from the xth process of the bth ant in the tth generation ant colony processing (x,m) on the mth machine to the sth process processing (s,h) on the hth machine, It represents the visibility coefficient from the xth process of the bth ant in the tth generation ant colony processing (x,m) on the mth machine to the sth process processing (s,h) on the hth machine;
[0047] Step 5.4: According to The set of processes and machines that the bth ant in the tth generation of the ant colony has searched for Visited b (x,m) in (t) is transferred to To_visit b After (y,k) in (t), move (y,k) from To_visit b (t) and added to Visited b (t), thereby updating To_visit b (t);
[0048] Step 5.5, determine To_visit b (t) Is it empty? If so, execute step 5.6; otherwise, return to step 5.3 and execute sequentially;
[0049] Step 5.6, after assigning b+1 to b, return to step 5.3 and execute sequentially until b>B;
[0050] Step 5.7: Use formula (10) to update the pheromone concentration of the xth process of the bth ant in the t+1th generation ant colony processing (x, m) to (y, k) on the mth machine:
[0051]
[0052] In formula (10), The bth ant in the tth generation ant colony came from Visited b (x,m) in (t) to To_visitb The pheromone increment released by (y, k) in (t) is b (x,m) in (t) is transferred to To_visit b (y,k) in (t), then let Otherwise, let in, The bth ant in the tth generation ant colony from Visited b (x,m) in (t) to To_visit b (t) is the completion time of (y, k), Q represents the pheromone intensity; The bth ant from the tth generation ant colony visited b (x,m) in (t) to To_visit b The additional pheromone increment given by (y, k) in (t) is b (x,m) in (t) is transferred to To_visit b (y,k) in (t), then let Otherwise, let in, Indicates that the bth ant in the tth generation ant colony has visited b (x,m) in (t) to To_visit b The shortest completion time of (y, k) in (t); δ is the number of elite ants in the ant colony, and δ = e × B, e is the proportion of elite ants in the ant colony;
[0053] Step 5.9: After assigning t+1 to t, if t≥t max , then calculate the tth max The shortest completion time of each ant in the generation population is obtained, and the ant corresponding to the minimum value of the shortest completion time is selected as the optimal production scheduling solution, including: the processing order of each workpiece, the machine used and the shortest completion time; otherwise, return to step 5.2 and execute sequentially.
[0054] The electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the multi-objective flexible workshop scheduling method, and the processor is configured to execute the program stored in the memory.
[0055] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the multi-objective flexible workshop scheduling method when the computer program is executed by a processor.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] 1. The present invention sets up multiple constraints according to the actual production situation of the flexible operation workshop, establishes a multi-objective optimization model, and uses NSGA-Ⅱ and ant colony hybrid algorithm to solve the multi-objective optimization model, and obtains an optimal production plan with the shortest time consumption and the smallest total machine load. The obtained production plan greatly improves the workshop production efficiency and reduces the workshop production cost.
[0058] 2. The present invention uses a hybrid algorithm that combines the NSGA-II algorithm with the ant colony algorithm. The NSGA-II algorithm is used to generate the initial population and perform multi-objective optimization. The ant colony algorithm is used to further optimize the scheduling solution in local search, thereby improving the scheduling efficiency and the quality of the solution.
[0059] 3. The present invention adopts the dual coding chromosome of process sequencing and machine selection, which completely contains the information that must be included in the flexible operation production scheduling plan: the order of the process processing and the processing machine of the process. Therefore, compared with the coding methods such as "binary coding", "symbol coding" and "real number coding", the dual coding chromosome of process sequencing and machine selection is more in line with the production and processing conditions of the flexible operation workshop, so that the generated production scheduling plan is more in line with reality.
[0060] 4. The present invention combines the faster convergence speed of the NSGA-Ⅱ algorithm with the stronger local search capability of the ant colony algorithm to solve the multi-objective flexible job shop scheduling problem, thereby improving the production efficiency of the shop and reducing the operating cost of the shop. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 is an overall flow chart of the method of the present invention;
[0062] Figure 2 It is a flow chart of the NSGA-Ⅱ algorithm of the present invention;
[0063] Figure 3 Flow chart of the ant colony algorithm of the present invention. DETAILED DESCRIPTION
[0064] In this embodiment, Figure 1 As shown in FIG. 1 , a multi-objective flexible workshop scheduling method based on NSGA-Ⅱ and ant colony hybrid algorithm includes the following steps:
[0065] Step 1: Obtain the processing information in the flexible job shop scheduling, including: the number of workpieces n, the i-th workpiece J i , i∈n, number of machines m, kth machine M k , k∈m, the i-th workpiece J i The number of processes is Ai , the i-th workpiece J i The g-th process O ig , g∈A i , Boolean variable O igk , when O igk =1, indicating the kth device M k Processing the i-th workpiece J i The g-th process, otherwise, let O igk =0, process O igk Processing time t igk , O igk The start time of ST igk 、Process O igk Completion time ET igk , the completion time of the plan t finish , W is the total load of the machine, W k is the kth machine M k The load on
[0066] Step 2: Taking the minimum value of the maximum completion time and the minimum value of the total machine load as the objective function, and setting constraints, including process constraints, machine constraints and time constraints, to establish a multi-objective flexible job shop scheduling model;
[0067] Step 2.1: Use equation (1) to establish the first objective function f1 of minimum and maximum completion time:
[0068] f1=min(max(t finish )) (1)
[0069] The second objective function f2 of minimum machine total load is established using formula (2):
[0070]
[0071] In formula (2), O igk A Boolean value indicating that the kth machine M k Whether to process the i-th workpiece J i The g-th process, if O igk =1, it means that on the kth machine M k Processing the i-th workpiece J i The g-th process O ig , otherwise, let O igk =0;
[0072] Step 2.2: Use formula (3) to construct the processing start time constraint:
[0073] ST igk ≥ET i(g-1)k (3)
[0074] In formula (3), ET i(g-1)k represents the kth machine M k Processing the i-th workpiece J i The g-1th process O i(g-1)k completion time;
[0075] Use formula (4) to construct the completion time constraint:
[0076] ET igk =ST igk +t igk (4)
[0077] Use formula (5) to construct the equipment processing time constraint:
[0078]
[0079] Use formula (6) to construct the workpiece processing time constraint:
[0080]
[0081] In formula (5)-formula (6), if on the kth machine M k Processing the i-th workpiece J i The g-th process, let O igk =1, otherwise, let O igk =0.
[0082] Step 3, use the process and machine mixed double-layer real number coding method to encode the chromosome;
[0083] The overall coding of the chromosome is composed of a process code and a machine code in sequence; the process code is composed of the serial numbers of all workpieces and their processes in random order, and the value corresponding to each code in the process code represents the serial number of the corresponding workpiece, and the number of occurrences of each code corresponds to the processing process number of the workpiece with the corresponding serial number;
[0084] According to the process code, the machine serial numbers used in the processing process corresponding to the workpiece are selected in sequence to form the machine code.
[0085] Step 4: Figure 2 As shown, according to the processing information in the flexible job shop scheduling, the multi-objective flexible job shop scheduling model is solved by using the NSGA-Ⅱ algorithm to obtain the initial production scheduling plan;
[0086] Step 4.1 Use the relevant parameters of the initialized NSGA-Ⅱ algorithm to determine the selection, crossover and mutation operators; generate an initialization population with a population size of N according to the relevant rules;
[0087] Define the current number of iterations Z and initialize z = 1; set the maximum number of iterations to Z max ; Determine chromosome selection, crossover and mutation operators:
[0088] The population initialization adopts a mixed initialization method using multiple scheduling rules, including the local minimum processing time rule, the global earliest completion time rule and the random rule; the initial population P is generated by mixing z , the population size is N.
[0089] For related rules: (1) Local minimum processing time rule: Select the machine with the shortest processing time from the set of selectable machines.
[0090] (2) Global Earliest Completion Time Rule: Calculate the completion time of all available machines and select the machine that can complete the processing earliest.
[0091] (3) Random rules: The workpiece process sequence and machine selection are scheduled according to the generated random numbers.
[0092] Step 4.2: Generate a new offspring population through selection, crossover and mutation of the parent population; merge the two to form a new population, calculate the fitness value of each individual and perform fast non-dominated sorting; and adopt an elite strategy according to the non-dominated relationship and crowding degree;
[0093] Step 4.2.1: Based on the parent population P t , through selection, crossover and mutation operations, a sub-population Q with a population size of N is generated t ,
[0094] The parent population P of the Zth iteration z and the offspring population Q z Merge to generate a new population R with a population size of 2N z .
[0095] Step 4.2.2: The crossover operation uses the POX crossover method. z When two parent chromosomes Parent1 and Parent2 are selected, the process is as follows:
[0096] 1) Set the workpiece i Randomly divided into two non-empty subsets J1 and J2;
[0097] 2) Then the processes in the two parent chromosomes containing the artifacts in J1 are kept unchanged and copied to the children Child1 and Child2;
[0098] 3) Copy the process containing the workpiece in J2 in the first parent chromosome Parent1 to Child2, and copy the process containing the workpiece in J2 in the second parent chromosome Parent2 to Child1, without changing the order;
[0099] 4) The two parent chromosomes Parent1 and Parent2 complete crossover to generate two offspring chromosomes Child1 and Child2.
[0100] Step 4.2.3: The mutation operation is performed from the available machine set M k A method to randomly select a machine to replace the currently selected machine
[0101] Step 4.2.4: Calculate the new population R z The fitness value of each individual.
[0102] Calculate the parent chromosome Parent in the zth iteration z and the offspring chromosome Child at the zth iteration z The fitness value of .
[0103] Take the inverse of the two objective functions as the fitness function, the formula is as follows:
[0104]
[0105] Step 4.2.5: Perform fast non-dominated sorting and adopt an elite strategy based on non-dominated relations and congestion.
[0106] First, find the non-dominated solution set in the population, mark it as the first non-dominated layer F1, and remove the first non-dominated layer F1 from the entire population. Then search the non-dominated solution set of the remaining population again, mark it as the second non-dominated layer F2, and remove the first non-dominated layer F2 from the entire population. Repeat the process until the entire population is stratified.
[0107] Step 4.2.6: Calculate the congestion
[0108] First, initialize the crowding distance of individuals on the same layer, and initialize the crowding distance U of individuals d = 0, for each objective function, the individuals are arranged from small to large according to the value of each objective function, the crowding degree of the boundary is set to ∞, and the maximum value f of each objective function value of the individuals in the same layer is recorded max and the minimum value f min , and the crowding distance of the individual in the middle is calculated based on the three adjacent individuals in each arrangement:
[0109]
[0110] in, It represents the crowding distance of the rth individual in the Zth iteration, f(r+1) is the objective function value of the r+1th individual of the current objective function, and f(r-1) is the objective function value of the r-1th individual of the current objective function.
[0111] Step 4.2.7: Adopt the elite strategy and retain the first N individuals to generate a new parent population P. z '.
[0112] Step 4.3 determines whether the maximum number of iterations has been reached. If so, the final Pareto solution set is output as the initial solution. If not, the number of iterations is increased by 1, and the process returns to step 4.2.
[0113] Step 5: Figure 3 As shown, the parameters of the ant colony algorithm are initialized, and the ant colony algorithm is used to solve the initial production scheduling plan to obtain the optimal production scheduling plan.
[0114] Step 5.1: Define the current number of iterations as t and the maximum number of iterations as t max , and initialize t=1;
[0115] Determine the total number of ants to be B, the serial number of the current ant is b, b∈B;
[0116] Establish the set of processes and machines to be searched for the bth ant in the tth generation ant colony To_visit b (t) and the set of processes and machines that have been searched To_visit b (t);
[0117] The pheromone concentration of (x, m) in the xth process of the bth ant in the tth generation ant colony is initialized by using the initial production scheduling scheme.
[0118] Let the volatility coefficient of pheromone be ρ, the pheromone weight factor be α, and the visibility weight factor be β;
[0119] Step 5.2, initialize b=1;
[0120] Step 5.3: Use formula (9) to calculate the number of visited ants in the tth generation ant colony. b The xth process in (t) processes (x,m) on the mth machine to To_visit b The state transition probability of the yth process in (t) processing (y,k) on the kth machine
[0121]
[0122] In formula (9), represents the pheromone concentration of the bth ant in the tth generation ant colony from processing (x,m) in the xth step on the mth machine to processing (y,k) in the yth step on the kth machine, It represents the visibility coefficient from the xth process of the bth ant in the tth generation ant colony processing (x,m) on the mth machine to the yth process processing (y,k) on the kth machine. represents the pheromone concentration from the xth process of the bth ant in the tth generation ant colony processing (x,m) on the mth machine to the sth process processing (s,h) on the hth machine, It represents the visibility coefficient from the xth process of the bth ant in the tth generation ant colony processing (x,m) on the mth machine to the sth process processing (s,h) on the hth machine;
[0123] Step 5.4: According to The set of processes and machines that the bth ant in the tth generation of the ant colony has searched for Visited b (x,m) in (t) is transferred to To_visit b After (y,k) in (t), move (y,k) from To_visit b (t) and added to Visited b (t), thereby updating To_visit b (t);
[0124] Step 5.5, determine To_visit b (t) Is it empty? If so, execute step 5.6; otherwise, return to step 5.3 and execute sequentially;
[0125] Step 5.6, after assigning b+1 to b, return to step 5.3 and execute sequentially until b>B;
[0126] Step 5.7: Use formula (10) to update the pheromone concentration of the xth process of the bth ant in the t+1th generation ant colony processing (x, m) to (y, k) on the mth machine:
[0127]
[0128] In formula (10), The bth ant in the tth generation ant colony came from Visited b (x,m) in (t) to To_visit b The pheromone increment released by (y, k) in (t) is b (x,m) in (t) is transferred to To_visitb (y,k) in (t), then let Otherwise, let in, The bth ant in the tth generation ant colony from Visited b (x,m) in (t) to To_visit b (t) is the completion time of (y, k), Q represents the pheromone intensity; The bth ant from the tth generation ant colony visited b (x,m) in (t) to To_visit b The additional pheromone increment given by (y, k) in (t) is b (x,m) in (t) is transferred to To_visit b (y,k) in (t), then let Otherwise, let in, Indicates that the bth ant in the tth generation ant colony has visited b (x,m) in (t) to To_visit b The shortest completion time of (y, k) in (t); δ is the number of elite ants in the ant colony, and δ = e × B, e is the proportion of elite ants in the ant colony;
[0129] Step 5.9: After assigning t+1 to t, if t≥t max , then calculate the tth max The shortest completion time of each ant in the generation population is obtained, and the ant corresponding to the minimum value of the shortest completion time is selected as the optimal production scheduling solution, including: the processing order of each workpiece, the machine used and the shortest completion time; otherwise, return to step 5.2 and execute sequentially.
[0130] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0131] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.
Claims
1. A multi-objective flexible workshop scheduling method based on NSGA-Ⅱ and ant colony hybrid algorithm, characterized in that: The steps include: Step 1: Obtain the processing information in the flexible job shop scheduling, including: the number of workpieces n, the i-th workpiece J i , i∈n, number of machines m, kth machine M k , k∈m, the i-th workpiece J i The number of processes is A i , the i-th workpiece J i The g-th process O ig , g∈A i , Boolean variable O igk , when O igk =1, indicating the kth device M k Processing the i-th workpiece J i The g-th process, otherwise, let O igk =0, process O igk Processing time t igk , O igk The start time of ST igk 、Process O igk Completion time ET igk , the completion time of the plan t finish , W is the total load of the machine, W k is the kth machine M k The load on Step 2: Taking the minimum value of the maximum completion time and the minimum value of the total machine load as the objective function, and setting constraints, including process constraints, machine constraints and time constraints, to establish a multi-objective flexible job shop scheduling model; Step 3, use the process and machine mixed double-layer real number coding method to encode the chromosome; Step 4: According to the processing information in the flexible job shop scheduling, the multi-objective flexible job shop scheduling model is solved by using the NSGA-II algorithm to obtain an initial production scheduling plan; Step 5: Initialize the parameters of the ant colony algorithm, and use the ant colony algorithm to solve the initial production scheduling plan to obtain the optimal production scheduling plan.
2. A multi-objective flexible workshop scheduling method based on NSGA-Ⅱ and ant colony hybrid algorithm according to claim 1, characterized in that: The step 2 comprises: Step 2.1: Use equation (1) to establish the first objective function f1 of minimum and maximum completion time: f1=min(max(t finish )) (1) The second objective function f2 of minimum machine total load is established using formula (2): In formula (2), O igk A Boolean value indicating that the kth machine M k Whether to process the i-th workpiece J i The g-th process, if O igk =1, it means that on the kth machine M k Processing the i-th workpiece J i The g-th process O ig , otherwise, let O igk =0; Step 2.2: Use formula (3) to construct the processing start time constraint: ST igk ≥ET i(g-1)k (3) In formula (3), ET i(g-1)k represents the kth machine M k Processing the i-th workpiece J i The g-1th process O i(g-1)k completion time; Use formula (4) to construct the completion time constraint: ET igk =ST igk +t igk (4) Use formula (5) to construct the equipment processing time constraint: Use formula (6) to construct the workpiece processing time constraint: In formula (5)-formula (6), if on the kth machine M k Processing the i-th workpiece J i The g-th process, let O igk =1, otherwise, let O igk =0.
3. The multi-objective flexible workshop scheduling method based on NSGA-Ⅱ and ant colony hybrid algorithm according to claim 1 is characterized in that: The step 3 comprises: The overall coding of the chromosome is composed of a process code and a machine code in sequence; the process code is composed of the serial numbers of all workpieces and their processes in random order, and the value corresponding to each code in the process code represents the serial number of the corresponding workpiece, and the number of occurrences of each code corresponds to the processing process number of the workpiece with the corresponding serial number; According to the process code, the machine serial numbers used in the processing process corresponding to the workpiece are selected in sequence to form the machine code.
4. The multi-objective flexible workshop scheduling method based on NSGA-Ⅱ and ant colony hybrid algorithm as claimed in claim 1 is characterized in that: Described step 4 is carried out according to the following process: Step 4.1 Initialize the relevant parameters of the NSGA-Ⅱ algorithm and determine the selection, crossover and mutation operators; Generate an initial population of N as the parent population; Step 4.2: After selecting, crossing over, and mutating the parent population, the offspring population is generated; After merging the parent population and the child population to form a merged population, the fitness value of each individual in the merged population is calculated and a fast non-dominated sort is performed, so as to select the next parent population of N in number according to the non-dominated relationship and the crowding degree; the fitness value is the inverse of the two objective functions; Step 4.3 determines whether the current generation has reached the maximum number of iterations. If so, the Pareto solution set in the last generation of the parent population is output as the initial production scheduling plan.
5. The multi-objective flexible workshop scheduling method based on NSGA-Ⅱ and ant colony hybrid algorithm as claimed in claim 1 is characterized in that: Described step 5 is carried out according to the following process: Step 5.1: Define the current number of iterations as t and the maximum number of iterations as t max , and initialize t=1; Determine the total number of ants to be B, the serial number of the current ant is b, b∈B; Establish the set of processes and machines to be searched for the bth ant in the tth generation ant colony To_visit b (t) and the set of processes and machines that have been searched To_visit b (t); The pheromone concentration of (x, m) in the xth process of the bth ant in the tth generation ant colony is initialized by using the initial production scheduling scheme. Let the volatility coefficient of pheromone be ρ, the pheromone weight factor be α, and the visibility weight factor be β; Step 5.2, initialize b=1; Step 5.3: Use formula (9) to calculate the number of visited ants in the tth generation ant colony. b The xth process in (t) processes (x,m) on the mth machine to To_visit b The state transition probability of the yth process in (t) processing (y,k) on the kth machine In formula (9), represents the pheromone concentration of the bth ant in the tth generation ant colony from the xth step on the mth machine to the yth step on the kth machine. It represents the visibility coefficient from the xth process of the bth ant in the tth generation ant colony processing (x,m) on the mth machine to the yth process processing (y,k) on the kth machine. represents the pheromone concentration from the xth process of the bth ant in the tth generation ant colony processing (x,m) on the mth machine to the sth process processing (s,h) on the hth machine, It represents the visibility coefficient from the xth process of the bth ant in the tth generation ant colony processing (x,m) on the mth machine to the sth process processing (s,h) on the hth machine; Step 5.4: According to The set of processes and machines that the bth ant in the tth generation ant colony has searched Visited b (x,m) in (t) is transferred to To_visit b After (y,k) in (t), move (y,k) from To_visit b (t) and added to Visited b (t), thereby updating To_visit b (t); Step 5.5, determine To_visit b (t) Is it empty? If so, execute step 5.6; otherwise, return to step 5.3 and execute sequentially; Step 5.6, after assigning b+1 to b, return to step 5.3 and execute sequentially until b>B; Step 5.7: Use formula (10) to update the pheromone concentration of the xth process of the bth ant in the t+1th generation ant colony processing (x, m) to (y, k) on the mth machine: In formula (10), The bth ant in the tth generation ant colony came from Visited b (x,m) in (t) to To_visit b The pheromone increment released by (y, k) in (t) is b (x,m) in (t) is transferred to To_visit b (y,k) in (t), then let Otherwise, let in, The bth ant in the tth generation ant colony from Visited b (x,m) in (t) to To_visit b (t) is the completion time of (y, k), Q represents the pheromone intensity; The bth ant from the tth generation ant colony visited b (x,m) in (t) to To_visit b The additional pheromone increment given by (y, k) in (t) is b (x,m) in (t) is transferred to To_visit b (y,k) in (t), then let Otherwise, let in, Indicates that the bth ant in the tth generation ant colony has visited b (x,m) in (t) to To_visit b The shortest completion time of (y, k) in (t); δ is the number of elite ants in the ant colony, and δ = e × B, e is the proportion of elite ants in the ant colony; Step 5.9: After assigning t+1 to t, if t≥t max , then calculate the tth max The shortest completion time of each ant in the generation population is obtained, and the ant corresponding to the minimum shortest completion time is selected as the optimal production scheduling solution, including: the processing order of each workpiece, the machine used and the shortest completion time; otherwise, return to step 5.2 and execute sequentially.
6. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the multi-objective flexible shop scheduling method described in any one of claims 1 to 5, and the processor is configured to execute the program stored in the memory.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the multi-objective flexible shop scheduling method described in any one of claims 1 to 5 are executed.
