Abstract
This article proposes a competitive co-evolutionary quantum genetic algorithm for the no-wait flow shop scheduling problem with the criterion to minimize makespan, which is a renowned NP-hard combinatorial optimization problem. An innovative coding and decoding mechanism is proposed. The mechanism uses square matrix to represent the quantum individual and adapts the quantum rotation gate to update the quantum individual. In the algorithm framework, the store-with-diversity is proposed to maintain the diversity of the population. Moreover, a competitive co-evolution strategy is introduced to enhance the evolutionary pressure and accelerate the convergence. The store-with-diversity and competitive co-evolution are designed to keep a balance between exploration and exploitation. Simulations based on a benchmark set and comparisons with several existing algorithms demonstrate the effectiveness and robustness of the proposed algorithm.
Introduction
The flow shop scheduling problem (FSP) is a renowned complex combinatorial optimization problem with strong practical background and has gained growing research in the past decades. However, in real industrial environment, the no-wait constraint exists when the production requires that each job must be processed from the start to completion with no waiting between or on consecutive machines. 1 The no-wait flow shop scheduling problem (NWFSP) has been found in a host of industrial applications.2,3
With respect to its computational complexity, the NWFSP has been proved to be NP-hard.4,5 On account of its complexity and significance in both theory and application, the NWFSP has aroused much concern of researchers. The relatively earlier work was the heuristics developed by Bonney and Gundry 6 and King and Spachis. 7 In 1990s, Rajendran 8 and Gangadharan and Rajendran 9 proposed heuristics which outperformed the previous ones. As for metaheuristic method, Aldowaisan and Allahverdi 10 presented a genetic algorithm (GA) to minimize makespan, and Schuster and Framinan 11 proposed two metaheuristics, genetic algorithm hybridized with simulated annealing (GASA) and variable neighborhood search (VNS), for the same problem. Then a descending search (DS) method and a tabu search (TS) algorithm were also employed. 12 In recent years, the particle swarm optimization was introduced for the problem and yielded outstanding results.13,14 Besides, the problem was also solved by an improved iterated greedy algorithm, 15 a discrete differential evolution (DDE), 16 and a novel discrete self-organizing migrating algorithm 17 for the makespan minimization. In 2015, Ding et al. 18 proposed a tabu-mechanism improved iterated greedy algorithm for the problem, which is a modification of the iterated greedy algorithm using a tabu-based reconstruction strategy. To minimize total flowtime, Gao et al. 19 put forward an effective discrete harmony search (DHS) algorithm as well as a hybrid harmony search algorithm (HHS) 20 for the NWFSP, but they did not compare these two algorithms. For the same criterion, a new particle swarm optimization hybridizing with a local search method was presented by Akhshabi et al., 21 and several constructive heuristics were shown with impressive performance.22–24
Since Grover’s 25 database search algorithm and Narayanan and Moore’s 26 quantum GA, quantum algorithm has been a fresh research area attracting much attention. Han and Kim 27 proposed quantum-inspired evolutionary algorithm (QEA) which proved to be efficacious for the knapsack problem. Like other evolutionary algorithms, QEA is also characterized by the representation of the individual, the evaluation function, and the population dynamics. However, instead of binary, numeric, or symbolic representation, QEA uses a Q-bit, defined as the smallest unit of information, for the probabilistic representation and a Q-bit individual as a string of Q-bits. Meanwhile, a Q-gate (or quantum gate) is introduced as a variation operator to drive the individuals toward better solutions.
Although the solution representation of the scheduling problem is thoroughly dissimilar to that of knapsack problem, the researchers have devoted great efforts to adapting the QEA for the scheduling problem. Li and Wang 28 presented a hybrid quantum-inspired genetic algorithm (HQGA) for multiobjective flow shop scheduling, and Gu et al. 29 proposed a competitive co-evolutionary quantum genetic algorithm (CCQGA) for stochastic job shop scheduling problem. Some other related research work can be found in Gu et al.30–32
So far, there is little published research work on quantum algorithm solving the NWFSP. This article focuses on presenting an effective quantum-inspired hybrid metaheuristic algorithm for the NWFSP. The main innovation of the proposed algorithm lies in three aspects. First, an original coding and decoding mechanism is presented according to the characteristics of flow shop. Second, QEA and GA are combined concretely in a fresh way to form a new algorithm framework. In this framework, a store strategy, named store-with-diversity, is proposed, and QEA adopts Q-bit representation and GA adopts job permutation representation. Third, a competitive co-evolution is introduced in the algorithm to achieve a balance between exploration and exploitation. Generally, co-evolution can be classified into two categories: cooperative co-evolution and competitive co-evolution. 29 Rosin and Belew 33 conducted some research on competitive co-evolution adopting several interactional species. Due to the competition between individuals of different species, the individuals in each species evolve toward better solutions and the convergence is accelerated.
The remainder of this article is organized as follows: Section “Formulation of the NWFSP” provides the formulation of the NWFSP with makespan criterion. In section “CQGA,” a CQGA for NWFSP is proposed. Section “Simulations and comparisons” presents the computational results and comparisons. Finally, we summarize the contribution and draw some conclusions of this article in section “Conclusion.”
Formulation of the NWFSP
The NWFSP can be described as follows: Given the processing times p(j, k) for job j and machine k, each of n jobs (j = 1, 2,…, n) needs to be sequenced though m machines (k = 1, 2,…, m). The sequence in which the jobs are to be processed is the same for each machine. Each job j has a sequence of m operations (oj1, oj2,…, ojm). To satisfy the no-wait restriction, the completion time of the operation ojk must be equal to the earliest time to start of the operation oj,k + 1 for k = 1, 2,…, m − 1. In other words, there must be no waiting time between the processing of any consecutive operation of each of n jobs. In this article, the makespan criterion is considered, so the problem is then to find a schedule minimizing the maximum completion time, that is, makespan.
Let the job permutation
And the makespan can be calculated in O(mn) time as
Let
To illustrate the scheduling of jobs under the no-wait constraint, a simple example with n = 4 and m = 3 is used. The processing times p(j, k) compose matrix P with list of machines in columns and list of jobs in lines. Suppose that
and the job permutation is

Gantt chart of the example.
CQGA
Since it was proposed recently, QEA has been applied to both functional and combinatorial problems and attracted lots of attention, but there is little published research work about quantum algorithm solving the NWFSP. This section proposes co-evolutionary quantum genetic algorithm (CQGA) and describes each part of it in detail. Before putting forward the framework of CQGA, we introduce an innovative coding and decoding mechanism.
Coding and decoding method
In the previous research by Li and Wang 28 and Gu et al., 29 they applied the qubit representation to the flow shop and job shop scheduling. They obtained binary strings from qubit individuals, decimal strings from binary strings, and job permutation from decimal strings, which was called random-key representation. For example, suppose a binary sting is [1 0 1 | 0 1 1 | 1 1 0], which is obtained from a Q-bit representation by observation, then the decimal string is [5 3 6]. From small to large, the job permutation is gained as [2 1 3]. More details could be found in their research articles.
According to the characteristics of NWFSP with n jobs, we propose that the state of a qubit can be represented as
where
Thus, a qubit individual for NWFSP is defined as a square matrix
where
When it comes to the operation of observation, a job is got from each column of the square matrix and the job permutation can be obtained by rouletee wheel selection from the first to the last. Note that if a job has been selected in the permutation from the hth column of the matrix, then when selecting the (h + 1)th job in the permutation from the (h + 1)th column of the matrix, we can only select the unselected jobs yet. Suppose these jobs are job k1, job k2,…, job kn − h, and therefore, the probabilities corresponding to these jobs to be selected are not simply
For instance, consider a NWFSP with three jobs. Suppose a qubit individual is represented as a square matrix with each elements equal to
CQGA for the NWFSP
The procedure of CQGA for the NWFSP is described in the following:
Step 1: let t = 0 and initialize all the parameters and two quantum populations Q1(t), Q2(t).
Step 2: make P1(t), P2(t) by observation operation of Q1(t), Q2(t), respectively.
Step 3: evaluate P1(t), P2(t).
Step 4: store the solutions from P1(t), P2(t) to B1(t), B2(t), respectively, store b and let hbt = bt.
Step 5: if a stopping condition is satisfied, then output the results; otherwise, continue the following steps.
Step 6: let t = t + 1 and make P1(t), P2(t) by observation operation of Q1(t − 1), Q2(t − 1), respectively.
Step 7: evaluate P1(t), P2(t).
Step 8: update Q1(t − 1), Q2(t − 1) using Q-gate.
Step 9: store-with-diversity in B1(t), B2(t), and store bt, hbt.
Step 10: P1(t), P2(t) are replaced with B1(t), B2(t), respectively.
Step 11: compete between P1(t) and P2(t).
Step 12: selection, crossover and mutation for P1(t), P2(t), respectively.
Step 13: evaluate P1(t), P2(t).
Step 14: store-with-diversity in B1(t), B2(t), and store bt, hbt.
Step 15: perform the migration and go to Step 5.
The overall framework of CQGA is illustrated in Figure 2. It can be seen that CQGA contains two spaces and each space consists of three populations: Q, P, and B, like QEA. The proposed CQGA involving a competitive co-evolution strategy is a hybridization of QEA with GA, and it adopts a coding and decoding mechanism introduced above. Besides, we put forward the store-with-diversity in CQGA. The details of each step are described as follows:
Step 1: initialize: the Gen (iterative generation), Pc (crossover probability), Pm (mutation probability), N (popsize),
Step 2: this step makes permutation solutions in P1(0), P2(0) by observing the states of Q1(0), Q2(0), respectively, and the observation is performed as in the proposed mechanism above. Note:
Step 3: each solution in P1(0), P2(0) is evaluated by calculating the objective value. Given that we are solving the NWFSP, the objective value is obtained according to the formulation in section “Formulation of the NWFSP.”
Step 4: the solutions in P1(0), P2(0) are stored into B1(0), B2(0), respectively, where
Step 5: the stopping condition is t = Gen. The best solution for output is hbt.
Step 6: permutation solutions in P1(t), P2(t) are formed by observing Q1(t − 1), Q2(t − 1), respectively, as in Step 2.
Step 7: evaluate each solution as in Step 3.
Step 8: this step updates qubit individuals by operation of a quantum gate which is modified in accordance with the novel coding and decoding mechanism.

Overall framework of CQGA.
A Q-gate is an important updating method to drive the individuals toward better solutions in quantum evolutionary algorithm. 28 A quantum gate is a reversible gate and can be represented as a unitary operator U satisfying U+U = UU+, where U+ is the hermitian adjoint of U. There are several quantum gates, such as the NOT gate, controlled NOT gate, rotation gate, and Hadamard gate.
Here, a rotation gate is used. To comply with the proposed coding and decoding mechanism, only two numbers may need to be updated in the jth Q-bit
where
Lookup table of
Figure 3 depicts the polar plot of the rotation gate for Q-bit individuals. As illustrated in Table 1, the rotation occurs only when the condition f(p) > f(b) is true and x is not the same as y: if (

Polar plot of rotation gate for Q-bit individuals.
It is clear that unitary operator
which still makes
Step 9: in population B1(t) and B2(t), there may be some individuals with the same permutations. Therefore, store-with-diversity is proposed in the framework of CQGA to maintain the diversity of populations, which is different from the initial store in Step 4. After store-with-diversity, if the best solution in B1(t) and B2(t) is better than the stored bt−1, bt is replaced with the new one, then if bt is better than the stored hbt−1, hbt is replaced with bt.
In store-with-diversity, the generation t is omitted for simplicity. For population P1, we try to store
Step 10: P1(t), P2(t) are replaced with B1(t), B2(t), respectively. This step prepares for the ensuing competition and the genetic operations.
Step 11: the improved competition is held between P1(t) and P2(t). For each individual p in P1(t), all the individuals in P2(t) are its competitors. The value of competition is defined as
It can be seen that c(p) is an integer in the range of [0, N], then the fitness of p is computed as
where r affects the effects of competition.
For each individual in P2(t), all the individuals in P1(t) are its competitors. The competition is performed as above.
Step 12: this step executes the genetic evolution on P1(t) and P2(t), respectively. Here, Rouletee wheel selection based on fitness value, partially mapped crossover (PMX), 34 and mutation operator INSERT 28 is adopted.
Step 13: the same as in Step 7.
Step 14: the same as in Step 9.
Step 15: the migration 26 is performed in each generation. The best in B1(t) is swapped with the best in B2(t), so is the worst.
Simulations and comparisons
All the algorithms involved in this article were programmed in Visual C++ and conducted on an Intel Pentium IV 3.06 GHz PC with 1024 MB memory. To compare the performance of different algorithms, the experiments were conducted using the well-known Taillard 35 benchmark set, which is composed of 120 problem instances, ranging from 20 jobs and five machines to 500 jobs and 20 machines. In our simulations, only the former 90 instances were treated by the compared algorithms for simplicity. The satisfied parameter setting of the CQGA was calibrated, and then we employed the CQGA to solve each instance with replications. The solution quality is evaluated according to the reference makespans. As in Ding et al., 18 the indicator percentage relative deviation (PRD) was adopted to measure the amount of improvement over the reference makespans. Obviously, the smaller PRD is, the better the corresponding solution is. To be specific, PRD is calculated as
where M, Mref are makespan obtained by algorithms in each run and the reference makespan, respectively. The best known solutions provided in Ding et al. 18 are used as reference makespan, as shown in Table 2.
Best known solutions for Taillard benchmark set.
Parameter calibration
This part considers the values of the parameters to make CQGA obtain satisfying results for the NWFSP. For fair comparison, we set CQGA with N = 10 n and the stopping criterion as elapsed CPU time not less than 3 n2m milliseconds. For parameter r, our pilot experiment showed that a value between 600 and 1200 is acceptable, and here we set it to 1000 to get a proper competition pressure. Besides, there are three essential parameters
ANOVA results for the experiment on the parameter calibration.
To show the performance differences of parameter levels more clearly, the one factor means plots with 95% least significant difference (LSD) confidence intervals of the factors

Means plot with 95% LSD intervals for the parameters of the algorithm.
Comparisons of VNS, GASA, hybrid particle swarm optimization, and CQGA
For the NWFSP, the GA 10 and GASA 11 were impressive because they successfully solved the problem in a considerably minor time. Besides, the hybrid particle swarm optimization (HPSO) proposed by Liu et al. 13 also showed its excellent performance. As far as we know, no literature could be found about quantum algorithms for the NWFSP, and in this part, we will compare CQGA with GA, GASA, and HPSO. The computational experiments were based on the 90 Taillard instances, and each algorithm was run for each instance with 30 replications. The stopping criterion was 3 n2m milliseconds CPU time to get an unbiased statistical result. The average percentage relative deviation (APRD) values grouped in subsets of different sizes are summarized in Table 4.
APRD of each algorithm on Taillard benchmark set.
GA: genetic algorithm; GASA: genetic algorithm hybridized with simulated annealing; HPSO: hybrid particle swarm optimization; CQGA: co-evolutionary quantum genetic algorithm.
It should be noted that the compared algorithms were executed in the same running environment and with the stopping criterion, so the results are comparable. We can see from Table 4 that the overall mean PRD value obtained by the CQGA is 2.76, which is substantially lower than that of the HPSO (3.20), that of the GASA (4.13), and that of the HPSO (5.55). The similar priority relation holds when the APRD values of each subset of different sizes are examined.
In order to observe whether the performance differences in the PRD values are indeed statistically significant, we employed the original PRD data points and conducted an ANOVA. To be brief, we only provide the one factor means plots with 95% least significant difference (LSD) confidence intervals of the algorithms in Figure 5. The statistical results indicate that the differences between these algorithms are significant. The GA yields the poorest results while the CQGA is superior to the others. It is worth noting that the HPSO is also a positive algorithm because it achieved excellent results whereas its structure is quite simple.

Means plot with 95% LSD intervals for the compared algorithms.
Conclusion
This article presents an effective and robust quantum-inspired hybrid metaheuristic combining QEA and GA for the NWFSP. According to the characteristics of the problem, an innovative coding and decoding mechanism is presented. In this mechanism, a quantum individual is represented as a square matrix, and a job permutation can thus be simply gained without use of random-key representation. In the framework combining QEA and GA, we put forward the store-with-diversity to maintain the diversity of populations. A competitive co-evolution is introduced in the algorithm to achieve a balance between exploration and exploitation. Simulation results and comparisons based on a set of benchmarks demonstrate the effectiveness and robustness of the proposed algorithm. Our future work lies in two directions. One is to apply quantum-inspired hybrid algorithms to the FSP with no-idle constraint, 36 as well as job shop scheduling problems. The other is to consider more powerful problem-dependent algorithms for the NWFSP and its multiobjective optimization.
Footnotes
Academic Editor: Duc T Pham
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by National Natural Science Foundation of China (Grant No. 61403180), The Project for Introducing Talents of Ludong University (LY2013005), National Natural Science Foundation of China (Grant No. 51407088), National Natural Science Foundation of China (Grant No. 61573144), and The Project of Shandong Province Higher Educational Science and Technology Program (Grant No. J14LN20).
