Application of dynamic firework algorithm considering variable neighborhood strategy in flexible job shop scheduling problem

. Aiming at the flexible job shop scheduling problem, this paper constructs a dual-objective mathematical model to minimize the maximum completion time and the minimum total processing cost. The traditional firework algorithm introduces a variable neighborhood search strategy, which is generated during the explosion of the algorithm. On the basis of explosive spark and Gaussian spark, the algorithm is further avoided from falling into the dilemma of local optimization. The product of completion time and processing cost is used as the fitness value of the plan, so that the firework algorithm is suitable for solving the two objective scheduling problems in this paper, and the ratio of fitness value and congestion is used as a comprehensive index for the selection of the optimal plan . In this paper, the selected 5×6 calculation examples are solved, and the completion time of the optimal scheduling scheme is reduced by 12.9%, and the total production cost is reduced by 17.67%, which verifies the feasibility and efficiency of the method.


Introduction
Flexible job shop scheduling breaks the limitations of processes on processing machines in traditional workshop scheduling problems [1]. Each workpiece has multiple processes with different numbers. Each process can be processed by multiple equipment, and the same process can be selected. The processing time and consumption of different equipment in equipment concentration are different, so the flexible job shop scheduling problem is a high-dimensional planning problem of multi-workpieces and multi-processes in multiple equipment processing and sequencing, and it is a complex NP-hard problem [2]. This problem has been closely discussed by scholars in many related fields, and it is more in line with the actual scheduling needs of enterprises, and has strong theoretical significance and application value [3].
Scholars have used traditional and advanced swarm intelligence algorithms to solve flexible job shop scheduling problems. Rui Cui [4], Qing Guo [5], Guiying Ning [6]and others respectively proposed an improved genetic algorithm to solve the problem. Weiwei Jing et al. [8] proposed an improved dynamic adaptive NSGA-II algorithm for the production scheduling problem of component manufacturing in large military enterprises. Most studies have not taken into consideration the production cost of workpiece processing in different equipment.
Fireworks Algorithm (FWA), as a new type of swarm intelligence optimization algorithm, is inspired by fireworks explosions [9]. Xuelian Pang et al. [10] proposed an improved firework algorithm to solve the mixed flow shop scheduling problem with the goal of minimizing the maximum completion time; Hai Dong et al. [1] proposed. A dynamic firework algorithm; Qingmin Shi [11] proposed a hybrid firework algorithm to solve the scheduling problem of heterogeneous parallel machines. In order to improve the fireworks algorithm (FWA), Jingmei Li et al. [12] proposed a multi-processor task scheduling algorithm IMFWA based on the improved FWA, but it is mostly used to solve single-objective problems.
In summary, this article will aim at minimizing the maximum completion time and minimizing production costs, construct a flexible job shop scheduling mathematical model, and use the firework algorithm based on the variable neighborhood search algorithm to solve the problem and obtain the optimal scheduling plan.

Description of flexible job shop scheduling problem
In the flexible job shop scheduling problem, each workpiece has multiple processes, and the optional equipment set of each process is different.

Mathematical model construction
The equipment is represented by indicates that the optional equipment set of the process is indicated by ij K . In addition, max C represents the maximum completion time, sum P represents the total production cost, ij S represents the processing start time of the process, ijk t represents the processing time of the j process of the workpiece i on the equipment k , and ij C represents the completion of the j process of the workpiece i Time, D represents the delivery date of the workpiece, ijk R is a decision variable, and the value range is {0,1}. When the value is 1, it means that the j process of workpiece i is processed on equipment k, ' ' ijk i j k Z  is also a decision variable, with a value range of {0,1} . When the value is 1, it means that the j process of the workpiece i is processed on the machine k before the ' j process of the workpiece ' i . The calculation Equations for maximum completion time and total production cost are expressed by equations (1) and (2) respectively: The mathematical model of the flexible job shop scheduling problem constructed to minimize the maximum completion time and processing cost is as follows: Objective function: Restrictions: ( 1) ; The Equation (4) indicates that the process of the workpiece must be processed in accordance with the process sequence. (1 ) Equation (5) and Equation (6) indicate that a process can only be processed after the selected machine is idle and the previous process is completed.
Equation (7) means that each process can only select one machine from the set of candidate machines.
Equation (8) indicates that the maximum completion time is less than the delivery date.
Equation (9) means that the total cost is less than the maximum cost.
Equation (10) represents the start time and processing time of the process.
Equation (11) represents the value range of decision variables.

VNS-FWA algorithm
In this paper, the variable neighborhood search algorithm is integrated into the explosion operation of the firework algorithm to further avoid the algorithm from falling into the local optimum on the basis of the Gaussian spark effect.

Variable neighborhood search
Variabl Neighborhood Search (VNS) is an effective meta-heuristic search algorithm [13], This article uses three kinds of neighborhood structures: (1) Exchange.

Firework algorithm
The Firework Algorithm was originally proposed by Tan et al, a new type of swarm intelligence optimization algorithm.

Initialization
Each feasible solution represents a spark, and all feasible solutions constitute a feasible solution set. Each dimension of fireworks and sparks represents a different scheduling plan.
Use Equation (12) to express the definition of initial firework X: Num initial fireworks are randomly generated according to Equation (12).

Calculate the number of sparks and explosion amplitude
This article will minimize time and production costs at the same time. Therefore, fitness is defined by Equation (13).
The number of sparks is solved by Equation (14) and (15), and the explosion amplitude is solved by Equation (16).
and min f respectively represent the worst and best fitness values in the random solution set, and m and A represent the maximum number of sparks and explosion amplitude, respectively.

Explosion operation
The explosion of fireworks produces explosive sparks and Gaussian sparks. Each firework explosion produces s explosion sparks ˆe i X and each iteration produces m Gaussian a is the number of dimensions, calculated by Equation (17).

Select operation
Among the remaining solutions, the selection is made according to the distance between each solution and the other solutions. The probability of selection is determined by Equation (18).
The selection operation is divided into 3 steps: Step1: According to Pareto superior theory, all target solutions are divided into different non-dominated levels; Step2: To calculate the fitness and congestion of the target solutions of the same nondominated level, the fitness calculation Equation is the Equation (13) The comprehensive index / ( ) i f r X is defined by Equation (21): Sort the feasible solutions of their respective non-dominated levels according to the comprehensive indicators, and proceed to the next step; Step3: According to the measure of the superiority of the multi-objective solution in the previous two steps, select the initial firework for the next iteration and the solution for the next iteration, and save it to the file when the archive size requirement is met.

Solving calculation examples based on VNS-FWA algorithm
The above algorithm is used to solve the 5×6 flexible job shop scheduling problem to obtain the optimal solution.

Calculation example
This article generates an asymmetric 5×6 matrix in the figure below to show the the optional equipment.

Initialization parameters
From the generated scheduling plan solution set, randomly select 50 initial fireworks according to Equation (13), set 50 m  and

Explosion operation and variable neighborhood search
Calculate the fitness value of 50 initial fireworks in the population, calculate the number of sparks and the explosion amplitude of the explosion of the fireworks according to the Equation, and generate explosion sparks and Gaussian sparks according to the algorithm.

Selection and archiving of the optimal scheduling plan
The fireworks and sparks are compared according to the comprehensive index, and the best fireworks or sparks are selected to enter the next generation. The scheduling plan corresponding to the optimal solution of the initial fireworks is: The first-generation fireworks and sparks are compared through comprehensive indicators, and the dispatching plan corresponding to the first-generation best-quality fireworks is obtained as the optimal dispatching plan in the initial plan, so the plan is retained for the next generation. In the remaining solution, 49 fireworks and the best individuals of the previous generation are selected according to the probability to form the initial population of the next generation. Repeat the above operations until the algorithm reaches the termination condition, and the optimal scheduling scheme is obtained.

Determination of the optimal scheduling plan
Among the 486 better solutions on file, the optimal solutions of the respective levels are solved according to the non-dominated levels S1 and S2, and the optimal scheduling schemes for each level obtained by the solution are: Comparing the comprehensive indicators from the S1 and S2 optimal schemes, the optimal scheme is obtained as the S1 optimal scheme. The scheme information and Gantt chart are as follows: From the Gantt chart, you can clearly see the processing equipment arrangement, start processing time, process time, and complete processing time corresponding to the process of each workpiece. The completion time of the scheduling plan is 80, and the total processing cost is 301.92, which meets delivery.  The above table shows the time utilization rate of each device under the optimal scheduling plan. The utilization rate of device 3 is as high as 95%, because the process that includes device 3 in the optional equipment set is compared with other equipment in the optional equipment set The time is shorter and the cost is lower. The same is true for other devices.

Conclusion
This paper builds a mathematical model to minimize the maximum completion time and total processing cost, and uses the firework algorithm based on variable neighborhood search to solve the 5×6 example to obtain the optimal scheduling plan. The completion time of the plan is 80, which reduces 12.9%, the processing cost was 301.92, a decrease of 17.67%, meeting expectations. In the process of solving, the explosive spark effectively realized the function of local search, and the Gaussian spark and variable neighborhood search algorithm effectively avoided the dilemma of the algorithm falling into the local optimum. The algorithm undergoes cyclic iterations, and the optimal individual of each generation retains the next generation as the initial population of the next generation, continuously optimizes, and finally obtains the optimal solution of the scheme. However, this paper does not consider the processing effects and capabilities of this method under different scales, and only verifies the feasibility and efficiency of this example. In the future, research will be carried out on scheduling problems of different scales.