🧩 Constraint Solving POTD:Problem of the Day: Job-Shop Scheduling #55062
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by Constraint Solving — Problem of the Day. A newer discussion is available at Discussion #55368. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem Statement
Job-Shop Scheduling is a classic scheduling problem where you must execute a fixed set of jobs on a set of machines, subject to two constraints:
jconsists of an ordered sequence of tasks that must execute on different machines in a fixed order.Goal: Find a schedule (assignment of start times to all tasks) that minimizes makespan (the time when all jobs are complete).
Concrete Instance (3-job, 3-machine example)
Input: Processing times
p[j][i], job precedence chains.Output: Start times
s[j][i]for each job-task, minimizingmax(s[j][i] + p[j][i]).Why It Matters
Manufacturing: Job-shop models production planning in factories where different products must visit machines in different orders. A bad schedule wastes time and capacity; a good one can reduce production time by 20–40%.
Project management: Multi-phase projects with dependencies and shared resources (equipment, personnel) can be modeled as job-shop variants.
Data centers: Batch job scheduling across heterogeneous computational resources resembles job-shop structure, especially with precedence constraints.
Modeling Approaches
Approach 1: Disjunctive Constraint Programming
Decision variables:
s[j][i]= start time of taskiin jobj(integer, ≥ 0)C= makespan (objective to minimize)Constraints (pseudo-code):
Strengths: Concise formulation; global constraints (
cumulative,disjunctive) propagate powerfully.Trade-off: Disjunctive constraints are NP-hard to propagate; solvers branch on disjunctions, potentially creating many search nodes.
Example (MiniZinc-style pseudo-code)
Approach 2: Mixed-Integer Linear Programming (MIP)
Decision variables:
s[j][i]= start time of task(j,i)(continuous or integer)x[j1,i1,j2,i2]= binary: 1 iff task(j1,i1)starts before(j2,i2)on the same machineConstraints:
Strengths: Standard MIP solvers (CPLEX, Gurobi) apply cutting planes and heuristics; scales to large instances when M is tight.
Trade-off: Big-M constant adds tightness issues; relaxation gap can be poor without careful tuning; fewer global constraints than CP.
Key Techniques
1. Constraint Propagation & Arc Consistency
Job-shop solvers use edge-finding and not-first/not-last algorithms to infer that a task cannot start within a certain time window. For instance, if task
(j2,i2)cannot complete before timet, then all tasks requiring the same machine and starting beforetare infeasible.2. Branching on Disjunctions
Rather than enumerate task orderings, solvers branch on the disjunctive constraint: assume one task precedes another and propagate. This refines the search space without explicitly considering all permutations.
3. Symmetry-Breaking & Dominance
Job-shop instances have symmetric permutations of job order on each machine. Posting symmetry-breaking constraints (e.g., lexicographic orderings) or detecting dominated solutions can prune vast search regions.
Challenge Corner
Open Questions:
Variable reduction: The classical disjunctive formulation has one variable per (job, task). Can you reformulate using only one variable per job (e.g., a job-completion time) and recover the task-level schedule?
Makespan lower bound: The makespan is at least the length of the longest job sequence and the maximum machine load. Can you tighten this bound using Lagrangian relaxation or LP?
Online variant: What if new jobs arrive during execution? How would you design a re-optimization strategy that minimizes disruption to the current schedule?
References
Pinedo, M. (2016). Scheduling: Theory, Algorithms, and Systems (5th ed.). Springer. — Comprehensive textbook covering job-shop fundamentals, algorithms, and complexity.
Carlier, J., & Pinson, E. (1989). "An algorithm for solving the job-shop problem." Management Science, 35(2), 164–176. — Seminal paper on edge-finding algorithms for propagation.
Baptiste, P., Pape, C. Le, & Nuijten, W. (2001). Constraint-Based Scheduling. Kluwer Academic Publishers. — CP perspective with global constraints and search strategies.
OR-Tools Routing Guide (Google). (developers.google.com/redacted) — Practical solver examples and model templates.
All reactions