Modelling and Simulation in Engineering

Volume 2016 (2016), Article ID 5071654, 15 pages

http://dx.doi.org/10.1155/2016/5071654

## Forward VNS, Reverse VNS, and Multi-VNS Algorithms for Job-Shop Scheduling Problem

Industrial Engineering Program, Faculty of Engineering, Thai-Nichi Institute of Technology, Bangkok 10250, Thailand

Received 19 April 2016; Revised 3 July 2016; Accepted 11 August 2016

Academic Editor: Farouk Yalaoui

Copyright © 2016 Pisut Pongchairerks. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

This paper proposes a number of forward VNS and reverse VNS algorithms for job-shop scheduling problem. The forward VNS algorithms are the variable neighborhood search algorithms applied to the original problem (i.e., the problem instance with the original precedence constraints). The reverse VNS algorithms are the variable neighborhood search algorithms applied to the reversed problem (i.e., the problem instance with the reversed precedence constraints). This paper also proposes a multi-VNS algorithm which assigns an identical initial solution-representing permutation to the selected VNS algorithms, runs these VNS algorithms, and then uses the best solution among the final solutions of all selected VNS algorithms as its final result. The aim of the multi-VNS algorithm is to utilize each single initial solution-representing permutation most efficiently and thus receive its best result in return.

#### 1. Introduction

Job-shop scheduling problem (JSP) is a hard-to-solve scheduling problem which has commonly been found in many industries. JSP is similar to other scheduling problems in the terms that it consists of a number of jobs and a number of machines, and it requires assigning the given jobs into the given machines over time. However, JSP has some more specific constraints which make it unique and thus different from the other scheduling problems. These specific constraints are given as follows. Each job in JSP consists of a number of operations which must be processed in the specific order as the precedence constraints. Each operation must be processed on a preassigned machine by a specific processing time without preemption. In addition, each machine cannot process more than one operation simultaneously. The objective of JSP is to find a feasible schedule which completes all given jobs by the shortest makespan, that is, the time length from the starting time to the completion time of the schedule.

In order to solve JSP, this paper is interested in applying variable neighborhood search (VNS) algorithm because this algorithm is recognized as a simple, systematic, and successful metaheuristic for combinatorial problems. This paper receives insight and motivation from the previously published literature to develop the forward VNS, reverse VNS, and multi-VNS algorithms. The forward VNS algorithms are the VNS algorithms applied to the original problem (i.e., the being-considered JSP instance with the original precedence constraints). The reverse VNS algorithms are the VNS algorithms applied to the reversed problem (i.e., the being-considered JSP instance with the reversed precedence constraints); each reverse VNS algorithm has an additional step to transform its reversed problem’s solution to be usable for the original problem. The proposed multi-VNS algorithm is an algorithm which assigns the same initial solution-representing permutation into a number of the specified VNS algorithms, runs these VNS algorithms, and finally uses the best solution among the final solutions of these VNS algorithms as its final result. In other words, the multi-VNS algorithm aims at utilizing each single initial solution-representing permutation most efficiently by systematically using different VNS neighborhood structures and scheduling directions on the same initial solution-representing permutation.

The remaining parts of this paper are organized as follows. Section 2 reviews the articles related to the research in this paper and then summarizes the research contributions. Section 3 proposes a generic VNS algorithm, so that this section later proposes the forward VNS algorithms and the reverse VNS algorithms based on the given generic form. This paper proposes a multi-VNS algorithm in Section 4 and then evaluates the multi-VNS algorithm’s performance in Section 5. Section 6 finally provides the conclusions of this research.

#### 2. Literature Review and Research Contribution

Job-shop scheduling problem (JSP) starts with given jobs and given machines . Each job is composed of given operations which must be processed in the given order as a chain of precedence constraints. This means, for each job , the operation must be finished before the operation can be started, the operation must be finished before the operation can be started, and so on. The operation can be processed only on a preassigned machine with a specific preassigned processing time. The preemption for each operation is not allowed; that is, after a particular machine starts processing any operation, it cannot be stopped or paused for any reasons until finishing the operation. In addition, each machine can process only one operation at a time. JSP aims at finding a schedule (i.e., an allocation of all given operations to time intervals on the given machines) which satisfies all above-given constraints so as to minimize the schedule’s makespan. As mentioned, the makespan defines the time length from the starting time of the schedule (i.e., the starting time of the first started operation in the schedule) to the completion time of the schedule (i.e., the completion time of the last finished operation in the schedule). JSP is a well-known scheduling problem, so it has been mentioned frequently in the textbooks, for example, [1, 2]. The mathematical models for describing JSP have been commonly found in literature, for example, [3].

JSP is important to industry and attractive to academia, so many algorithms have been developed for solving the problem. These algorithms include tabu search algorithms [4, 5], a simulated annealing algorithm (SA) [6], a hybrid algorithm between particle swarm optimization (PSO) and VNS [7], genetic algorithms (GAs) [8–13], PSO algorithms [14–16], VNS algorithms [17–19], a hybrid algorithm between PSO and GA [20], a bee colony algorithm [21], an ant colony optimization algorithm [22], a memetic algorithm [23], and a hybrid algorithm between GA and SA [24]. Based on the literature review, the VNS algorithms are recognized as well-performing algorithms for JSP, so this paper will research more on the VNS algorithms.

VNS was first introduced in [25, 26] as a metaheuristic approach for combinatorial optimization problems. As its name implies, VNS changes its neighborhood structure from one to another systematically in the purpose of finding local optimal solutions as well as escaping from them, so VNS is highly potential to find a global optimal solution. The development of VNS is based on the three following observations [25, 27]:(1)A local optimal solution in a neighborhood structure may not be the same as a local optimal solution in another neighborhood structure.(2)A global optimal solution is a local optimal solution with respect to all possible neighborhood structures.(3)In many problem instances, local optimal solutions in different neighborhood structures are relatively close to each other.

VNS generally consists of three main steps: the shaking step, the local search step, and the step of updating its best found solution. The VNS algorithm’s local search step aims at finding a local optimal solution with respect to variable neighborhood structures. The shaking step aims at escaping from a local optimal solution as well as generating a new initial solution for the local search step. In published literature, the review articles about VNS are found in [25–28], the applications of VNS are found in [17–19, 28, 29], and the parallelization strategies for VNS are given in [27, 30].

The articles closely related to the research in this paper are articles [7, 17, 19, 29]. As mentioned above, a well-performing hybrid algorithm between PSO and VNS for JSP was given in [7]. Later, article [17] disassembled the VNS from the hybrid algorithm and reported that the VNS algorithm alone performs as equally well as the hybrid algorithm in terms of solution quality. After that, article [29] introduced the variants of the VNS algorithm of [17] for asymmetric traveling salesman problem, while article [19] introduced the variants of the VNS algorithm of [17] for JSP. Article [19] is most closely related to the research in this paper, because this paper aims at enhancing the performances of the VNS algorithms given in [19].

As just mentioned, the objective of the research in this paper is to enhance the performances of the VNS algorithms of [19], so the contributions of the research in this paper are given in overview as follows. A preliminary study of this research finds that, in several hard-to-solve JSP instances, the maximum iterations of the VNS algorithms of [19] should be increased in order to enhance their potentials of finding the optimal solutions; thus, this paper will find out the more proper maximum iterations for the VNS algorithms. This paper will also introduce more variants of the VNS algorithms of [19] which use different neighborhood structures from [19]. Moreover, this paper will introduce the use of the reversed problem (i.e., the being-considered JSP instance with the reversed precedence constraints) for the VNS algorithms because each hard-to-solve JSP instance may be solved easier in its corresponding reversed problem. Note that the schedule’s construction using the reversed precedence constraints is called the reverse or backward scheduling, and it has often been applied for scheduling problems in many articles such as [14, 22, 31, 32]. For efficiently utilizing each initial solution-representing permutation, this paper will then propose the multi-VNS algorithm which assigns an identical initial solution-representing permutation into the selected VNS algorithms, runs these VNS algorithms, and uses the best solution found by these VNS algorithms as its final solution.

#### 3. Proposed VNS Algorithms

This section will propose the generic VNS algorithm for JSP, so that the forward VNS algorithms and the reverse VNS algorithms will be developed based on the given generic VNS algorithm. As mentioned earlier, the forward VNS algorithms define the VNS algorithms applied to the original problem, that is, the being-considered JSP instance using the original (forward) precedence constraints. The reverse VNS algorithms define the VNS algorithms applied to the reversed problem, that is, the being-considered JSP instance using the reverse (backward) precedence constraints. In addition, each reverse VNS algorithm has one more additional step to modify its reversed problem’s solution to be usable for the original problem. The terms* forward VNS* and* reverse VNS* will hereafter be abbreviated by* FVNS* and* RVNS*, respectively. Section 3.1 provides the generic VNS algorithm which is the generic form for all FVNS and RVNS algorithms proposed in this paper. Based on the generic form given, Section 3.2 presents the FVNS and RVNS algorithms using different operators to generate their solution-representing permutations. The performances of the proposed FVNS and RVNS algorithms will also be tested in Section 3.2.

##### 3.1. Generic VNS Algorithm for JSP

This section introduces the generic VNS algorithm as the generic form of the FVNS and RVNS algorithms proposed later in Section 3.2. Note that the solutions (i.e., the JSP schedules) generated by all proposed VNS algorithms are represented by the operation-based permutations [3, 13]. Each operation-based permutation is an arrangement of the integers consisting of , where the subscripts are used to distinguish the integer of the same value. In other words, it is a sequence of the integers consisting of the numbers from 1 to , where each number (from 1 to ) occurs repeatedly times. Based on the JSP definition given in Section 2, is the number of all given jobs, while is the number of all given machines. Moreover, is also equal to the number of all operations of each job, so is thus the number of all operations in the schedule. As an example, is an operation-based permutation possibly generated by a particular VNS algorithm for a 3-job/2-machine JSP instance. The procedure to decode an operation-based permutation into a JSP schedule, as found in [3, 13, 17, 19], is given here in Algorithm 1. This decoding procedure transforms the operation-based permutation into an order of priorities of all given operations and then uses this order of priorities to construct a semiactive schedule. Note that a semiactive schedule is a feasible schedule such that no operations can be started earlier without altering the given order of priorities of operations.

*Algorithm 1. *It is a procedure to decode an operation-based permutation into a semiactive schedule.

*Step 1*. Let represent the operation-based permutation which is required to be transformed into the semiactive schedule . Let the number () in the th occurrence () from leftmost to the right of the permutation refer to the th operation of the job or . After that, let the order of these operations in the permutation from leftmost to the right define the order of priorities of the operations from highest to lowest. For example, means that the order of priorities of the operations in descending order is , , , , , and .

*Step 2*. At the beginning, let the schedule be empty, so the earliest available times of all machines equal 0. Let .

*Step 3*. Based on the order of priorities of all operations given in Step 1, let represent the current highest-priority operation among all as-yet-unassigned operations. Then, let represent the preassigned processing time of the operation , and let represent the preassigned machine required by the operation .

*Step 4*. Assign the operation into the schedule by letting the starting time of the operation equal the maximum between the earliest available time of the machine and the completion time of the immediate-predecessor operation of the operation . As a consequence, the completion time of the operation equals its starting time given in this step plus its processing time .

*Step 5*. Update the earliest available time of the machine to equal the completion time of the operation .

*Step 6*. Increase by 1. After that, if , stop and the schedule is now completely constructed with the makespan equal to the maximum of the completion times of all operations; otherwise, repeat from Step 3.

Algorithm 2 is the procedure of the generic VNS algorithm which uses Algorithm 1 to decode operation-based permutations into JSP solutions. , , and in Algorithm 2 are the operation-based permutations which represent the job-shop schedules , , and , respectively. The permutation is the current best found permutation, so the schedule is the current best found solution. As mentioned, each permutation of , , and is a sequence of* mn* integers consisting of the numbers , where each number (from 1 to ) is repeatedly times. The solution neighborhood structures used by the generic VNS algorithm are generated based on the swap operator and the insert operator. The swap (i.e., interchange) and insert (i.e., shift) operators are commonly used in literature, for example, [7, 21, 33]. In this paper, the swap operator generates a neighbor of a specific operation-based permutation by randomly selecting two integers (of all integers) from two different positions in the permutation and then swapping the positions of the two selected integers. The insert operator is done by randomly selecting two integers (of all integers) from two different positions in the permutation, removing the first-selected integer from its old position, and then inserting it into the position in front of the second-selected integer.

*Algorithm 2. *It is a procedure of generic VNS algorithm.

*Step 1*. Let the user specify the type of this VNS algorithm to be a forward VNS algorithm or a reverse VNS algorithm and specify each of the operators , , , and to be the swap operator or the insert operator. If this VNS algorithm is specified to be a reverse VNS algorithm, then generate the reversed problem by letting the machine and the processing time of its operation ( and ) be equal to the machine and the processing time of the operation ( and ) of the original problem; then, replace the original problem by the reversed problem in all the following steps.

*Step 2*. Generate randomly as an initial current best operation-based permutation (or, as an option, can also be generated manually by the user) and then transform into the job-shop schedule by using Algorithm 1. Let the VNS algorithm’s iteration .

*Step 3*. Process the shaking step by generating and then transforming into a job-shop schedule by using Algorithm 1.

*Step 4*. Let the local search procedure’s iteration . Process the local search procedure by Steps to 4.5.

*Step 4.1*. Let and .

*Step 4.2*. If = 0, then generate ; however, if , then generate instead. After that, transform into the job-shop schedule by using Algorithm 1.

*Step 4.3*. If the makespan of > the makespan of , then increase by 1. However, if the makespan of ≤ the makespan of , then update to equal 0, update to equal , and also update to equal .

*Step 4.4*. If , then go to Step ; otherwise, repeat from Step .

*Step 4.5*. Increase by 1. After that, if , then go to Step ; otherwise, repeat from Step .

*Step 5*. If the makespan of ≤ the makespan of , then update to equal and also update to equal .

*Step 6*. Increase by 1. After that, check the conditions below:(i)If the stopping criterion is not met, then repeat from Step .(ii)If the stopping criterion is met and this VNS algorithm is specified in Step to be a forward VNS algorithm, then stop and is the final solution.(iii)If the stopping criterion is met and this VNS algorithm is specified in Step to be a reverse VNS algorithm, then go to Step .

*Step 7*. Transform into by letting the starting time of ( and ) of equal the makespan of minus the completion time of ( and ) of . As a consequence, the completion time of ( and ) of then equals the makespan of minus the starting time of ( and ) of . Then, stop and is the final solution. Note that the makespan of is equal to the makespan of .

The main steps of the generic VNS algorithm in Algorithm 2 are more clarified as follows. Step requires the user to assign the type of the VNS algorithm which can be either a forward VNS algorithm or a reverse VNS algorithm. If the type of VNS algorithm is specified to be a reverse VNS algorithm, the precedence constraints of all operations of each job must be reversed. In Step , the user moreover has to specify that each of the operators , , , and is either the swap operator or the insert operator. Step in Algorithm 2 generates as the initial current best operation-based permutation and then transforms the permutation into the schedule through the decoding procedure given in Algorithm 1.

Step is the shaking step of the VNS algorithm, which modifies the operation-based permutation to the operation-based permutation . To do so, Step uses the operator to for receiving the permutation , then uses the operator again to the permutation for receiving the permutation , then uses the operator to the permutation for receiving the permutation , and finally uses the operator again to the permutation for receiving the permutation as .

Step in Algorithm 2 is the VNS algorithm’s local search procedure used to improve the permutation ; thus, at the end of Step , will be a local optimal solution. Later, Step checks whether the permutation taken from Step is better than or equal to the current best permutation or not. If so, the current best permutation will be updated to equal the permutation .

Step is the step to check whether the stopping criterion is satisfied or not and check whether this VNS algorithm is a forward VNS algorithm or a reverse VNS algorithm. If the stopping criterion is not satisfied, then the VNS algorithm will process its next iteration. If the stopping criterion is satisfied and this VNS algorithm is a forward VNS algorithm, then stop and the schedule is the final solution. If the stopping criterion is satisfied and this VNS algorithm is a reverse VNS algorithm, then process Step in order to transform the schedule into the schedule , which is the reverse VNS algorithm’s final solution usable for the original problem.

##### 3.2. Proposed Forward VNS and Reverse VNS Algorithms

As previously mentioned, Algorithm 2 is the generic form for all forward VNS (FVNS) algorithms and all reverse VNS (RVNS) algorithms proposed in this section. Each of , , , and in Algorithm 2 can be specified to be either the swap operator or the insert operator, so there are a total of 32 VNS algorithms generated from Algorithm 2 including 16 FVNS algorithms and 16 RVNS algorithms. For the identification purpose, let us name these 32 VNS algorithms in the format of* TABCD*. Let represent the specified VNS type which can be either = a forward VNS algorithm or = a reverse VNS algorithm. Let , , , and here represent the specified operators for the generic operators , , , and in Algorithm 2, so each of , , , and can be either = the swap operator or = the insert operator. For example, FISIS refers to the forward VNS algorithm in which is the insert operator, is the swap operator, is the insert operator, and is the swap operator; RSISS means the reverse VNS algorithm in which is the swap operator, is the insert operator, is the swap operator, and is the swap operator.

Based on the format of* TABCD* above given, the 16 FVNS algorithms include FSSSS, FSSSI, FSSIS, FSSII, FSISS, FSISI, FSIIS, FSIII, FISSS, FISSI, FISIS, FISII, FIISS, FIISI, FIIIS, and FIIII, and the 16 RVNS algorithms include RSSSS, RSSSI, RSSIS, RSSII, RSISS, RSISI, RSIIS, RSIII, RISSS, RISSI, RISIS, RISII, RIISS, RIISI, RIIIS, and RIIII. Note that the eight FVNS algorithms, that is, FIIIS, FIISI, FISIS, FISSI, FSIIS, FSISI, FSSIS, and FSSSI, are slightly modified from the VNS algorithms of [19] in that their maximum iterations are extended from the 250th iteration to the 1,000th iteration. The modification just mentioned is due to the result of this paper’s preliminary study which finds that the maximum iteration of 250th iteration makes each VNS algorithm stop prematurely before receiving its best returns in several hard-to-solve instances. The discussion about the proper maximum iteration will be given at the end of this section. In addition, FSISI is also found in [17] with a slightly different stopping criterion from the criterion used here; FSISI can thus be recognized as the original variant of all VNS algorithms given in this paper.

The 16 FVNS and 16 RVNS algorithms proposed in this section are compared in their performances on the 43 well-known benchmark instances, that is, ft06, ft10, and ft20 from [34] and la01–la40 from [35]. The number of all jobs and the number of all machines (*m*) of all instances are given in parentheses in the form of* instance’s name * as follows: ft06 , ft10 , ft20 , la01–la05 , la06–la10 , la11–la15 , la16–la20 , la21–la25 , la26–la30 , la31–la35 , and la36–la40 . In the experiment here, the proposed FVNS and RVNS algorithms are all coded in C# and executed on an Intel(R) Core(TM) i5 CPU processor M580 2.67 GHz. These VNS algorithms will be stopped when either the 1,000th iteration as the maximum iteration is reached or the optimal solution given by the published literature [7, 8, 24] is found. In other words, the stopping criterion in Step of each VNS algorithm is either the VNS algorithm’s iteration = 1,000 or the makespan of = the optimal solution value given by the published literature. All VNS algorithms will be run once on each given instance with the same random seed number and the same initial operation-based permutation. For each instance, this paper uses the solution value deviation to evaluate the quality of the final solution given by each algorithm. For a specific instance, the* solution value deviation* is equal to 100%×(the algorithm’s final solution value − the optimal solution value)/the optimal solution value. Thus, if the algorithm can reach the optimal solution value given in the published literature, the solution value deviation is then 0.000%. Note that, in this paper, a solution refers to a schedule and a solution value refers to a schedule’s makespan.

Table 1 shows the solution value deviation (%) of every proposed VNS algorithm over a single run for each instance. The row* Best*, the last row in Table 1, provides the best solution value deviation found by all proposed VNS algorithms on each instance. The column* Avg*, the last column in Table 1, provides the average solution value deviation of all 43 instances of each VNS algorithm. Note that the instance will be absented from Table 1 if all 32 VNS algorithms can return the solution value deviations of 0.000% for it. This means Table 1 reports that all 32 VNS algorithms can reach the optimal solutions for the 28 instances of the total 43 instances, that is, ft06, la01–la15, la17–la19, la23, la26, la28, and la30–la35. Based on the results in Table 1, the list of the 32 VNS algorithms in ascending order of their average solution value deviations is FSSII, FISIS, FSSSI, RSSIS, RSISI, RISSI, FIIII, RIISI, RSSSI, FSIII, RIISS, FISSS, RSSSS, RISIS, RISII, RIIII, FSIIS, RIIIS, FIIIS, RSSII, RSIII, FIISI, FSSIS, RSIIS, FSSSS, FSISI, FISSI, RISSS, FIISS, FISII, RSISS, and FSISS.