Flexible Job Shop Scheduling Problem Using an Improved Ant Colony Optimization

As an extension of the classical job shop scheduling problem, the flexible job shop scheduling problem (FJSP) plays an important role in real production systems. In FJSP, an operation is allowed to be processed on more than one alternative machine. It has been proven to be a strongly NP-hard problem. Ant colony optimization (ACO) has been proven to be an efficient approach for dealing with FJSP. However, the basic ACO has two main disadvantages including low computational efficiency and local optimum. In order to overcome these two disadvantages, an improved ant colony optimization (IACO) is proposed to optimize the makespan for FJSP.The following aspects are done on our improved ant colony optimization algorithm: selectmachine rule problems, initialize uniform distributed mechanism for ants, change pheromone’s guiding mechanism, select node method, and update pheromone’s mechanism. An actual production instance and two sets of well-known benchmark instances are tested and comparisons with some other approaches verify the effectiveness of the proposed IACO. The results reveal that our proposed IACO can provide better solution in a reasonable computational time.


Introduction
Scheduling problem plays a very important role in many industrial systems [1].Therefore it has attracted considerable researches for recent decades [2][3][4][5][6][7].Job shop scheduling problem (JSP) is a branch of production scheduling and combinatorial optimization problems [8].The flexible job shop scheduling problem (FJSP) is an extension of the job shop scheduling problem (JSP) [9].Different from JSP, an operation can be processed on more than one candidate machines in FJSP.As a result, two subproblems facing FJSP are machine assignment and operation sequencing.Machine assignment is how to assign a machine for each operation while operation sequencing is how to schedule all operations on machines to optimize the given performance indicators [10].Thus, FJSP is more complicated than the classical JSP and it has been proven to be a strongly NP-hard in 1993 [11].
Among these metaheuristics, ACO has been proved to be an efficient approach for dealing with JSPs [21][22][23].However, this approach still has some limitations in practice: (1) a lot of computational time will be spent on obtaining the ideal solution.(2) The search usually falls into local optimal solution.Therefore, in order to overcome these limitations, numerous improved ACO algorithms or hybrid ACO algorithms have been developed.A knowledge-based ACO approach for solving flexible job shop scheduling problems is proposed in [19].An improved ACO was proposed to deal with dynamic hybrid flow shop scheduling in [24].A modified ACO called two-pheromone ant colony optimization was proposed for solving flexible job shop scheduling problem with due window in [25].Ant colony optimization combined with tabu search was employed to deal with JSP in [26].Two-generation Pareto ant colony algorithm was proposed by Zhao et al. for solving multiobjective job shop scheduling problem [27].A two-stage ant colony optimization was presented to minimize 2 Scientific Programming the makespan in [28].Leung et al. [29] proposed an agentbased ant colony optimization for solving integrated process planning and scheduling problem.
Great efforts have been done for solving job shop scheduling problems or flexible job shop scheduling problems by improving ACO algorithms; however, these improved ACO algorithms are almost achieved by changing pheromone update mechanism.Although this can improve the search speed and solution efficiency, excessively strengthening the pheromone feedback of the best path may easily lead to premature convergence.Therefore, in order to solve these problems that exist in the basic ACO or improved ACO algorithms mentioned above, we propose an improved ant colony optimization (IACO) to solve the FJSP in this paper and the results are found to be closer or equal to the global optimum.
The remainder of this paper is organized as follows.Section 2 describes the model formulation for FJSP.The proposed IACO is introduced in Section 3. Experimental test, comparison, and discussion are reported in Section 4. The conclusions and future work are given in Section 5.

Description of FJSP
The  ×  FJSP can be depicted as follows [30]: there are  jobs and  machines.Each job  comprises   operations { 1 ,  2 ,  3 , . . .,    }.Each operation   can be processed by only one machine from the candidate machine set   .The assumptions for FJSP are as follows: (1) Each machine can be used at time zero.
(2) Each job can be processed at time zero.
(3) Each machine can process only one operation at a time.
(4) Once an operation starts on a machine, it cannot be interrupted.
(5) The sequences of operations for all jobs are prespecified.
(6) Neither due dates nor release times are specified.(7) The transportation times among machines are not considered.
(8) All machines are not always identical.
The objective is to minimize the makespan and the mathematical model of the FJSP is shown as follows [31]: where , ℎ is the job index, , ℎ =  2) and (3) are the operation sequence constraint.Equation (4) indicates that each operation can only be processed on one machine from machine set at a time.Equations ( 5) and ( 6) are decision variables which are 0-1 binary variable and nonnegative, respectively.

Improved Ant Colony
Optimization for FJSP

Principles of Ant Colony Optimization.
As social insects, ants live in colonies and their behavior is governed by the goal of colony survival rather than being focused on the survival of individuals.The main idea of the ACO is inspired by the behavior of real ants searching for food.The real ants can communicate with each other about food sources through pheromone.When the real ants move along, they release pheromone on the path they have passed.Other ants are attracted to follow them by observing the pheromone trail.

Start dummy operation
End dummy operation Therefore, the path is enhanced and thus attracts more ants [32,33].Compared with some other heuristics, the ACO is characterized by distributed computation and positive feedback [34].
If the operations are looked at as ants, it can be seen easily that there exist lots of similarities between an ant colony's foraging process and FJSP.Operations must search for proper machine to process them.Like ants, they want to search for the shortest path.Ants' nest and food source are similar with start and end dummy operation, respectively.If we look at an operation as an ant's path for foraging food, then the relation of any two operations can be looked at as an alternative path, and different processing time of all the operations on the machine just like different length of paths.
The disjunctive graph of an FJSP example can be described in Figure 1.There are three jobs and each job has three operations.J1-1, J1-2, and J1-3 represent three operations of job 1. J2-1, J2-2, and J2-3 represent three operations of job 2. J3-1, J3-2, and J3-3 represent three operations of job 3.Each job must comply with the process sequence constraints.According to the constraints of process sequence and machine occupancy, ants travel total nine operations of the three jobs and search for the operation order on each machine and then gain the optimal or near-optimal solution for the flexible job shop scheduling problem.Therefore it is feasible to use ACO to solve the flexible job shop scheduling problems.
The key steps of the basic ACO are the calculations of transition probability, visibility, and pheromone amount.The nodes or goal point are chosen by ants according to pheromone amount and visibility [35].At time t, the probability for ant  choosing the path from point  to  is calculated as follows: where the allowed  is selectable machines group that ant  can choose and  and  are the pheromone and expectation factor, respectively.  () is heuristic factor and it is computed as   () = 1/().The more pheromone value on the path is and the higher visibility is and the bigger probability for choosing this path is.
As time goes on, the pheromone of the path evaporates gradually.An ant will modify the pheromone value on the passed edges by applying the local updating rule, as follows: where  is the evaporation coefficient of pheromone and 0 <  < 1.  0 is the initial value of pheromone on each path.Once all ants have arrived at their destination, the value of pheromone on the edge is modified again by applying the global updating rule, as follows: where Δ   () is the quantity of pheromone on the path (, ) laid by ant , and it can be defined as follows: In (10),  is a constant and it denotes the strength of pheromone; ()  is evaluation value of the th ant after finishing the search task.
As mentioned above, the basic ACO still has some weaknesses in practice.For example, the search usually gets trapped in local optimal solution.Meanwhile it needs a lot of computational time to obtain the ideal solution.Therefore, we propose an improved ant colony optimization to solve the FJSP in this paper.

Improved Aspects on Ant Colony Optimization Algorithm.
The following improvements are done for machine selection: the machine which has the shortest processing time for finishing the jth operation of job  is selected by using 60% probability; the machine which has the shortest time for processing the jth operation of job  is selected by using 30% probability; the machine is randomly selected by using 10% probability, and the random selection can be achieved by using roulette selection method.The range for selecting machine can be expanded by using these three kinds of selection method.Take Figure 2, for instance,  1 <  2 <  3 ; therefore  1 is selected with a 60% probability,  2 is selected with a 30% probability, and one machine among  1 ,  2 , and  3 is randomly selected with a 10% probability.Time (C) One machine is randomly selected with a 10% probability.The main steps of the basic ACO are the initialization position of ants, the calculation of transition probability, visibility, and pheromone value, as mentioned in Section 3.1.
When some other control parameters remain unchangeable, the initial position of the ants has a greater influence on the ACO.The ants should be distributed uniformly on the set which contains the first operations of all jobs, and the probability for searching for the global ideal solution will become much greater.If a large number of ants search for food from the same starting point, the solution diversity may be lost.Therefore, an initialization mechanism is used to distribute uniformly the ants' initial positions.
In the initial search stage, some paths are passed by ants, and some other paths are not passed.If an ant searches for path according to the pheromone's guiding mechanism, it is easy to reduce the probability for selecting the path that has not been passed yet, and therefore the chance for ants to find the global ideal solution will be reduced.So when the pheromone exceeds a certain value, the ants are allowed to find the optimal path according to pheromone's guiding mechanism, as follows: where  0 is the initial value of pheromone on each path and   () is pheromone value between node  and  (path  → ) at time .
In order to expand the search scope of the ants and improve the search space of the basic ACO, initializing pheromone needs to be done when the pheromone value on a path is more than 90% of the total pheromone value on all paths (shown in (12)) because the ACO has fallen into local optimum in this case.
() ≥ 0.9 *  Sum () , where  Sum () is the total pheromone value on all paths.However, the next available path selected by employing the transition probability does not always obtain the optimal direction for the basic ACO, and the pheromone deviated from the ideal solution has the potential to be enhanced, which will easily lead to the local optimal solution.
After the transition probability for each candidate is obtained, if the roulette selection method is adopted, not only the path with a large transition probability is likely to be selected, but also the path with a small transition probability has the opportunity to be selected; thereby the search space and solution quality can be expanded and improved, respectively.
Therefore, a new node selection method, combining prior knowledge, probability search, and random search, is proposed in this paper.When the search is trapped in local optimal solution, the solution space can be further searched by adjusting the pheromone and increasing the random selection probabilities.
where  is a random value and 0 ≤  < 1;  0 is the degree of prior knowledge;  1 is the lower bound level of random search;   () represents the appearing number of arc (, ) during previous iterations for searching good solution.The more the arc (i, j) appears, the more the role is played for searching good solution by using positive feedback.
A good balance relation between "using the past information to speed up the convergence" and "exploring new paths" can be established by combining these three selection methods.By this way, the search space can be enlarged and the global good solution can be obtained with a larger probability.
In addition, a concept of the invalid search number is defined, which means the difference between the current number of iterations  1 and the recent number of iterations  2 for improving the solution, as shown in (14).When the number of the invalid search exceeds a specified value  0 , the algorithm is considered as a local optimum, as shown in (15).
Meanwhile, the maximum or minimum pheromone trails may lead to premature convergence for searching solution.
Therefore, the maximal pheromone trail  max and the minimal pheromone trail  min are given in our IACO in order to make all pheromone trails   () satisfy  min ≤   () ≤  max .This idea is inspired by the Max-Min ant system [36].
When the number of the invalid searches exceeds a specified value  0 , the pheromone on the path is forcedly destroyed in order to avoid falling into the local optimum.In this paper, the value is reduced to sixty percent of the original pheromone   (), as follows: Eq. (9) otherwise. (16)

3.3.
Steps of the IACO.The specific implementation steps of the proposed IACO for solving FJSP are shown as follows.
Step 2. Initialize the ants' initial positions by using uniform distribution mechanism.
Step 3. Select machine by using our proposed machine selection strategy.
Step 4. Establish three sets: one set  1 contains operations that have been already visited by ants.One set  2 contains operations for next candidates.Another set  3 contains operations that are waiting to be added to the candidate set.And add the first operation of each job to the set of next candidate operation waiting to be selected.
Step 5. Judge whether the pheromone   () on the path is greater or equal to 1.1 *  0 or not.If not, then select next operation in a random manner.If so, then select the next path according to (13).After the transition probability for each candidate is obtained, the roulette selection method is adopted to select the next path or node.
Step 6. Add the just selected operation to set  1 and remove the just selected operation from set  1 .Meanwhile, add the next operation to set  2 and remove the next operation from set  3 .
Step 7. Judge whether there are subsequent operations or not.If there are subsequent operations, then go to Step 5. Otherwise go to Step 8.
Step 8. Calculate the good solution of this iteration and save.
Step 9. Find the best ant and update its global pheromone.
Step 10.Calculate the pheromone value on each path and limit the pheromone value on each path within the range of two values  max and  min .Meanwhile, judge whether   () is not less than 0.9 *  Sum ().If so, initialize the pheromone value of that path.
Step 11.Judge whether  is more than  0 or not.If it is satisfied, then forcedly destroy the pheromone value of that path according to (16).
Step 12. End the algorithm either when the optimal or nearoptimal solution is found or when a maximal iteration is satisfied and then output the global optimal or near-optimal solution.Otherwise go to Step 2.
The framework of our IACO is shown in Figure 3.

Experimental Results
To test the performance of the proposed IACO, two groups of simulation experiments are executed.One group of experiments comes from an actual production instance, and the other group of experiments comes from benchmark problems.

Test on the Actual Production Instance.
Table 1 shows the process information from an actual production instance.The value in Table 1 represents processing time on each machine and "-" means the operation cannot be processed on that machine.
The parameters and their values, which are used for running our IACO, are shown as follows: number of ants  = 39, weight of pheromone trail  = 1, weight of heuristic information  = 2, pheromone evaporation parameter  = 0.1, the initial value of pheromone value  0 = 0.1, constant for pheromone updating  = 120, premature constant  0 = 20,  max = 10,  min = 0.01, the value of prior knowledge  0 = 0.3, the lower bound value of random search  1 = 0.8, and number of iterations  = 100.
The Gantt charts obtained by our IACO, the basic ACO, and Max-Min Ant System (MMAS) are shown in Figures 4,  5, and 6.In addition, Figure 7 depicts the convergence curves of the best makespan by using our IACO, the basic ACO, and MMAS.To such an instance, from Figure 7, it can be seen that our IACO obtains the ideal makespan ( 25) with 8 iterations.The basic ACO only obtains the ideal makespan (28) and it needs 28 iterations.Though the MMAS can obtain the ideal makespan (25), however, it needs as many as 61 iterations.Therefore, our proposed IACO is very efficient for solving FJSP.
In order to prove the solving solution quality and solving efficiency of our IACO, Table 2 shows the experimental results of the proposed IACO in comparison to the basic ACO and MMAS by 10 independent experiments.The best solution, the average solution, the worst solution, and the average computing time of our proposed IACO are the best among the compared methods.The results demonstrate that the proposed IACO is effective and efficient in solving FJSP.Kacem et al. [37]: (1) Partial FJSP (P-FJSP) which means that each operation can be processed by a subset of machines and (2) Total FJSP (T-FJSP) which means that each operation can be processed by all machines.Firstly, one 8 × 8 P-FJSP and one 10 × 10 T-FJSP from benchmark instances are applied to evaluate the performance of our proposed IACO.

Test on Kacem Benchmark Instances. FJSP was classified into two categories by
The Gantt chart and the convergence curve for 8 × 8 benchmark P-FJSP obtained by our IACO are shown in Figures 8 and 9, respectively.The Gantt chart and the convergence curve for 10 × 10 benchmark T-FJSP obtained by our IACO are shown in Figures 10 and 11, respectively.To such an instance, from Figure 8-11, it can be seen that our IACO can easily obtain the best makespan with very few iterations.
Table 3 shows the best results of all these several methods, where  * is the best value found so far.
From Table 3, it can be concluded that the proposed IACO is not worse than other algorithms, even better than several improved algorithms.Meanwhile, the proposed IACO can almost obtain the best values for the five benchmark problems for every independent test.In addition, the running time (RT) of the proposed IACO is very short; for instance, it can find the best solution for the 10 × 10 T-FJSP in the second iteration within 5 s.
Table 4 illustrates the comparison of the best value and the average value between IACO and those from literatures (BEDA [39]; PBABC [40]; EA [41]; and EQEA [9]) on the Kacem benchmark instances [37].For each instance, all algorithms are run for 10 times independently.From Table 4, it can be seen easily that the best value can be obtained by these algorithms with a 100% success rate.Therefore, our IACO is very effective and robust.
As for the best makespans, from Table 5, it can be seen that with the best results obtained our IACO is equal or smaller than that of other algorithms for dealing with almost all ten BRdata instances.Our IACO outperforms GA [40] in three out of the ten BRdata instances, outperforms KBACO [19] in six out of the ten BRdata instances, outperforms LEGA [39] in seven out of the ten BRdata instances, outperforms TSPCB [13] in four out of the ten BRdata instances, and is almost as good as PVNS [38] for the ten BRdata instances.Therefore, it is concluded that our IACO has more powerful optimizing ability in dealing with flexible job shop scheduling problem.

Conclusions
In this paper, an efficient IACO is proposed for FJSP in order to minimize makespan.Experimental results on an actual production instance and two sets of well-known benchmark FJSP Instances indicate that our proposed IACO is competitive to other algorithms.The results demonstrate that the proposed IACO is effective and efficient in dealing with FJSP.
Our future work still needs to be done from the following aspects: (1) multiobjective flexible job shop scheduling problem especially related to the fuzzy due date and energy consumption need to be considered.(2) Dynamic scheduling for FJSP is another research direction, because in real manufacturing systems, unpredictable events, such as machine breakdown and new job arrivals and so on, often happen.

Figure 3 :
Figure 3: The flowchart of the proposed IACO.

9 Figure 4 :Figure 5 :
Figure 4: Gantt chart for the actual production instance obtained by IACO.

9 Figure 6 :Figure 7 :
Figure 6: Gantt chart for the actual production instance obtained by MMAS.

Table 2 :
Comparison of the algorithm performances for the actual production instance.

Table 3 :
Results of the five Kacem benchmark instances.

Table 4 :
Comparison result of the best value and the average value.

Table 5 :
Results of the ten Kacem benchmark instances.