• Aucun résultat trouvé

Proposed QDEA for permutative scheduling problem

Dans le document EVOLUTIONARY ALGORITHMS (Page 126-131)

Tianmin Zheng 1 and Mitsuo Yamashiro 2

4. Proposed QDEA for permutative scheduling problem

In this section, based on the algorithm framework proposed above, we will implement each part shown in Figure 2 and give the description of proposed QDEA in detail.

4.1 The implement of the QDEA

4.1.1 The initialization of the population

According to the principles of the basic QEA, each Q-bit has two probability amplitudes, so the quantum chromosome consists of two strings of probability amplitude shown in equation 6. In this study, we suppose the quantum chromosome to be represented as:

Quantum-Inspired Differential Evolutionary Algorithm for Permutative Scheduling Problems 115

q = [θ1 θ2 … θn] (10)

where θi is the quantum rotating angle with the range of [0, π / 2]. We operate on the rotating angle and update it with the updating operation. In the decoding process, the solutions are converted according to the observation method proposed below.

Equation 6 has been adopted to solve the PFSP by Wang, et al. (2005a, 2005b), the stochastic FSP by Gu, et al. (2008) and hybrid FSP by Niu, et al. (2009). Although it is easy to understand and has been widely adopted for dealing with other problems, however, this kind of encoding scheme is not quite effective for the updating operation practiced by the quantum gate. Since the updating operation is the key of the QEA and the essence of the updating procedure is to influence the probability amplitude by changing the value of rotating angle, so we can directly practice on the quantum chromosomes represented in rotating angle. This provides a more effective way to deal with the Q-bits. Also, we can simplify the operations performed on the quantum chromosomes by using only one variable. Therefore, we consider that using the rotation angle to encode the quantum chromosome outperforms that of probability amplitude.

4.1.2 Differential evolution for updating

The differential evolution (DE) is a kind of population based stochastic optimization algorithm proposed by Storn and Price (1997, 1999), and also it’s a kind of evolutionary algorithm which is similar to genetic algorithm. The DE adopts the real number encoding scheme, mutation, crossover and selection operation based on differential vectors and has excellent ability of overall search ability.

As with all other evolution based optimization algorithms, DE works with a population of solutions, not with a single solution for the optimization problem. Population x of generation g contains n solution vectors called individuals of the population and each vector represents potential solution for the problem. The population is often initialized by seeding it with random values within the given boundary constraints.

Suppose the population Qg = [q1,g, q2,g,…, qn,g] (n is the population scale, g is the current evolutionary generation), individual qi,g = [θi,1,g, θi,2,g,…, θi,m,g] (m is the dimension of the problem, i[1, n]). Suppose vi,g+1 is the corresponding individual obtained by practicing the mutation operator on individual qi,g, and one type of mutation operators works as:

vi,g+1 = qr1,g + F(qr2,g − qr3,g) (11)

where 1r , 2r , 3r ∈[1, n] and 1rr2≠r3≠ i; qr1,g is called father basic vector, (qr2,g − qr3,g) is called father differential vector; F is a real number and constant factor which controls the amplification of the differential variation.

In order to increase the diversity of the parameter vectors, we also use the ui,j,g+1 (j[1, m]) vector which is obtained by practicing kinds of crossover operation between qi,g and mutative individual vi,g+1 obtained by equation 11. The bin crossover we will use in this study is showed in equation 12:

, , 1

where CR is the crossover factor and Jrnd is chosen randomly from the interval [1, m].

We adopt the differential operation to perform the updating of the quantum chromosomes which is an innovation in this study. Since the quantum chromosomes are encoded in quantum angle, so the differential operations are directly practiced on the quantum angle and can provide the updating with excellent overall search ability and diversity.

4.1.3 The representation of permutation-based solution

For the decoding process of the quantum chromosome, since the solution to permutative scheduling problems is the order of all the elements (jobs for FSP, operations for JSP), therefore, we should convert the quantum chromosome encoded in rotating angle to job or operation sequences. In the decoding scheme adopted by Wang, et al. (2005a, 2005b) and Gu, et al. (2008), the representation needs several conversions (Q-bit chromosome → binary chromosome → decimal chromosome → job order) and the computation is complicated when the problem scale becomes larger. We put forward a simple but efficient strategy for conversion, which is also an innovation in this study.

Initialization

1. Obtain quantum chromosome qi = [θi,1, θi,2,…,θi,n] from the Q-bit based population; Calculate tempi = [cosθi,1,cosθi,2,…,cosθi, n] and initiate two arrays first() and last().

Convertion

2. Generate a random number η between [0,1] and compare it with cosθi,e where e

∈[1, n]. If cosθi,e > η, put e into first() , else put e into last(). Repeat until all Q-bits in qi

are operated.

3. Combine these two arrays first() and last() to one array permutation(), the element in permutation() is the permutative sequence for solution.

FSP representation

4. For PFSP, permutation() is the final solution.

JSP representation

5. For JSP, get a element p from permutation() and perform the code(i) = mod(p, m) + 1, where the "mod" is an operator of calculating the reminder p being divided by m and m is the machine number. Repeat until all p in permutation() are operated. The code() is the solution for JSP.

Fig. 3. The procedure of converting mechanism for solution representation

For the solution reprentation of permutative problems, we define the rotating angles of element 1,2,…n are [θ1, θ2,…,θn], that the probability amplitude of element i is [cosθi, sinθi], then determine the permutative sequence according to the steps shown in Figure 3.

An example of JSP (suppose machine constrains to be [2-1; 1-2; 2-1] for 3 jobs) for converting mechanism is shown in Figure 4. For example, we have qi = [0.87, 0.68, 0.15, 0.42, 1.38, 1.09], so the tempi = [0.64, 0.77, 0.98, 0.91, 0.18, 0.46]. Then generate η as 0.76 which is larger than cosθi,1, so we put ‘1’ into last(). We continue generate η as 0.37 which is smaller than cosθi,2, so we put ‘2’ into first(). After we operated on all 6 Q-bits, we have first() = [2 3 6] and last() = [1 4 5]. By combining these two arrays, we have permutation() = [2 3 6 1 4 5]. By applying the mod(p, m) + 1 operation, the JSP code becomes [3 1 1 2 3 2]. So each job number occurs m

Quantum-Inspired Differential Evolutionary Algorithm for Permutative Scheduling Problems 117 times in the chromosome, and by reading the array code() from 1 to n×m, the i-th occurrence of a job number refers to the i-th operation in the technological sequence of this job. Through the operation-based representation, any permutation can be decoded to a feasible schedule for JSP. In Figure 4, by scanning the elements in the job shop code, we can get the final schedule of {O312, O112 , O121, O211, O321, O221}, where Oijk means the j-th operation of job i is processed on the machine k.

Q-bits | 0.87 | 0.69 | 0.16 | 0.42 | 1.39 | 1.09 Permutation | 2 | 3 | 6 | 1 | 5 | 4 JSP Code | 3 | 1 | 1 | 2 | 3 | 2

Schedule | O312 | O112 | O121 | O211 | O321 | O221

Fig. 4. The example of converting mechanism for JSP

Here, suppose we have a scheduling problem with the scale of 30 jobs and 10 machines and we can make a comparison like this way: for PFSP, since 24<30<25, so the length of the quantum chromosome should be 30×5 = 150 at least by the method proposed by Wang, et al.

(2005a, 2005b) and Gu, et al. (2008), and three conversions are needed to get the final solution. While, by our method, we just need a quantum chromosome with length of 30 and practice the conversion only once; for JSP, since the solution is the operation sequence, so the length of the quantum chromosome should be 30×10×5 = 1500 for these approaches, and five conversions are needed to get the operation. While, by our method, we just need a quantum chromosome with length of 300 and practice the conversion only three times.

Thus, the representation of the solution we proposed simplifies the decoding procedure for the quantum chromsomes greatly and can provide a more effective way to deal with permutative scheduling problems.

4.1.4 Hybrid QDEA with local search scheme

By adopting the proposed converting mechanism, the Q-bits based population can be converted to permutative-based solution for scheduling effectively, so various types of neighborhood based search can be easily embedded to develop effective hybrid algorithms.

For the permutative-based optimization problems, the Insert, Interchange, Swap, 2-opt and Or-opt neighborhoods are often adOr-opted. According to the analysis from Schiavinotto and Stützle (2007), for the permutative-based search landscape, using Insert at most n-1 times, one solution can transit to any other solution. Compared with other commonly used neighborhoods, the diameter of Insert is one of the shortest ones, so here we adopt the following local search scheme based on Insert neighborhood to perform thorough exploitation in the promising permutation-based solutions.

We obtain the global best chromosome Best_g and suppose n to be the element (job for PFSP and operation for JSP) number for a special problem. The pseudo code of the local search adopted is given as follows:

Initialization

1. Initialize counter t = 0, calculating makespan of Best_g as M(Best_g).

Perform the search

2. Remove. Generate i randomly and remove i-th job in Best_g and obtain a partial sequence temp.

3. Insert. Insert the removed job into the best position j(j ≠ i) in temp and calculate M(Best_g).

Stopping condition check

4. If M(temp) > M(Best_g) and t < n1/2,then t ← t + 1 and go to step 2.

Update

5. If M(temp) < M(Best_g), update Best_g = temp.

Fig. 5. The procedure of local search

Through the local search by using Insert neighborhood, we can obtain two job sequences stand for the one before the operation and the one after the operation, the better one is saved for the next generation iteration. It is should be noticed that the local search is directly applied on the job permutation, not on the quantum chromosomes. So after the whole local search completes, the corresponding Q-bit chromosome should be repaired since this quantum chromosome will be used to perform the next updating by DE and should match the permutation results obtained by the local search. The repair operation is simple since we just need to exchange the corresponding position of the Q-bits.

element 1 2 3 4 5 6

qi 0.87 0.69 0.16 0.42 1.39 1.09

pi 2 3 6 1 4 5

qi, 0.87 1.09 0.16 0.42 1.39 0.69

pi, 2 5 6 1 4 3

Table 1. An example of repair for local search

For example, before the local search, the Q-bit chromosome qi and corresponding element permutation pi obtained by conversion are shown in Table 1. After the local search, the element permutation pi, becomes [2 5 6 1 4 3] in which the ‘3’ and ‘5’ change the 2-th and 6-th position according to the Insert neighborhood, so we make the repair by changing the corresponding 2-th and 6-th Q-bits in qi and obtain the qi,= [0.87, 1.09, 0.16, 0.42, 1.39, 0.69].

The qi, will be adopted to perform the updating by DE strategy in the next iteration.

4.2 The main procedure of QDEA

To implement the common algorithm framework introduced in section 3.2, we adopt the DE strategy to perform the updating of quantum gate and introduce an effective converting mechanism for representing the permutative solution. In this way, we propose the QDEA for PFSP and JSP. Also, we develop the hybrid QDEA (HQDEA) by embedding the local search scheme to perform the neighborhood based search. The main procedure of QDEA (along with HQDEA) is as follows:

Quantum-Inspired Differential Evolutionary Algorithm for Permutative Scheduling Problems 119

Initialize control parameters

1. Set the value of control parameters for DE and the lower and upper of angle for the QEA. Set maximum evolution generation iter and initialize iteration counter t

= 0.

Initialize the population

2. Determine initial population Pop0 = [chrom0,1, chrom0,2,..., chrom0,n], where chrom 0,i = [θ0,1, θ0,2,..., θ0,m], n is the population scale, m is the number of jobs and θ0,j∈[0, π / 2].

In this step, the initial quantum chromosomes are generated randomly.

Make the solution

3. Adopt the converting mechanism to make the solution for permutation-based problem from the Q-bits based population.

Evaluate the population

4. Obtain objective values by evaluating Pop0, store the best one into Best0; store the best individual into Best_θ and best element sequence into Best_g. In this step, we perform the evaluation operation based on element sequence and get the objective values by calculating the permutative solution.

Perform the evolution

5. Update the Popt-1 to Popt by using PSO strategy. In order to provide the search with excellent diversity and guarantees the normalization of Q-bits, we need to make sure that the individuals in Popt should be in the range between the lower(0) and upper(0.5π), so if any individual is out of this range, it should be revised by using θt = lower + rand × (upper − lower).

6. Adopt the converting mechanism to make the solution for permutation-based problem from the Q-bits based population.

7. Evaluate Popt and get objective values, compare with the corresponding solution in Bestt-1 and store the better one to Bestt. Update the Best_θ and Best_g.

8. Practice the local search operations on Best_g by using the Insert operator and make the repair of the Q-bit chromosomes.

Stopping condition check

9. If the stopping condition t > iter is met or the optimum is found, output the optimum; else t ← t + 1 and go to step 5.

Fig. 6. The main procedure of proposed QDEA

When perform the evolution, the updating of PSO is practiced on the quantum chromosome encoded in rotating angle and the local search is practiced on permutative element sequence, respectively. It should be noticed that for the updating performed by the PSO, we first need to save the Best_θ as θ_gbest along with the vt and θ_pbestt for each Q-bit before we perform the updating next time.

Dans le document EVOLUTIONARY ALGORITHMS (Page 126-131)