Automatic programming via large language models with population self-evolution for dynamic job shop scheduling problem

Jin Huang, Xinyu Li, Liang Gao, Qihao Liu, Yue Teng · DOI

Abstract

This paper introduces SeEvo (Population Self-Evolutionary), a novel framework that leverages Large Language Models (LLMs) to automatically generate and refine heuristic dispatching rules (HDRs) for the Dynamic Job Shop Scheduling Problem (DJSSP). By treating the LLM as both a programmer and a critic within an evolutionary loop, SeEvo employs a three-tier reflection mechanism—individual co-evolution, individual self-evolution, and collective evolution—to guide the search for optimal scheduling logic. Experimental results on standard benchmarks demonstrate that SeEvo significantly outperforms traditional genetic programming and state-of-the-art deep reinforcement learning methods, exhibiting superior generalization and efficiency in complex, real-world factory environments.

The Challenge of Dynamic Job Shop Scheduling

In a modern "Job Shop," multiple machines process various jobs, each with a unique sequence of operations. The Dynamic Job Shop Scheduling Problem (DJSSP) introduces real-time complexities such as unexpected order arrivals and machine breakdowns. Finding an optimal schedule is an NP-hard problem, making it computationally prohibitive to solve perfectly in real-time.

Historically, engineers relied on Heuristic Dispatching Rules (HDRs)—simple logic like "Shortest Processing Time" (SPT)—to make rapid decisions. However, these hand-crafted rules often fail to generalize across different factory layouts. While automated methods like Genetic Programming (GP) and Deep Reinforcement Learning (DRL) have been explored, GP can be slow and random, while DRL often struggles with training stability and performance against basic heuristics.

SeEvo: A Self-Evolutionary Framework

SeEvo addresses these limitations by using LLMs (such as GPT-3.5 and GLM-3) to evolve a population of scheduling rules. Unlike traditional evolutionary algorithms that rely on random code mutations, SeEvo utilizes "language gradients"—textual feedback that provides semantic guidance for the search process.

The SeEvo framework's self-evolutionary process, highlighting the three-tier reflection mechanism and evolutionary stages.

The core innovation of SeEvo is its three-tier reflection mechanism:

  1. Individual Co-Evolution Reflection: The LLM compares two different rules, analyzes performance discrepancies, and suggests improvements.
  2. Individual Self-Evolution Reflection: The LLM evaluates its own previous iterations to generate "reverse prompts," preventing the repetition of past errors.
  3. Collective Evolution Reflection: The LLM synthesizes insights from the entire population to steer the overall search direction.

By separating the "thinking" (LLM-driven logic generation) from the "executing" (running Python code in a simulation), SeEvo overcomes the mathematical and context-window limitations typically associated with LLMs.

Experimental Evaluation and Results

The authors evaluated SeEvo using classic industry benchmarks, including the Taillard (TA) and Demirkol (DMU) datasets, alongside custom dynamic scenarios with random job arrivals.

Comparison of Gap Ratios across various scheduling methods, showing SeEvo's superior performance.

Key findings from the experiments include:

  • Superior Performance: SeEvo variants consistently outperformed traditional GP and Gene Expression Programming (GEP). In the TA benchmark, SeEvo (using GLM-3) beat state-of-the-art DRL methods in 14 out of 16 cases.
  • Dynamic Efficiency: In scenarios with random job arrivals, SeEvo maintained a "Gap Ratio" (the distance from the theoretical optimal) of under 10%, significantly lower than standard industry heuristics.
  • Zero-Shot Generalization: Rules evolved on small, simple cases performed exceptionally well on much larger, unseen cases, suggesting that the LLM captures fundamental scheduling principles rather than just over-fitting to specific data.
  • Operational Speed: For complex problems (e.g., 50 jobs and 15 machines), the framework generated high-quality solutions in under 30 seconds.

Conclusion and Future Work

SeEvo demonstrates that LLMs can serve as powerful hyper-heuristics for complex industrial optimization. While currently reliant on external APIs, the framework shows immense promise for automated factory management. Future research will explore the use of "ensembles"—combinations of multiple rules that adapt as factory states change—and the integration of vector databases to enhance the LLM's long-term memory of successful strategies.

Summary updated

BibTeX
@misc{huang2024automatic,
  author = {Jin Huang and Xinyu Li and Liang Gao and Qihao Liu and Yue Teng},
  title = {{Automatic programming via large language models with population self-evolution for dynamic job shop scheduling problem}},
  year = {2024},
  eprint = {2410.22657},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.22657},
}
Figure