Int J Adv Manuf Technol (2014) 70:1955–1961 DOI 10.1007/s00170-013-5354-6
ORIGINAL ARTICLE
A clustering-based modified variable neighborhood search algorithm for a dynamic job shop scheduling problem Mohammad Amin Adibi & Jamal Shahrabi
Received: 8 October 2011 / Accepted: 26 September 2013 / Published online: 5 November 2013 # Springer-Verlag London 2013
Abstract The dynamic job shop scheduling (DJSS) problem occurs when some real-time events are taken into account in the ordinary job shop scheduling problem. Most researches about the DJSS problem have focused on methods in which the problem’s input data structure and their probable relationship are not considered in the optimization process while some useful information can be extracted from such data. In this paper, the variable neighborhood search (VNS) combined with the k-means algorithm as a modified VNS (MVNS) algorithm is proposed to address the DJSS problem. The kmeans algorithm as a cluster analysis algorithm is used to place similar jobs according to their processing time into the same clusters. Jobs from different clusters are considered to have greater probability to be selected when an adjacent for a solution is made in an optimization process using the MVNS algorithm. To deal with the dynamic nature of the problem, an event-driven policy is also selected. Computational results obtained using the proposed method in comparison with VNS and other common algorithms illustrate better performance in a variety of shop floor conditions. Keywords Dynamic job shop scheduling . Variable neighborhood search . Cluster analysis . K-means algorithm
1 Introduction The job shop scheduling (JSS) problem is an optimization problem in which a schedule of jobs that have known operational sequences and time, in a multi-machine environment, is determined. This is one of the most interesting realms for M. A. Adibi : J. Shahrabi (*) Industrial Engineering and Management Systems Department, Amirkabir University of Technology, Tehran, Iran e-mail:
[email protected]
researchers and practitioners, having attracted extensive investigations both in academic and applied fields. The JSS problem is also a combinatorial optimization problem and well-known to be NP-hard. The dynamic job shop scheduling (DJSS) problem emerges when real-time events such as random job arrivals and machine breakdowns are taken into account in ordinary JSS problems. Most researches in the DJSS problem are about introducing new solving methods or enhance existing methods to improve solution quality only by focusing on the solving method capabilities ignoring input data structure and their probable relationship. Qi et al. [1] proposed a genetic algorithm (GA) approach to address the DJSS problem. Chryssolouris and Subramanian [2] used a scheduling method based on GA for a dynamic job shop with unreliable machines, multiple routes, and multiple scheduling criteria. Dewan and Joshi [3] presented an auction-based distributed scheduling mechanism to address the DJSS problem. Dominic et al. [4] proposed combined dispatching rules for scheduling in a dynamic job shop environment. Yang et al. [5] proposed a layered hybrid algorithm for the DJSS problem that was composed of an improved ant colony optimization (ACO) algorithm to select machines in the outer layer and a GA with neighborhood search to sort jobs in the inner layer. Li and Chen [6] presented a hybrid approach combining the back propagation neural network (BPNN) with GA for solving the problem when machine breakdown and new job arrivals occur. In their research, the BPNN was used to obtain feasible solution during the iterations, and GA is adapted to the global optimal searching. Cunli [7] proposed an assorted dynamic job shop scheduling algorithm based on impact degree. Vinod and Sridharan [8] developed a discrete-event simulation model for a DJSS problem with sequence-dependent setup time. Zhou et al. [9] explored the applicability of the ACO algorithm in DJSS problems comparing the most adopted approaches in the real world. Wang et al. [10] developed an improved hybrid discrete genetic algorithm particle swarm optimization to solve
1956
the JSS and DJSS problem. Fatemi Ghomi and Iranpoor [11] proposed a mixed integer programming mathematical formulation of the DJSS problem and developed a metaheuristic algorithm which is composed of GA and simulated annealing called GA-SA algorithm to solve it. Vinod and Sridharan [12] studied the effects of due-date assignment methods and scheduling rules on the performance of a job shop production system in a dynamic environment. In addition to solving method capabilities to improve, some information in the problem’s input data such as necessary operations for each job, operation processing time, operation sequence, and etc. can be used in the optimization process to enhance solution quality and reduce required processing time. Chang [13] proposed an approach that can be used to provide real-time estimates of the queuing times for the remaining operations of the jobs in a dynamic job shop and to incorporate this estimated queuing time information into existing scheduling heuristics to improve their performance. Aydin and Oztmel [14] used a reinforcement learning agent to select appropriate dispatching rules for scheduling according to the shop floor condition in the real-time job shop. Wei et al. [15] presented an iterative optimization framework for the dynamic scheduling system using reinforcement learning. Wang et al. [16] used the ACO algorithm to minimize make span in job shop scheduling in which the ACO algorithm parameters are updated according to shop floor conditions. Zandieh and Adibi [17] used a trained artificial neural network to update parameters of a metaheuristic method at any rescheduling point in a DJSS problem according to the problem conditions. Chen et al. [18] proposed a rule driven dispatching method based on data envelopment analysis and reinforcement learning for a multi-objective dynamic scheduling problem. Kapanoglo and Alikalfa [19] introduced an unsupervised learning scheduling system that builds “state” and “priority rule” pairs depending on intervals of queue by using a rule-based GA for a DJSS problem. Among all approaches to knowledge extraction, clustering is a data analysis task with numerous applications in a variety of areas including bioinformatics, data mining, information retrieval, information theory, machine learning, object, character and pattern recognition, etc. [20]. Generally, clustering techniques are used to discover natural groups in datasets and to identify abstract structures that might exist without having any background knowledge of the characteristics of the data. In this study, to use both capable solving methods and extracted information from the problem’s input data, variable neighborhood search (VNS) [21] combined by cluster analysis along with an event-driven policy is selected as a scheduling method to obtain an optimum solution (or a near optimum) at any rescheduling point for the DJSS problem. VNS brings together a lot of desirable properties for a metaheuristic such as simplicity, efficiency, effectiveness, generality, etc. that has been widely used for combinatorial
Int J Adv Manuf Technol (2014) 70:1955–1961
optimization problems in recent years [22]. To enhance the efficiency and effectiveness of VNS, cluster analysis on input data at any rescheduling point is performed. As explained in details in Sect. 4, by placing similar jobs according to their operational processing time into the same classes, useless movement in the VNS optimization process can be reduced by preventing similar sequence selections in replacement mechanism. K-means as a popular algorithm in clustering is also used in this paper to identify similar sequences because of its simplicity and low CPU time needs. The rest of the paper is organized as follows: in Sect. 2, the dynamic job shop scheduling problem is defined in details. The k-means clustering analysis technique is described in Sect. 3. The modified variable neighborhood search algorithm is argued in Sect. 4. The simulation study is presented in Sect. 5, and the conclusion is put forth in Sect. 6.
2 Dynamic job shop scheduling problem In the general job shop scheduling problem, n jobs should be processed on m machines, while minimizing a function of completion time of jobs is considered along with the following technological constraints and assumptions [17]: & & & & & &
Each machine can perform only one operation at a time on any job. An operation of a job can be performed by only one machine at a time. Once an operation has begun on a machine, it must not be interrupted. An operation of a job cannot be performed until its preceding operations are completed. There are no alternate routings, i.e., an operation of a job can be performed by only one type of machine. Operation processing time and the number of operable machines are known in advance.
In this paper, mean flow time minimization is selected as an optimization objective. The flow time for the jth job can be defined as f j =c j −r j ;j =1,2,…n., where r j and c j are jth job ready time (time at which a job arrives in the shop floor and is
Fig. 1 Gantt diagram of the solution represented by [2 1 3 2 3 3 1 1 2]
Int J Adv Manuf Technol (2014) 70:1955–1961
1957
Step 1. Randomly choose k cluster center from all pattern in the data set D. Step 2. Assign each pattern in D to the closest cluster center; then update the cluster centers. Step 3. If the new cluster centers and the previous ones are the same, then terminate; otherwise, return to Step 2.
Fig. 2 Steps of the k-means algorithm
equal to 0 in case of ordinary or static JSS problems) and completion time, respectively. Thus, mean flow time is equal to ∑ nj = 1(c j −r j )/n over the manufacturing horizon. The aim of solving a JSS problem is to find a sequence of jobs being processed on each machine so that the objective function is minimized. The operation-based representation method [23] which encodes a schedule (equal to a JSS problem solution) as a sequence of numbers is also selected to present a JSS problem solution. In this method, each number stands for one operation. The specific operation represented by a number is interpreted according to the order of the numbers in the string. Each of the n numbers, representing n jobs, will appear m times spread over the entire string. For instance, consider one time unit for each operation and [1 2 3; 2 3 1; 3 2 1] as a predefined required operation sequence for jobs 1, 2, and 3. We are given a solution like ½ 2 1 3 2 3 3 1 1 2 , where {1, 2, 3} represents {job 1, job 2, job 3}, respectively. Obviously, there are a total of nine operations, but three different integers are repeated three times. The first integer, 2, represents the first operation of the second job, O 21, to be processed first on the corresponding machine. Likewise, the second integer, 1, represents the first operation of the first job, O 11. Thus, the set of ½ 2 1 3 2 3 3 1 1 2 is understood as [O 21, O 11, O 31, O 22, O 32, O 33, O 12, O 13, O 23], where O ij stands for the jth operation of the ith job. Figure 1 illustrates the Gantt diagram of the solution.
Random job arrivals and machine breakdowns that belong to job-related and resource-related real-time events, respectively, are considered in this paper in order to impose more reality in job shops. So contrary to ordinary JSS problem, all jobs are not ready at the beginning of the planning process but come to the shop floor gradually. In addition, some machinery may break down during the processing jobs. Finding job sequences to be processed on machinery in such environment is known as the DJSS problem [1]. In the job shop environment, the distribution of the job arrival process closely follows the Poisson distribution. Hence, the time between arrivals of jobs is distributed exponentially [24–26]. The time between two breakdowns and repair time are also assumed to follow an exponential distribution. Thus, the mean time between failure (MTBF) and the mean time to repair (MTTR) are two parameters related to machine breakdown. In the dynamic job shop framework, considering an eventdriven policy [27], in which rescheduling is triggered in response to a dynamic event that changes the current condition, a static job shop problem is generated whenever a new job arrives or a machine breaks down. At that time, we consider a new job with the remaining operation of previous jobs or a broken machine that needs time to repair. The new static problem is fed to the proposed scheduling method (MVNS) to produce an optimum or a nearly optimum schedule. The optimum solution will be used as production schedule until the next event takes place.
3 K-means algorithm Given n patterns, or data points, in d-dimensional space, the clustering problem refers to the process of partitioning the n patterns into k groups or clusters based on some similarity metrics. An optimal clustering is a partitioning that minimizes
Fig. 3 Proposed strategy for dynamic job shop scheduling problem
Start
Consider Jobs exist in shop floor at beginning
No Finish
Are you in planning horizon?
Execute optimum schedule until next real time event takes place
yes
Perform job clustering
Run optimization algorithm(MVNS) which uses information extracted from input data by clustering
1958
Int J Adv Manuf Technol (2014) 70:1955–1961
Fig. 4 Steps of the modified VNS (MVNS) algorithm
the intra-cluster distance and maximizes the inter-cluster distance. In practice, the most popular metric is the sum of squared errors which is defined as Eq. (1). Xk Xn
X ij −C i 2 SSE ¼ ð1Þ i¼1 j¼1 Where Ci ¼
1 Xn X j¼1 ij ni
ð2Þ
denotes the mean of the ith cluster, k the number of clusters, X ij the jth pattern in the ith cluster, n i the number of patterns in the ith cluster, and Xk n¼ n: ð3Þ i¼1 i In this paper, a heuristic algorithm illustrated in Fig. 2 [20,28] is used to do the clustering of n jobs based on similarity between m dimensional processing time vectors for each job in forms of the k-means clustering problem. It is Fig. 5 Steps of the local search algorithm
notable that the k-means clustering problem is computationally hard (NP hard), but the selected heuristic algorithm is efficient in terms of execution time and converges to a clustering structure quickly even though the obtained clustering structure is not a global optimum [29]. At any rescheduling point, the remaining jobs are clustered by the k-means algorithm, and distances between cluster centers are calculated to be considered as a base to determine the probability of selecting jobs to make neighborhoods as explained in details in Sect. 4 (Fig. 3).
4 Modified VNS for the DJSS problem The VNS algorithm as a metaheuristic method is widely used to solve combinatorial problems. The algorithm searches the neighborhood of a solution until another solution better than the incumbent is found and then jumps to the new one. VNS tries to escape from a local optimum by changing the neighborhood structure (NS) that is the manner in which the
Int J Adv Manuf Technol (2014) 70:1955–1961
1959
Table 1 Comparison of the MVNS and other algorithms Simulated shop floor condition
Performance measure for SPT
Performance measure for LIFO
Performance measure for FIFO
Performance measure for VNS
Performance measure for MVNS
MTBJA=300, MTBF=5700, MTTR=300 MTBJA=250, MTBF=5700, MTTR=300 MTBJA=200, MTBF=5700, MTTR=300 MTBJA=150, MTBF=5700, MTTR=300
2224.90 2359.20 2945.90 5825.1
2223.80 2395.90 2799.60 5532.4
2290.70 2354.40 2785.10 6083.20
1921.40 2011.4 2428.2 3132.4
1900.8 1981.7 2389.3 3068.5
neighborhood is defined. Neighborhoods are usually ranked in such a way that solutions increasingly far from the current one are explored [30,31]. The VNS algorithm begins with an initial solution, x ∊S, where S is the set of search space, and uses a two-nested loop. The inner loop alters and explores using two main functions, namely “shake” and “local search,” respectively. The outer loop works as a refresher reiterating the inner loop. The local search explores a better solution within the local neighborhood, while the shake diversifies the solution by switching to another local neighborhood. In this paper, using the k-means algorithm, neighborhoods are made by a knowledge extracted from input data so that more diversification is assured by selecting jobs from different clusters. In the proposed selection mechanism, the distance between cluster centers is considered to calculate the probability of selecting a job number to make a new adjacent. In other words, in this approach, a job that belongs to a farther cluster has a greater probability to be selected in making a new adjacent than one belonging to a closer cluster. The rate of similar jobs that have operations with zero processing time can be high in dynamic environment because when a real-time event takes place, with a high probability, some operations of the current jobs are done. Considering an event-driven policy, it causes a reduction in VNS efficiency. In VNS, the inner loop iterates as long as it keeps improving the solutions, where an integer ,i, controls the length of the
loop. Once an inner loop is completed, the outer loop reiterates until the termination condition is met. The steps of the modified VNS (MVNS) structure are illustrated in Fig. 4. To reduce computational time and enhance efficiency and effectiveness, two famous neighborhood structures, insertion and swap [32], are modified to be used in the proposed optimization algorithm process for both shake and local search function. Such modification consists of determining the probability of job selection in NSs using job clustering results. The two neighborhood structures employed in the proposed algorithm are defined below. 1. Conducted insertion: Identifies two particular operations based on probability obtained from clustering results and places one operation in the position that directly precedes the other operation. 2. Conducted swap : Identifies two particular operations based on probability obtained from clustering results and places each operation in the position previously occupied by the other operation. A threshold accepting method local search [33] based on the two mentioned NSs is used in this paper. The threshold accepting method is an iterative procedure in which x ′ ←x ′′ when f(x ′′)−f(x ′)≤dr; where dr is the acceptance level. Local search function steps are illustrated in Fig. 5.
5 Simulation 2.04
Improvement Percentage
2.15 1.95 1.75
1.60 1.48
1.55 1.35 1.15
1.07
0.95 0.75 300
250
200 MTBJA
Fig. 6 Improvement percentages over various MTBJA
150
To demonstrate the performance of the proposed method, a job shop environment consisting of ten machines is simulated. It is noteworthy that a job shop with more than six machines presents the complexity involved in a large dynamic job shop scheduling problem [2]. The simulation starts considering initial jobs in the shop floor at the beginning and continues until the number of new job arriving at the shop floor reaches 1,200. The mean flow time of the latest 1,000 jobs that leave the shop floor during the planning horizon is selected as the performance measure. The proposed method is compared to VNS in its basic form and to make a fair comparison between VNS and MVNS; optimization parameters are selected so that the same CPU time is generated. It is also compared to three
1960
common heuristics that are widely used in the DJSS literature namely SPT, LIFO, and FIFO. Furthermore, it is assumed that all machines have the same MTTR and MTBF equal to 300 and 5,700 time unit, respectively. Thus, on an average of 5,700 time unit, a machine is available and then breaks down with a mean time to repair of 300 time units. Increasing mean time between job arrivals (MTBJA) and considering fixed values of MTBF and MTTR leads to an increase in the number of jobs that simultaneously exist in the shop floor at the rescheduling point. During the simulation, the number of jobs that simultaneously exist in the shop floor may reach more than 200 jobs. Simulation is repeated at four states of MTBJA, 300, 250, 200, and 150 time unit. The number of clusters is also considered over the simulation process as a tradeoff between exploration and exploitation in the MVNS algorithm. Results are presented in Table 1. As presented in Table 1, the proposed method improves the performance measure in comparison with VNS. In Fig. 6, improvement percentages over different MTBJA are illustrated. It is obvious that as the problem gets harder, the proposed method generates better schedules.
6 Conclusion In this paper, a cluster analysis algorithm is used to extract knowledge from the problem’s input data in a dynamic job shop scheduling problem in order to improve optimization results. In fact, the extracted knowledge is used in optimization process by variable neighborhood search algorithm. In the optimization process that is triggered when a real-time event occurs to make a new adjacent solution, jobs in the farther clusters have greater probability to be selected in the replacement mechanism. The proposed method (MVNS) was compared to VNS and some common heuristics using a simulated job shop under a range of different conditions. Results indicate that the performance of the proposed method is significantly better than VNS and other methods including three heuristics namely SPT, LIFO, and FIFO.
Conflict of interest The authors declare that they have no conflict of interest.
References 1. Qi JG, Burns GR, Harrison DK (2000) The application of parallel multi-population genetic algorithms to dynamic job shop scheduling. Int J Adv Manuf Technol 16:609–615 2. Chryssolouris G, Subramanian E (2001) Dynamic scheduling of manufacturing job shops using genetic algorithm. J Intell Manuf 12:281–293
Int J Adv Manuf Technol (2014) 70:1955–1961 3. Dewan P, Joshi S (2001) Implementation of an auction-based distributed scheduling model for a dynamic job shop environment. Int J Comput Integr Manuf 14:446–456 4. Dominic PDD, Kaliyamoorthy S, Saravana Kumar M (2004) Efficient dispatching rules for dynamic job shop scheduling. Int J Adv Manuf Technol 24:70–75 5. Yang G, Yu-si D, Hong-yu Z (2009) Job-shop Scheduling Considering Rescheduling in Uncertain Dynamic Environment. International Conference on Management Science and Engineering - 16th Annual Conference Proceedings, ICMSE, art. no. 5317409, pp. 380–384 6. Li Y, Chen Y, (2009) Neural network and genetic algorithm-based hybrid approach to dynamic job shop scheduling problem, Conference Proceedings - IEEE International Conference on Systems, Man and Cybernetics , art. no. 5346060, pp. 4836–4841 7. Cunli S (2009) An Assorted Dynamic Job-Shop Scheduling Algorithm Based on Impact Degree. Conference Proceedings - IEEE International Conference on Computational Intelligence and Software Engineering, art. no. 5365563 8. Vinod V, Sridharan R (2009) Simulation-based metamodels for scheduling a dynamic job shop with sequence-dependent setup times. Int J Prod Res 47:1425–1447 9. Zhou R, Nee AYC, Lee HP (2009) Performance of an ant colony optimization algorithm in dynamic job shop scheduling problems. Int J Prod Res 47:2903–2920 10. Wang S, Xiao X, Li F, Wang C (2010) Applied Research of Improved Hybrid Discrete PSO for Dynamic Job-shop Scheduling Problem. IEEE Proceedings of the 8th World Congress on Intelligent Control and Automation, art. no. 5553799, pp. 4065–4068 11. Fatemi Ghomi SMT, Iranpoor M (2010) Earliness-tardiness-lost sales dynamic job shop scheduling. Prod Eng Res Devel 4:221–230 12. Vinod V, Sridharan R (2011) Simulation modeling and analysis of due-date assignment methods and scheduling decision rules in a dynamic job shop production system. Int J Prod Econ 129:127–146 13. Chang FCR (1997) Heuristics for dynamic job shop scheduling with real-time updated queuing time estimates. Int J Prod Res 35:651–665 14. Aydin ME, Oztemel E (2000) Dynamic job-shop scheduling using reinforcement learning agents. Robot Auton Syst 33:169–178 15. Wei Y, Jiang X, Hao P, Kanfeng G U, (2009) Multi-agent Coevolutionary Scheduling Approach based on Genetic Reinforcement Learning. 5th International Conference on Natural Computation, ICNC, art. no. 5366784, pp. 573–577 16. Wang M, Zhang X, Dai Q, He J (2010) A Dynamic Schedule Methodology for Discrete Job Shop Problem Based on Ant Colony Optimization. 2nd IEEE International Conference on Information Management and Engineering 5, art. no. 5477648, pp. 306–309 17. Zandieh M, Adibi MA (2010) Dynamic job shop scheduling using variable neighborhood search. Int J Prod Res 48:2449–2458 18. Chen X, Hao X, Lin H W, Murata T (2010) Rule Driven Multi Objective Dynamic Scheduling by Data Envelopment Analysis and Reinforcement Learning. IEEE International Conference on Automation and Logistics, art. No. 5585316, pp. 396–401 19. Kapanoglo M, Alikalfa M (2011) Learning IF–THEN priority rules for dynamic job shops using genetic algorithms. Robot Comput Integr Manuf 27:47–55 20. Kogan J (2007) Introduction to clustering large and high-dimensional data. Cambridge University Press, New York 21. Mladenovic N, Hansen P (1997) Variable neighborhood search. Comput Oper Res 24:1097–1100 22. Hansen P, Mladenovic N, Moreno Perez JA (2007) Variable neighborhood search. Eur J Oper Res 191:593–595 23. Amirthagadeswaran KS, Arunachalam VP (2006) Improved solutions for job shop scheduling problems through genetic algorithm with a different method of schedule deduction. Int J Adv Manuf Technol 28:532–540
Int J Adv Manuf Technol (2014) 70:1955–1961 24. Rangsaritratsamee R, Ferrell WG, Kurz MB (2004) Dynamic rescheduling that simultaneously considers efficiency and stability. Comput Ind Eng 46:1–15 25. Sha DY, Liu CH (2005) Using data mining for due date assignment in a dynamic job shop environment. Int J Adv Manuf Technol 25:1164– 1174 26. Vinod V, Sridharan R (2007) Scheduling a dynamic job shop production system with sequence-dependent setups: an experimental study. Robot Comput Integr Manuf 24:435–449 27. Sabuncuoglu I, Kizilisik OB (2003) Reactive scheduling in a dynamic and stochastic FMS environment. Int J Prod Res 41: 4211–4231 28. Jain AK (2010) Data clustering: 50 years beyond k-means. Pattern Recogn Lett 31:651–666
1961 29. Bard JF, Jarrah AI (2009) Large-scale constrained clustering for rationalizing pickup and delivery operations. Transp Res B 43:542–561 30. Perez JAM, Vega JMM, Martin IR (2003) Variable neighborhood tabu search and its application to the median cycle problem. Eur J Oper Res 151:365–378 31. Hansen P, Mladenovic N (2001) J-MEANS: a new local search heuristic for minimum sum of squares clustering. Pattern Recogn 34:405–413 32. Liao CJ, Cheng CC (2007) A variable neighborhood search for minimizing single machine weighted earliness and tardiness with common due date. Comput Ind Eng 52:404–413 33. Bouffard Y, Ferland JA (2007) Improving simulated annealing with variable neighborhood search to solve the resource-constrained scheduling problem. J Sched 10:375–386