The Flexible Job-shop Scheduling problem (FJSP) is an important extension of the classical job-shop scheduling problem, where each operation can be handled on multiple machines and vice versa. Combined with the actual processing time, machine load and operation cost, a multi-objective scheduling model was established. In view of the insufficient convergence of NSGA2 algorithm, the immune balance principle is introduced to improve the selection strategy and elite retention strategy of NSGA2 algorithm, which successfully avoids the local convergence problem and improves the optimization performance of the algorithm. By comparing with heuristic rules and various intelligent algorithms, the improved NASA2 algorithm can obtain better solutions. Using the improved NAGA2 algorithm to solve an example, not only the order of magnitude and dimension barriers between multiple objects are overcome effectively, but also a satisfactory Pareto solution set is obtained, which further verifies the feasibility of the algorithm and model.
function main clear all; clc; pop = 100; % population gen = 10; Pop_f =100; % Number of parent population data_mac; % Load workshop equipment information data_pro; Pro_matrix =[]; Mac_matrix =[]; % decision matrix c_time_matrix=[]; % last generation total time matrix of all individuals t_cons_matrix=[]; % Total energy consumption matrix of all last generation individuals for I =1: POP_f % generates initial population [P,M,N]=initPop(J); %J is the relevant information of the workpiece, p is the code of the process,m is the corresponding machine code, n is the serial number of the selected equipment in the corresponding optional equipment set [PART_T, MAC_T]=decode(J,P,M,N); %part_t indicates the processing time of each process of the corresponding workpiece. Mac_t indicates the processing time of each process of the corresponding equipment. C_time =cal_comp_time(part_t); %c_time Maximum completion time part_t Indicates the processing time corresponding to the scheduling scheme t_LOAD = cal_equ_LOAD (part_t); Pro_matrix (I,:)=[P,c_time,t_load]; pro_matrix(I,:)=[P,c_time,t_load]; mac_matrix(i,:)=M; end nsgaiii( J,Mac,gen,pop,pro_matrix,mac_matrix ); endCopy the code
Complete code added QQ1575304183