Research Article

An Enhanced Two-Level Metaheuristic Algorithm with Adaptive Hybrid Neighborhood Structures for the Job-Shop Scheduling Problem

Algorithm 1

The procedure of decoding an operation-based permutation into a semiactive schedule.
Step 1. Receive an operation-based permutation and a scheduling direction (forward or backward) from LOSAP (Algorithm 2).
Step 2. If the scheduling direction received in Step 1 is forward, then the precedence relations of the operations of each job are unchanged. However, if it is backward, then the precedence relations of the operations must be reversed by using Steps 2.1 and 2.2.
  Step 2.1. For each job Ji (where i = 1, 2, …, n), let the operations Oi1, Oi2,…, Oim be renamed Oim, Oim–1,…, Oi1, respectively.
  Step 2.2. Assign the precedence relations of all operations Oij (where j = 1, 2, …, m) of each job Ji in ascending order of j values. Thus, Oi1 must be finished before Oi2 can start, Oi2 must be finished before Oi3 can start, and so on.
Step 3. If the scheduling direction received in Step 1 is forward, then the operation-based permutation received in Step 1 is unchanged. However, if it is backward, then the order of all members in the operation-based permutation must be reversed. For example, the permutation (3, 2, 3, 1, 1, 2) with a backward scheduling direction must be changed into (2, 1, 1, 3, 2, 3).
Step 4. Transform the permutation taken from Step 3 by changing the number i in its jth occurrence (from left to right) into the operation Oij (i = 1, 2, …, n and j = 1, 2, …, m). For example, the permutation (3, 2, 3, 1, 1, 2) must be transformed into (O31, O21, O32, O11, O12, O22).
Step 5. Transform the permutation taken from Step 4 into a semiactive schedule by using Steps 5.1 to 5.3.
  Step 5.1. Let Φt be the partial schedule of the t scheduled operations. Thus, Φ0 is empty. Now, let t ⟵ 1.
  Step 5.2. Let OL ⟵  the leftmost as-yet-unscheduled operation in the permutation. Then, create Φt by scheduling OL into Φt–1 at its earliest possible start time on its preassigned machine (the earliest possible start time of OL is the maximum between the finished time of its immediate-preceding operation in its job and the finished time of the current last-scheduled operation on its machine).
  Step 5.3. If t < mn, then let t ⟵ t + 1 and repeat from Step 5.2. Otherwise, go to Step 6.
Step 6. If the scheduling direction received in Step 1 is forward, then return Φmn (which is a completed forward semiactive schedule) as the final result. However, if it is backward, then modify Φmn to satisfy the original precedence relations by using Steps 6.1 and 6.2.
  Step 6.1. Let the operations Oim, Oim–1,…, Oi1 of each job Ji in the schedule Φmn be renamed Oi1, Oi2,…, Oim, respectively.
  Step 6.2. Turn the schedule modified from Step 6.1 back to front in order that the last-finished operation in the schedule becomes the first-started operation, and so on. After that, let the schedule be started at the time 0. Then, return the schedule modified in this step (which is a completed backward semiactive schedule) as the final result.