Offline reinforcement learning for job-shop scheduling problems

Imanol Echeverria, Maialen Murua, Roberto Santana · DOI

Introduction

The Job-Shop Scheduling Problem (JSSP) and its flexible variant (FJSSP) are fundamental challenges in manufacturing and logistics. These problems involve the optimal assignment of tasks (operations) to specific machines while adhering to strict sequence and resource constraints. The primary objective is typically to minimize the makespan—the total time required to complete all tasks.

A Gantt chart representation of a Job-Shop Scheduling Problem (JSSP) solution, showing the assignment of operations to machines over time.

Traditional exact solvers often lack the speed required for real-time adjustments, while standard Deep Reinforcement Learning (DRL) approaches suffer from low sample efficiency. Behavioral Cloning (BC) offers a faster alternative but lacks robustness when encountering out-of-distribution states. This paper introduces H-ORL, a hybrid offline reinforcement learning method that leverages pre-collected datasets of both expert and sub-optimal solutions to bridge the gap between efficiency and generalization.

Methodology

The proposed H-ORL (Heterogeneous Offline Reinforcement Learning) framework is built upon a heterogeneous graph representation of the scheduling environment. Unlike flat vector inputs, this graph structure captures the complex dependencies between jobs, operations, and machines.

Overview of the H-ORL architecture, featuring a heterogeneous graph representation processed by a Transformer Network to drive actor and critic outputs.

The architecture employs a Heterogeneous Graph Transformer (HGT) network to process these relationships. The learning algorithm is based on Twin Delayed Deep Deterministic Policy Gradient (TD3), modified with a Behavioral Cloning (BC) term in the loss function. This hybrid loss encourages the agent to mimic expert behavior while optimizing for the actual reward (makespan reduction). Furthermore, the framework handles variable action spaces by encoding machine-job assignments as edge attributes, allowing the model to scale to different problem sizes seamlessly.

Experimental Setup

The model was trained on 1,000 synthetic instances generated via OR-Tools. Evaluation was conducted on several standard benchmarks:

  • JSSP: Taillard benchmark (80 instances, ranging from 15x15 to 100x20).
  • FJSSP: Public datasets including Brandimarte, Hurink (vdata, edata, rdata), and Dauzère-Pérès and Paulli.

To enhance robustness, the training data included sub-optimal and random experiences, teaching the agent how to recover from non-ideal states and navigate messy, real-world scenarios.

Key Results and Discussion

H-ORL demonstrates state-of-the-art performance, particularly in large-scale scenarios. On the largest JSSP instances (100 jobs x 20 machines), H-ORL achieved an average optimal gap of only 1.63%, significantly outperforming competing DRL methods which ranged from 2.31% to 8.91%.

Key insights from the study include:

  • Balanced Loss: A lambda value of 0.5, balancing reward and imitation equally, provided the best performance. Pure imitation plateaued quickly, while pure RL struggled with the massive search space.
  • Zero-Shot Scaling: Models trained on small instances generalized effectively to problems with up to 100 machines without additional training, suggesting the graph-based approach captures the underlying logic of scheduling.
  • Real-time Inference: Despite the graph-based complexity, the model solves large-scale problems in seconds, making it suitable for industrial deployment.

Conclusion

H-ORL represents a significant advancement in applying offline RL to combinatorial optimization. By combining the strengths of DRL and BC within a heterogeneous graph framework, it achieves high efficiency and robustness. While currently focused on makespan minimization, future work could extend the framework to handle multi-objective optimization (e.g., energy efficiency, tardiness) and more complex real-world constraints like machine maintenance schedules.

Summary updated

BibTeX
@article{echeverria2025offline,
  author = {Imanol Echeverria and Maialen Murua and Roberto Santana},
  title = {{Offline reinforcement learning for job-shop scheduling problems}},
  journal = {Applied Soft Computing},
  year = {2025},
  doi = {10.1016/j.asoc.2025.113736},
}
Figure