Towards a Unified Model for Flexible Job Shop Scheduling Problems
Abstract
Deep learning-based heuristics have attracted significant attention for solving the Flexible Job Shop Scheduling Problem (FJSSP). However, existing studies typically overlook operational constraints prevalent in real-world industry or target only a specific FJSSP variant, limiting their practical applicability. To address these limitations, we introduce SchedFormer, a generalist agent capable of solving FJSSPs with diverse constraints in a zero-shot manner. Concretely, to handle a range of variants in the same manner, we propose a Unified State Representation (USR) that 1) maps different types of constraints into a single feature and 2) captures the invariant machine-operation relationships across variants via four distinct graphs. These designs make the model readily generalizable to unseen variants without model redesign or retraining. We further develop a unified neural solver that uses graph-specific Transformer blocks to effectively encode the USR. Each block employs an attention mechanism specialized for its target graph, with the mapped constraint information conditioning the overall representation learning. Extensive experiments on 16 FJSSP variants show that SchedFormer considerably outperforms competitors, including specialized neural solvers, and generalizes strongly to unseen variants, instance sizes, and data distributions. We further show excellent adaptability of SchedFormer to other scheduling problems.