Hello! Let's continue our exploration of job shop scheduling.
In our last lesson, we mastered the skill of calculating the makespan for a given schedule by finding the longest path in its corresponding Directed Acyclic Graph (DAG). This allowed us to evaluate the quality of a solution. However, this raises a critical question: out of the astronomically large number of possible schedules, how do we decide which ones to generate and evaluate?
This lesson will equip you with a classic and powerful tool to answer that question. We will focus on the Giffler-Thompson algorithm, a systematic method for constructing high-quality schedules. This directly addresses the learning outcome: Apply the Giffler-Thompson algorithm to generate active schedules for a job shop. Understanding this constructive heuristic is not only fundamental to classical scheduling theory but also provides a key building block for the advanced metaheuristics you'll be studying for your thesis.
Why Active Schedules?
Before we dive into the algorithm itself, we need to understand its goal: to generate active schedules. The search for an optimal schedule can be narrowed down considerably if we focus on specific classes of schedules.
A Giffler-Thompson genetic algorithm for the static job-shop ...
The paper 'A Giffler-Thompson genetic algorithm for the static job-shop' provides concise definitions of the most important schedule classes. Understanding these is crucial for appreciating why the Giffler-Thompson algorithm is so useful.
Please read the short section titled '2 A Giffler-Thompson Focused Crossover Operator', focusing on the definitions of Semi-active, Active, and Non-delay schedules and the relationship between them. This is located on page 3.
As the reading highlights, there are three key types of feasible schedules:
- Semi-active: No operation can be started earlier without changing the sequence of operations on some machine. This is a very basic notion of a "compact" schedule.
- Active: No operation can be started earlier without either delaying another operation or violating its job's precedence constraints.
- Non-delay: No machine is kept idle if there is an operation waiting to be processed on it.
The relationship between these sets is: Non-delay ⊂ Active ⊂ Semi-active.
The most important takeaway, as stated in the paper, is that for minimizing makespan (and other regular objectives), an optimal schedule is always an active schedule. This powerful result means we don't have to search the entire space of all possible schedules; we can restrict our search to the set of active schedules, which is significantly smaller yet guaranteed to contain the optimum. This is precisely what the Giffler-Thompson algorithm helps us do.
The Giffler-Thompson Algorithm
The Giffler-Thompson (GT) algorithm, developed in 1963, is an iterative procedure that constructs an active schedule by making one scheduling decision at a time. At each step, it identifies a point of conflict and resolves it.
Let's study the formal steps of the algorithm.
A Giffler-Thompson genetic algorithm for the static job-shop ...
The same paper provides a formal, step-by-step description of the GT algorithm. We will walk through this process together.
Continue reading on page 3 and 4, focusing on the text from 'The presentation of the Giffler-Thompson (GT) algorithm...' to the end of 'Step 5'. Pay close attention to the symbols used and the logic of each step.
Let's break down the logic of the algorithm using the notation from the paper:
-
Initialization (Step 1):
- You start with an empty partial schedule .
- The set of "schedulable" operations, , contains the first operation of every job, as none of them have predecessors.
-
Iterative Scheduling (Steps 2-5): This is a loop that continues until all operations are scheduled. In each iteration
t:- Identify the next critical event (Step 2): For every operation in the current set of schedulable operations , calculate its earliest possible start time and its earliest possible completion time . The earliest start time is determined by the completion time of its immediate job predecessor (if any) and the time the required machine becomes free. We then find the operation that could finish the earliest, and call its completion time and its machine . This represents the next moment a machine will complete a critical task.
- Form the Conflict Set (Step 3): This is the core of the algorithm. We create a set of all operations in that require machine and could start before the critical event time . This is the set of operations that are in conflict for machine .
- Make a Decision (Implicit in Step 3): The algorithm states to "Choose an operation " from this conflict set. This is the decision point. The GT algorithm itself is a framework; to implement it as a heuristic, you must use a priority rule (e.g., Shortest Processing Time, First-In-First-Out, or even randomly) to select which operation from the conflict set to schedule. If you were to explore all possible choices at each step, you would generate the entire set of active schedules.
- Update and Continue (Step 4 & 5): The chosen operation is added to the schedule. It is removed from , and its direct successor (from the same job, if one exists) is added to the set of schedulable operations, creating . The loop then repeats.
A Worked Example
Let's apply the GT algorithm to the following 3-job, 3-machine problem.

The operations are:
- Job 1: (M1, 3), (M2, 2), (M3, 2)
- Job 2: (M2, 2), (M1, 4), (M3, 1)
- Job 3: (M3, 4), (M2, 1), (M1, 3)
Let's trace the first few iterations. We will use the Shortest Processing Time (SPT) rule to make decisions when conflicts arise.
Iteration 1 (t=1):
- Schedulable Set : { , , }
- Earliest Times:
- : , on M1
- : , on M2
- : , on M3
- Critical Event (Step 2): , which belongs to on machine M2.
- Conflict Set (Step 3): We need operations in that require M2 and can start before . Only uses M2, and its start time . So, the conflict set is { }.
- Decision: There is only one choice. We schedule . Completion time .
- Update (Step 4): = { , , } (where is the successor of ).
Iteration 2 (t=2):
- Schedulable Set : { , , }
- Earliest Times:
- (M1): ,
- (M3): ,
- (M1): Its predecessor finishes at time 2. So, , .
- Critical Event (Step 2): , belonging to on machine M1.
- Conflict Set (Step 3): Operations in using M1 with .
- : uses M1, . Yes.
- : uses M1, . Yes.
- : uses M3. No.
- The conflict set is { , }.
- Decision: Now we have a choice. We apply our SPT rule.
- Processing time of is 3.
- Processing time of is 4.
- SPT selects . We schedule . Completion time .
- Update (Step 4): = { , , }.
Test your understanding!
For Iteration 3 (t=3), with the schedulable set = { , , }, what is the conflict set? Which operation would our SPT rule select?
(Machine availability: M1 is busy until time 3, M2 is busy until time 2, M3 is free.)
Show answer
-
Earliest Times for :
- (M3): , .
- (M1): Predecessor finished at 2. M1 is busy until 3 (finishing ). So . Then .
- (M2): Predecessor finished at 3. M2 is busy until 2. So . Then .
-
Critical Event: , belonging to on machine M3.
-
Conflict Set: Operations in using M3 with .
- Only uses M3, and its .
- The conflict set is { }.
-
Decision: There is only one choice. SPT would select .
The Non-Delay Variant
The GT algorithm can be slightly modified to produce non-delay schedules. As we know, this is a more restrictive subset of active schedules.
The modification, described in resource LINK, changes Step 2 and 3: instead of finding the minimum completion time , you find the minimum start time . You then choose from the operations that can start at that earliest time on the corresponding machine. This ensures no machine is ever left idle if an operation is available for it.
While this further reduces the search space, it comes with a risk: the optimal solution might not be a non-delay schedule. An active schedule may contain "beneficial" idle time, where a machine waits for a critical job to arrive, ultimately leading to a better overall makespan.

Role in Modern Metaheuristics
While the GT algorithm can be used as a standalone heuristic with a fixed priority rule, its real power in modern optimization lies in its use as a "schedule generator" or "decoder" within metaheuristics like Genetic Algorithms (GAs).
This is a key concept for your thesis work. Imagine a GA where a "chromosome" doesn't represent a full schedule, but rather a list of priorities or decisions. The GT algorithm can take this abstract representation and deterministically build a corresponding active schedule.
a-modified-giffler-and-thompson-genetic-algorithm-on-the- ...
The paper 'a-modified-giffler-and-thompson-genetic-algorithm-on-the- ...' explains this concept well. It describes a Genetic Algorithm (GT-GA) where GT is used to generate the initial population and to create offspring from parent solutions.
Skim through 'Algorithm 1: A GA using the GT crossover' on page 92. Notice how Step 1 explicitly uses the GT algorithm to construct the initial population. Then, read the 'Conclusion' section on page 105. The first sentence perfectly summarizes the benefit.
As the paper concludes, the key advantage is that "each solution is always a feasible and active schedule. Hence there is no repairing process required which can increase the efficiency of GA approach." This is a profoundly important technique in scheduling research. The complex search is handled by the metaheuristic, while the GT algorithm ensures that every candidate solution evaluated is valid and of high quality (i.e., active).
Conclusion
In this lesson, we transitioned from merely evaluating schedules to actively constructing them. The Giffler-Thompson algorithm provides a fundamental and elegant method for this task.
Key Takeaways:
- The set of active schedules is guaranteed to contain an optimal solution for makespan minimization, making it a valuable target for search algorithms.
- The Giffler-Thompson algorithm is an iterative procedure that constructs a single active schedule by resolving machine conflicts one at a time.
- At each step, the algorithm identifies a conflict set of operations competing for a machine, and a priority rule is used to select one.
- A slight modification to the algorithm generates non-delay schedules, a stricter subset that does not allow for deliberate machine idleness.
- In modern optimization, the GT algorithm is often used as a highly efficient decoder within metaheuristics (like Genetic Algorithms) to translate an abstract solution representation into a valid, active schedule.
Preview of the Next Lesson:
Having established a strong foundation in the classic Job Shop Problem—from its disjunctive graph representation and makespan calculation to the GT construction algorithm—we are now fully prepared to tackle the central topic of your thesis. In the next module, we will introduce the Flexible Job Shop Problem (FJSP). We will define this more complex environment and explore how the additional flexibility of machine choice transforms both the modeling and solution challenges.