Variable Neighbourhood Search and Mathematical Programming for Just-inTime Job-Shop Scheduling Problem

This paper presents a combination of variable neighbourhood search and mathematical programming to minimize the sum of earliness and tardiness penalty costs of all operations for just-in-time job-shop scheduling problem (JITJSSP). Unlike classical E/T scheduling problem with each job having its earliness or tardiness penalty cost, each operation in this paper has its earliness and tardiness penalties, which are paid if the operation is completed before or after its due date. Our hybrid algorithm combines (i) a variable neighbourhood search procedure to explore the huge feasible solution spaces efficiently by alternating the swap and insertionneighbourhood structures and (ii) amathematical programmingmodel to optimize the completion times of the operations for a given solution in each iteration procedure. Additionally, a threshold accepting mechanism is proposed to diversify the local search of variable neighbourhood search. Computational results on the 72 benchmark instances show that our algorithm can obtain the best known solution for 40 problems, and the best known solutions for 33 problems are updated.


Introduction
The importance of "just-in-time" inventory management in industry has motivated the study of theoretical scheduling models.Among these models, many research efforts have been devoted to the classical earliness and tardiness (E/T) scheduling problems, and most of them consider earliness and tardiness penalties only for the last operation of the job [1][2][3].Although the job may be finished on time, no storage and insurance cost are considered for intermediary operations which are processed as early as possible, which obviously violate the JIT philosophy [4].
For the just-in-time job-shop scheduling problem (JITJSSP), a job is decomposed in a sequence of operations that should be performed in a specific order.Each operation has its due date and earliness-tardiness penalties, which are paid if the operation is completed before or after its due date.Thus, the unwanted intermediate storage costs are avoided by finishing the operation as close to its due date as possible [4].
Baptiste et al. [4] defined an integer programming model for the JITJSSP problem and proposed methods based on two Lagrangian relaxations of the model to derive lower and upper bounds.They reported good lower and upper bounds for 72 instances.However, the gaps between lower and upper bound are still large for most instances.Monette et al. [5] later presented a constraint programming approach, which includes a novel filtering algorithm and dedicated heuristics.Although the method in [6] can give an inserted idle time schedule solution at last, it cannot offer the optimum (even near-optimum) solution for the JITJSSP with loose due date environment because few improvements occur on the instances of small scale.
In order to minimize the sum of total penalty costs in the JITJSSP problem, all operations are required to be completed as close to their due dates as possible, and thus the idle time is necessary to delay the start time of an early operation.In fact, it is a serious trouble how well idle time is inserted when severity resource contention occurs [7].The mathematical programming method, which is suitable for a small solution space, can obtain an optimal solution.However, for the JITJSSP problem with a large number of jobs and machines, the computation time is intractability.

Mathematical Problems in Engineering
As for the JITJSSP problem with nonregular performance measure, how to explore the huge feasible space and how to insert machine idle time are two key issues.To deal with these two issues in solving the JITJSSP problem more effectively and efficiently, the hybrid algorithm is proposed in this paper with the mathematical programming (MP) model embedded to each iteration procedure of variable neighborhood search (VNS).In each iteration procedure of VNS, a sequence of operations on machines is produced by exploring the two swap and insertion neighborhoods of the current solution, and the mathematical programming model is then employed to insert idle time and optimize the completion times of the operations for the given sequences.
The rest of the paper is organized as follows.Section 2 discusses the problem formulation.The overall operational structure of the VNS/MP algorithm is presented in Section 3.An extensive variable neighborhood search study is discussed in Section 4. The mathematical programming model is presented in Section 5. A benchmarking study and experimental results are discussed in Section 6.Finally, the conclusions are given in Section 7.

Problem Formulation
The following definition of the JITJSSP problem is given on Baptiste et al. [4].Consider a finite set of  jobs  = { 1 ,  2 , . . .,   } that have to be processed on a finite set of  machines  = { 1 ,  2 , . . .,   }.Each job   has a sequence of  operations,   = { 1  ,  2  , . . .,    }, that need to be processed in sequence.The th operation of job ,    , has to be processed by a prescribed machine (   ) ∈ .Likewise, the set of operations that must be processed on each machine,   ∈ , is denoted by (  ).Without loss of generality, it is assumed that at most one operation of each job is processed on each machine, each machine can process at most one operation at a time, and no preemption is allowed.The notations used in the problem formulation are as follows:

The Overall Operational Structure of the VNS/MP Algorithm
Variable neighborhood search [8,9] is a new local search technique that tries to escape from local optimum by changing neighborhood structures.In its basic form, VNS explores increasingly distant neighborhoods of the current incumbent solution, makes a local search from a neighbor solution to a local optimum, and jumps to it if and only if an improvement has been made.The overall operational structure of the VNS/MP algorithm for the JITJSSP problem is shown in Figure 1.The VNS method is employed to explore the huge feasible space and provide a feasible schedule solution and, in initialization, shaking, and local search procedure of VNS.The mathematical programming model is introduced to make the operations complete closer to its due dates by inserting machine idle times into the given sequences and then feed backs an optimal schedule solution to VNS for its next iterative optimization procedure.
The overall steps of the VNS method are shown in Figure 1.Let   ( = 0, 1, . . .,  max −1) denote neighbourhood structures and   () the set of the solutions in the th neighbourhood of .To avoid consuming too much computational time, the maximum number of neighbourhood structures,  max , is suggested to be 2 [10] (1) Set k ← 0.
(2) Until k = 1, repeat the following steps: (a) shaking: generate a point x  at random from with x  as initial solution; denote by x  the the incumbent, move there (x ← x  ), and continue the search with N 0 (k ← 0); otherwise, (1) Receive initial solution x, x  in shaking and candidate in N k (k = 0, 1) which will be used in the search; find an initial the kth neighbourhood of x (x  ∈ N k (x));

Variable Neighbourhood Search: Explore the Solution Space
To achieve greater efficiency in VNS, we propose an excellent initial solution generation method and two kinds of neighborhood structures, swap and insertion, based on the characteristic of JITJSSP problem.Moreover, the local search procedure with the filter mechanism is designed to eliminate the swap movement that is unlikely to lead to good schedules.
The key three issues in VNS, initialization, neighbourhood structures, and local search, are described in detail below.

Initialization.
A good initial solution is able to reduce the computational time to achieve the optimal solution.Therefore, we present an initial solution generator that involves two new dispatching rules, each producing a candidate solution and the better one being selected as an initial solution.The rule, as a variant of the Earliest Due Date (EDD) rule, is that the operation with the earliest due date is selected first.The other rule is a modification to ALL + CR + SPT [11].Two separate sequences are produced for each machine by this new rule and the best solution is selected.The overdue jobs are placed in the priority sequence, in which the machine chooses the job whose    /   is minimal to be processed.But if this sequence is empty, the machine will choose the job whose    /   is maximal to be processed in the other sequence.For the criteria mean absolute lateness, ALL + CR + SPT can achieve the best performance at certain tightness levels.The new rule inherits this quality and can make the operation completion time closer to its due date.

Neighbourhood Structures: Swap and Insertion.
Firstly, the immediate job predecessor and the immediate job successor of the operation  are denoted as JP[] and JS[], respectively.Similarly, the immediate machine predecessor and the immediate machine successor of  are denoted as MP[] and MS[], respectively.Besides, two successive operations  and V on the same machine (providing  is processed before V) are adjacent when there is no idle time between them (i.e.,   = st V ).And then  is the adjacent machine predecessor of V while V is the adjacent machine successor of .Finally, a block is defined as a maximal sequence of size at least two, consisting of adjacent operations that are processed on the same machine.
The two neighbourhood structures, swap and insertion, are applied in shaking and local search procedures of VNS are described as follows.
4.2.1.Swap Neighbourhood.Swap the selected operation with its adjacent machine successor while it is early or when its adjacent machine predecessor is tardy.
In each iteration of VNS, the schedule solution obtained from mathematical programming model is the optimal solution for the current sequence, and the completion time of each operation is as close to its due date as possible.The first step of generating a neighbour in both neighbourhoods is to randomly select an operation which is either early and has an adjacent machine successor or tardy and has an adjacent machine predecessor.The selected operation by this Swap procedure has the two following lemmas.Lemma 1.If the selected operation  is early and has no adjacent machine successor (i.e., the immediate machine successor does not exist or there is idle time between  and the immediate machine successor), the immediate job successor of  is also early.
Proof.If the selected operation  is early and has no adjacent machine successor, thus,   <   , where   and   denote the completion time and due date of , respectively.  is equal to the start time of its immediate job successor; that is, , which means that the immediate job successor is also early.
Lemma 2. If the selected operation  is tardy and has no adjacent machine predecessor (i.e., the immediate machine predecessor does not exist or there is idle time between  and the immediate machine predecessor), the immediate job predecessor of  is also tardy.
Proof.If the selected operation  is tardy and has no adjacent machine predecessor, the start time of  must be equal to the completion time of the immediate job predecessor; that is, , which means that the immediate job predecessor is also tardy.
If the selected operation is early and has no adjacent machine successor, we will trace its job successors until finding one job successor which has an adjacent machine successor.If the job successor is early according to Lemma 1, then the job successor will be chosen to move.This Swap procedure is shown in Figure 2.
In Figure 2, let  be the selected operation; it is early and there is idle time between  and its immediate machine successor V. We trace the job successors of , and the operation JS[] meets exactly the swap condition.Thus, the operation JS[] is to be swapped with the operation JP[V] to generate a new neighbour with good performance.

Insertion Neighbourhood.
For block of a solution, it is not only the result of operations gathering together to compete for one machine but also an obstacle which prevents the operation from closing to its due date.Therefore, inserting the selected operation into the start or the end of the block can exploit the idle times effectively between the blocks for a performance improvement.
Let the selected operation be , let the block which  belongs to be , and let V (or ) denote the first (or last) operation of .The insertion procedure varies with the status of  as follows.
Insertion Procedure When  Is Early.When the operation  is the last one of block , move  to the right of  to bring new neighbour if st  ≤ st JS[] ; otherwise, select an operation  randomly which is processed after  and move  to the right of  to bring new neighbour if st  ≤ st JS [𝑢] .See Figure 3.
Insertion Procedure When  Is Tardy.When the operation V is the last one of block , move  to the left of V to bring new neighbour if  V ≥  JP[] ; otherwise, select an operation  randomly which is processed before  and move  to the left of V to bring new neighbour if   ≥  JP[] .See Figure 4.

Local Search with the Filter Mechanism.
As for the local search procedure in VNS, we make two improvements: threshold accepting mechanism to diversify the search space and filter mechanism to avoid the possible performance deterioration of schedule solutions in swap procedure.

Local Search with Threshold Accepting Mechanism.
The threshold accepting mechanism [12] is embedded into each iteration process of local search procedure [13].The current solution   is replaced by the new solution   when the performance deviation between   and   is less than a threshold .Set  = √(  )/2 in this paper.Furthermore, in order to enhance the search efficiency, a certain number  candidates are selected randomly from the set   (  ), and then let the best one in  candidates replace   .See Algorithm 1.

Filter Mechanism for Swap
Procedure.For a given sequence produced by VNS, an optimal schedule solution can be obtained by mathematical programming model.Thus, swapping two adjacent operations may delay the completion time of the successors and lead the new neighbour quality to deteriorate.In order to solve this problem, a filter mechanism is proposed in local search to prevent a new neighbour M 1 : Figure 4: Insertion procedure for tardy operation.
Figure 5: Overlap degree of two operations and its impact on swap procedure.
by swap operation from deteriorating the performance of schedule solutions.Providing the adjacent operations to be swapped,  and V, we introduce overlap to evaluate effect of each swap operation.Figures 5(a) and 5(b) show two kinds of overlap.
In Figure 5(a), there is a large overlap between two operations, JP[V] and , as well as JS[] and V, before swap operation.However, the completion times of  and JS[] are more seriously delayed once the swap operation is executed.On the other hand, in Figure 5(b), although there is also an overlap between two operations, JP[V] and , the swap operation can improve the solution because of the machine idle time.
In order to improve the solution and avoid the deterioration in swap operation, the overlap degree of two operations  and V is evaluated by (5), and the swap procedure can be executed if Lap(, V) ≤ Lap max .Lap max refers to a maximum of overlap degree: (5)

Mathematical Programming Model: Optimize the Completion Times of the Operations for a Given Solution
For the VNS/MP algorithm, three steps in VNS procedure can produce three feasible solutions, respectively.
(1) Initialization step: an initial feasible solution is produced by EDD or ALL-JIT rule.
(2) Shaking step: a feasible solution is generated by insertion or swap operations.
(3) Local search step: a new neighbor and a given solution are also produced by insertion or swap operations.
All these three feasible solutions have satisfied the resource constraint (3), which can ensure that only one operation is processed simultaneously on one machine.Thus, by VNS procedure, the difficult resource constraint (3) is relaxed as follows: where    is processed after    .Therefore, in our proposed VNS/MP algorithm, VNS is used to explore the huge search space and achieve a good feasible solution.The resource constraint in JIT scheduling model is relaxed to make a good chance for the improvement by mathematical programming method.Thus, the JIT scheduling model can be changed into mathematical programming model, and the optimal completion times of all the operations for a given solution can be achieved in a short computation time.

Computational Results and Discussion
6.1.JITJSSP Instances.We used the same set of 72 instances generated by Baptiste et al. [4].Each instance is named I-nm-DD-W-ID, where I refers to "instance" and  and  are the number of jobs and machines, respectively, which have 9 combinations totally; that is, ( × ) ∈ ({10, 15, 20} × {2, 5, 10}).Each combination of  and  contains 8 instances such as DD, W, and ID which are chosen randomly.(iii) ID is set to be 1 or 2 to identify the two instances generated for each combination of the other parameters.
The VNS method is executed by a fixed number of  = 100 iterations.The maximum number of local search iterations is  max = 50.Set the number of the candidates and the upper bound of overlap to be  = 3 and Lap max = 0.5, respectively.

Results and Comparison.
The VNS/MP algorithm is coded in Matlab and the mathematical programming model is implemented by the Xpress optimizer in FICO Xpress.
The solution values for instances with  = 10, 15, and 20 jobs are reported, respectively, on Tables 1, 2, and 3. Table 4 shows the total number of best solutions for the 72 instances.The columns LB and UB list the best of the lower bounds and the upper bound reported by Baptiste et al. [4].The column CP refers to the constraint programming approach proposed by Monette et al. [5].The column EA/LS/MP refers to the combination of evolutionary algorithm, local search, and mathematical programming presented by Dos Santos et al. [6].The best result of each instance computed by these five methods is highlighted in boldface type.
From Table 4, our VNS/MP algorithm obtains the best solution on 40 of the 72 instances and outperforms all of its competitors.Although VNS/MP has overwhelming dominance over the UB and CP, it is a little better than EA/LS/MP.Compared with EA/LS/MP, VNS/MP gives better solutions for most of the small instances; however, as the size of instances increases its performance deteriorates increasingly.
Yet we should not make a conclusion that VNS/MP is not suitable for solving JITJSSP problems of large scale.The neighborhood structures swap and insertion in VNS/MP are based on adjacent operations, which result in the solution space increasing along with the number of adjacent operations to be operated.As a consequence, the search space will become too huge when the due date setting is tight which makes most of the operations tend to be adjacent.Practically, most of the due dates of the 72 benchmark instances are extremely tight, which exactly coincides with the advantage of EA/LS/MP.In other words, VNS/MP solves the JIT scheduling problems with loose due dates effectively but its performance may decline when it is used to schedule problems with tight due dates.

Conclusions
We propose and evaluate a VNS/MP hybrid algorithm to the JITJSSP problem that searches a minimal sum of earliness and  tardiness penalty costs for all operations, not only for the jobs.This hybrid method combines (i) the variable neighbourhood search procedure to explore the huge feasible space of the JITJSSP problem efficiently by escaping from local optima with alternating the swap and insertion neighborhood structures and (ii) the mathematical programming model to insert idle machine time and optimize the completion times of the operations for a given sequence.The VNS/MP hybrid algorithm is tested with 72 benchmark instances in JITJSSP problem and compared with three other approaches.It can find the best known solution for 40 instances with minimal computational effort, and the best known solutions for 33 instances are updated.As continuation to this work, we intend to design more efficiency neighborhood structures to improve the performance of VNS method to meet the large-scale JITJSSP problems with tight due date environment.
. The two kinds of neighbourhood structures, swap and insertion, are designed to change and improve the schedule solution for the shaking and local search procedure.Let  0 indicate the neighbourhood swap and let  1 indicate the neighbourhood Insertion.The stopping condition is maximum number of iterations N. Initialization: select the set of neighbourhood structures Repeat the following until the stopping condition is met.(b) local search: apply some local search method so obtained local optimum; (c) more or not: if this local optimum is better than VNS: explore the solution space and produce a feasible solution MP: optimize the completion times of the operations for the given sequences local search from VNS. (2) Execute the mathematical programming model by optimization software.(3) Feed back the optimal schedule solution to VNS. solution x; choose a stopping condition.

Figure 1 :
Figure 1: Overall operational structure of the VNS/MP algorithm.

Figure 3 :
Figure 3: Insertion procedure for early operation.
(i) DD denotes the distances between due dates of consecutive operations which are exactly equal to the processing time of the last operation (DD = tight) or equal to the processing time plus a random value in [0, 10] (DD = loose).(ii) W denotes the relation between earliness and tardiness penalty.There is W = equal if both  and  are chosen randomly in [0.1, 1] or W = tardy if  is chosen randomly in [0.1, 0.3] and  in [0.1, 1].

Table 1 :
Results for instances with 10 jobs.

Table 2 :
Results for instances with 15 jobs.

Table 3 :
Results for instances with 20 jobs.

Table 4 :
Total number of best solutions for the 72 instances.