Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 24

Disjunctive Graphs for Job Shop Problems

Recommended resources

Hello! Welcome back to your course on scheduling.

In our last lesson, we defined the Job Shop Scheduling Problem (JSSP). We established its core feature: unlike a flow shop where all jobs follow the same path, in a job shop, each job has its own unique, predetermined processing route. This flexibility makes the JSSP significantly more complex to model and solve.

To tackle this complexity, we need a more powerful tool than a simple list or Gantt chart. This brings us to today's topic, which is fundamental to modern scheduling theory and directly relevant to your thesis work on the Flexible Job Shop Problem.

This lesson focuses on the learning outcome: Construct and interpret a disjunctive graph representation of a job shop problem. By the end of our session, you will be able to translate a job shop problem into this graphical format and understand how the graph represents both the problem's constraints and its potential solutions.

Why Do We Need a Special Graph?

The challenge of the JSSP lies in the dual nature of its constraints:

  1. Precedence Constraints: Operations within a single job must follow a strict sequence (e.g., drilling must happen before painting).
  2. Resource Constraints: A machine can only process one operation at a time. If two different jobs need the same machine, one must wait for the other.

A disjunctive graph is a model that elegantly captures both types of constraints simultaneously. It provides a complete representation of the entire problem, not just a single potential schedule.


Anatomy of a Disjunctive Graph

The best way to understand the disjunctive graph is by studying its components. We'll use a formal definition and then break it down with a practical example.

6.1. The Job-Shop Problem, the disjunctive model and ...

The article '6.1. The Job-Shop Problem, the disjunctive model and ...' from the Google OR-Tools documentation provides an excellent introduction to the disjunctive graph. We will focus on its structure and meaning.

Please read the section titled '6.1.2. The disjunctive graph'. Pay close attention to the definitions of the graph's components: nodes, conjunctive arcs, and disjunctive arcs. The section uses a 3-job, 3-machine example that we will build upon.

Based on your reading, let's summarize the key components of a disjunctive graph :

  • Nodes (V):

    • Each operation of each job is represented by a node.
    • We add two special, fictitious nodes: a source node s (or 0) representing the start of the schedule, and a sink node t (or *) representing the end.
    • Each operation node has a "weight" equal to its processing time. The source and sink nodes have a weight of 0.
  • Conjunctive Arcs (C):

    • These are directed arcs (solid lines) that connect consecutive operations of the same job.
    • They represent the fixed technological routing or precedence constraints. For example, if Job 1 requires OpA then OpB, we add a directed arc OpA -> OpB.
    • These are called "conjunctive" because all of these precedence relations must be respected in any valid schedule.
  • Disjunctive Arcs (D):

    • These are pairs of directed arcs (often drawn as a single dashed or colored line for simplicity) that connect all operations that must be processed on the same machine.
    • For any two operations i and j that need the same machine, we have a disjunction: either i is processed before j (represented by arc i -> j), or j is processed before i (represented by arc j -> i).
    • These are "disjunctive" because for each pair, we must choose one of the two possible orderings to create a valid schedule.

Constructing a Disjunctive Graph: A Step-by-Step Example

Let's solidify this by building a disjunctive graph for the 3-job, 3-machine problem described in the reading material.

Problem Data:

  • Job 0: (M0, p=3) -> (M1, p=2) -> (M2, p=2)
  • Job 1: (M0, p=2) -> (M2, p=1) -> (M1, p=4)
  • Job 2: (M1, p=4) -> (M2, p=3)

Let's denote the k-th operation of job j as .

Step 1: Create Nodes
Create a node for each operation, plus the source (s) and sink (t).

  • Job 0: , ,
  • Job 1: , ,
  • Job 2: ,

Step 2: Add Conjunctive Arcs
Connect the operations for each job in their specified sequence. Also, connect the source s to the first operation of each job, and the last operation of each job to the sink t.

  • Job 0: s -> O_00 -> O_01 -> O_02 -> t
  • Job 1: s -> O_10 -> O_11 -> O_12 -> t
  • Job 2: s -> O_20 -> O_21 -> t

Step 3: Add Disjunctive Arcs
Connect all operations that share a machine.

  • Machine 0: and are connected.
  • Machine 1: , , and are all connected to each other, forming a "clique" of 3 operations.
  • Machine 2: , , and form another clique.

The resulting graph should look exactly like the one in the resource you reviewed.

Disjunctive Graph for Job Shop Scheduling
A disjunctive graph for the 3-job, 3-machine example. The nodes are labeled `(machine, processing_time)`. Solid black arrows are conjunctive arcs, representing job precedence. Dashed lines (red, blue, green) are disjunctive arcs, connecting operations that share a machine.

Interpreting the Graph: From Problem to Solution

The disjunctive graph represents the problem. So, how does it represent a solution?

A solution to the JSSP is found by making a decision for every disjunctive arc. For each pair of operations on the same machine, you must choose their processing order. This is equivalent to selecting one direction for each disjunctive arc.

For example, on Machine 0, you must decide whether to schedule Job 0 before Job 1 (O_00 -> O_10) or Job 1 before Job 0 (O_10 -> O_00). When you have made a choice for every pair on every machine, you have a complete schedule.

A feasible schedule corresponds to a selection of disjunctive arcs that results in a Directed Acyclic Graph (DAG). If your choices create a cycle (e.g., A -> B on a machine, but B's successor must precede A's predecessor), the schedule is impossible.

Once you have a feasible schedule (a DAG), you can determine the makespan (). The makespan is simply the length of the longest path from the source s to the sink t. This path is called the critical path, as any delay to an operation on this path will delay the entire schedule.

The length of a path is calculated by summing the processing times (node weights) of all operations along that path.

The image below shows the same graph after all disjunctive choices have been made. The disjunctive arcs are now directed, and the critical path, which determines the makespan, is highlighted.

Disjunctive Graph for Job Shop Scheduling
A feasible schedule represented as a directed acyclic graph. The disjunctive arcs have been given a direction, and the critical path is shown in bold. The length of this path (sum of processing times of its nodes) equals the makespan of the schedule.
Test your understanding!

Consider a simple 2-job, 2-machine JSSP:

  • Job 1: M1 (p=5) -> M2 (p=3)
  • Job 2: M2 (p=2) -> M1 (p=4)
  1. How many operation nodes (excluding source and sink) will the disjunctive graph have?
  2. Describe the conjunctive arcs for Job 1.
  3. Which operations will be connected by disjunctive arcs?
Show answer
  1. There will be 4 operation nodes: two for Job 1 and two for Job 2.
  2. The conjunctive arcs for Job 1 will be: s -> O_11(M1,5), O_11(M1,5) -> O_12(M2,3), and O_12(M2,3) -> t.
  3. Disjunctive arcs will connect operations on the same machine:
    • Machine 1: An arc between (Job 1, M1) and (Job 2, M1).
    • Machine 2: An arc between (Job 1, M2) and (Job 2, M2).

Conclusion

In this lesson, you have learned how to model a Job Shop Scheduling Problem using a disjunctive graph. This powerful representation is a cornerstone of scheduling research because it captures the problem's inherent structure—the interplay between precedence and resource constraints.

Key Takeaways:

  • A disjunctive graph models a JSSP with nodes for operations, conjunctive arcs for job precedence, and disjunctive arcs for machine resource conflicts.
  • Constructing the graph involves creating nodes for operations, adding directed conjunctive arcs for job routes, and adding undirected disjunctive arcs for shared machines.
  • Solving the JSSP is equivalent to converting the disjunctive graph into a directed acyclic graph (DAG) by choosing a direction for each disjunctive arc.
  • The makespan () of a given schedule is the length of the longest path (critical path) from source to sink in the corresponding DAG.

Preview of the Next Lesson:

Now that we can represent a schedule and calculate its makespan using the graph, the next logical step is to formalize this calculation. In the next lesson, you will learn how to calculate the makespan as the longest path in a disjunctive graph. We will explore the critical path method algorithm, which is an efficient way to find this longest path and determine the earliest start times for all operations in a fixed schedule. This is a crucial building block for nearly all advanced scheduling algorithms.