Intelligent algorithms (GA, DBO, etc.) solve the zero-wait flow shop scheduling problem (NWFSP)

Let me make a statement first: The article is copied and pasted directly from the push in my personal official account. Therefore, friends who are interested in intelligent optimization algorithms can follow my personal official account: Heuristic Algorithm Discussion . I will share different intelligent optimization algorithms in the public account from time to time, classic ones, or new intelligent optimization algorithms proposed in recent years, with MATLAB codes attached.

Main reference materials:

[1] Pan Quanke, Gao Liang, Li Xinyu. Flow shop scheduling and its optimization algorithm[M]. Wuhan: Huazhong University of Science and Technology Press, 2013.

Once the processing object enters processing, it cannot be interrupted until all its operations are completed, which is zero waiting. For example, in the steelmaking-continuous casting process of steel production, in order to realize the hot-transfer and hot-charging production method and reduce the temperature drop of molten steel in the air, it is hoped that the molten steel will have zero waiting during the processing. Figure 1(a) shows a 3×3 Gantt chart of zero-wait flow shop scheduling problem. Due to the zero-waiting requirement for workpiece processing, when the first machine finishes processing the first workpiece, it cannot immediately process the second workpiece. Similarly, when the first machine finishes processing the second workpiece, it cannot immediately process the third workpiece. Compared with the replacement flow shop scheduling shown in Figure 1(b), the start time of workpiece 2 and workpiece 3 lags behind. Therefore, the zero-wait flow shop scheduling problem is different from the general replacement flow shop scheduling problem.

picture

figure 1

Here we discuss the difference between the zero-wait flow shop scheduling problem (NWFSP) and the zero-idle flow shop scheduling problem (NIFSP): NIFSP is mainly for machines, and once the machines are processed, they cannot be idle; NWFSP is mainly for workpieces, and once the workpieces are processed, Once it starts to be processed, you can’t wait.

01Problem
description

Here we mainly discuss the no-wait flow-shop scheduling problem (NWFSP) with the maximum completion time as the optimization goal, recorded as F m | perm, no - wait | C max. Research shows that when m≥3, this type of scheduling problem is an NP -Hard problem.

NWFSP can be described as: n workpieces are processed on m machines, and the processing routes of all workpieces on each machine are the same. At the same time, it is agreed that: a workpiece can only be processed on one machine at a certain time; a machine can only process one workpiece at a certain time; there is no waiting time between two adjacent processes for the same workpiece. The processing time of each workpiece in each process is known. The problem is how to arrange the production sequence of each workpiece to minimize the scheduling index.

02Mathematical
model

(The following content is excerpted from the reference book mentioned at the beginning of the tweet, Teacher Pan’s book.)

picture

picture

03
Calculation of processing performance indicators

Maximum completion time ( C max) is the most commonly used processing performance index to study zero-wait flow shop scheduling problems. Here we only introduce one method of calculating C max: calculating the start time difference between adjacent workpieces, and its time complexity is O ( nm ). (The following content is taken from the reference book mentioned at the beginning of the tweet, Teacher Pan’s book.) Other calculation methods of C max can also be consulted in this book.

picture

picture

picture

04Intelligent
algorithm (GA, DBO, etc.) coding method

For genetic algorithms (GA), because the algorithm itself is discrete, the next generation is generated through selection, crossover, and mutation. Therefore, a chromosome represents a scheduling scheme. That is, the ordering of artifacts is its individual coding. For example, for a sorting scheme of 10 artifacts, using MATLAB to initialize one individual (one chromosome) of GA is:

x=randperm(10);

The effect is as follows:

picture

However, for particle swarm optimization (PSO), sparrow search algorithm (SSA), dung beetle optimization (DBO), etc., they themselves are proposed for continuous optimization problems, so they require further processing during coding. Like GA, a scheduling plan (workpiece sequencing) represents an individual, and the SPV rule can be used to convert the real number encoding into an integer encoding. For example, for a sorting scheme of 10 artifacts, using MATLAB to initialize an individual (one chromosome) of DBO is:

jobNum=10; % 工件数x=unifrnd(0,1,[1 jobNum]); % 产生10个[0,1]之间随机数os = 1:1:jobNum; % 产生从1到10的数列[~, up_index] = sort(x); % 对x进行降序排序, 得到位置序列x = os(up_index); % 按照位置序列排序工件, 得到一个调度方案

The effect is as follows:

picture

In addition, contrary to the SPV rule, Li et al. proposed the largest rank value (LRV) method, which is also one of the commonly used methods to map continuous values ​​into discrete arrangements. As shown in Figure 2, LRV generates a set of artifact rankings by arranging a set of continuous values ​​representing population individuals in descending order. (Reference: [2] LI X, YIN M. An opposition-based differential evolution algorithm for permutation flow shop scheduling based on diversity measure [J]. Advances in Engineering Software, 2013, 55(8): 10-31.)

picture

Figure 2 Representation method of maximum ranking value method

05Numerical
experiment

Here, a simple test is conducted on the effect of DBO in solving NWFSP, and Rec (21) is selected as a scheduling problem example. The maximum number of iterations T is set to 2000, and the population size NP is set to 60. The results shown below are the results obtained by running the algorithm randomly once.

First, take Rec05 (20 workpieces × 5 machines) as an example to show the solution results of DBO running once randomly. Figure 3 plots the optimal fitness convergence curve and average fitness convergence curve of the population for each generation:

picture

Figure 3 Convergence curve of DBO-NWFSP for Rec05

Figure 4 plots the Gantt chart of the scheduling results:

picture

Figure 4 Gantt chart of DBO-NWFSP for Rec05

Secondly, taking Rec11 (20 workpieces × 10 machines) as an example, the solution results of DBO running once randomly are shown, as shown in Figures 5 and 6.

picture

Figure 5 Convergence curve of DBO-NWFSP for Rec11

picture

Figure 6 Gantt chart of DBO-NWFSP for Rec11

Finally, taking Rec41 (75 workpieces × 20 machines) as an example, the solution results of DBO running once randomly are shown, as shown in Figures 7 and 8.

picture

Figure 7 Convergence curve of DBO-NWFSP for Rec41

picture

Figure 8 Gantt chart of DBO-NWFSP for Rec41

06
MATLAB code

The MATLAB code of intelligent algorithms (GA, PSO, DE, GWO, SSA, DBO, etc.) to solve the no-wait flow-shop scheduling problem (NWFSP), where: main.m is the main function, run directly That’s it; the .m algorithm code is named after the abbreviation of the algorithm; gantt_chart.m is used to draw the Gantt chart; objective.m is the objective function, which is to calculate Makespan; method.pdf is used to explain the calculation method of Makespan, and the code uses the calculation Method for starting time difference between adjacent workpieces; Car.xlsx and Rec.xlsx are two classic test sets for flow shop scheduling.

The output results include Makespan, workpiece sorting, calculation time, optimal fitness convergence curve, average fitness convergence curve, and Gantt chart.

Ten algorithms are selected here to solve NWFSP. Mainly several classic algorithms and several highly cited algorithms in recent years. The corresponding MATLAB code link is as follows:

Genetic algorithm (GA) solves NWFSP Follow the public account, there are links
Differential evolution (DE) solves NWFSP Follow the public account, there are links
Particle Swarm Optimization (PSO) solves NWFSP Follow the public account, there are links
Gray Wolf Optimization (GWO) solves NWFSP Follow the public account, there are links
Whale Optimization Algorithm (WOA) solves NWFSP Follow the public account, there are links
Harris Hawk Optimization (HHO) solves NWFSP Follow the public account, there are links
Sparrow Search Algorithm (SSA) solves NWFSP Follow the public account, there are links
African Vulture Optimization Algorithm (AVOA) solves NWFSP Follow the public account, there are links
Dung beetle optimization (DBO) solves NWFSP Follow the public account, there are links
Star Crow Optimization Algorithm (NOA) solves NWFSP Follow the public account, there are links
The above ten intelligent optimization algorithms (GA, DE, PSO, GWO, WOA, HHO, SSA, AVOA, DBO, NOA) solve the NWFSP family bucket Follow the public account, there are links

You can download the code list through the link below, find the required algorithm code in it, and then go to the corresponding link to obtain it. The list will be updated simultaneously, and once new code is available, it can be found in the list. Some of the codes in the list are obtained from open source. Available for free download at any time.

Link: https://pan.baidu.com/s/1SFDMplrL7tiqGZlrpOSGYg

Extraction code: 8023

In addition, you are welcome to join the algorithm communication group for communication: 912369858

Guess you like

Origin blog.csdn.net/jieyanping/article/details/135188414