Table of Contents
Fetching ...

Automated Conversion of Static to Dynamic Scheduler via Natural Language

Paul Mingzheng Tang, Kenji Kah Hoe Leong, Nowshad Shaik, Hoong Chuin Lau

TL;DR

This work introduces RAGDyS, a Retrieval-Augmented Generation framework that automates converting static CSP-based scheduling models into dynamic ones using natural language descriptions. By formalizing dynamic changes as a minimum perturbation problem with a distance bound $d_x \le T$ and leveraging LLM planning and coding agents, RAGDyS outputs modified code that reflects new constraints with minimal disruption to the original schedule. The method employs a three-stage pipeline (planning, coding, execution) underpinned by a vector-based retrieval system (ChromaDB with embeddings $\text{all-MiniLM-L6-v2}$) and a code-fixing loop that consults solver documentation to address errors. Experimental results show GPT-4-based coding outperforms alternatives (e.g., Claude Haiku) with roughly 90% automatic match rates on test sets, while manual analysis reveals failure modes such as parameter hallucination and reasoning errors, informing future prompt optimization and broader problem applicability. Overall, the approach demonstrates practical potential to empower non-experts to adapt static schedules to dynamic conditions rapidly, with near-original solutions in many cases.

Abstract

In this paper, we explore the potential application of Large Language Models (LLMs) that will automatically model constraints and generate code for dynamic scheduling problems given an existing static model. Static scheduling problems are modelled and coded by optimization experts. These models may be easily obsoleted as the underlying constraints may need to be fine-tuned in order to reflect changes in the scheduling rules. Furthermore, it may be necessary to turn a static model into a dynamic one in order to cope with disturbances in the environment. In this paper, we propose a Retrieval-Augmented Generation (RAG) based LLM model to automate the process of implementing constraints for Dynamic Scheduling (RAGDyS), without seeking help from an optimization modeling expert. Our framework aims to minimize technical complexities related to mathematical modelling and computational workload for end-users, thereby allowing end-users to quickly obtain a new schedule close to the original schedule with changes reflected by natural language constraint descriptions.

Automated Conversion of Static to Dynamic Scheduler via Natural Language

TL;DR

This work introduces RAGDyS, a Retrieval-Augmented Generation framework that automates converting static CSP-based scheduling models into dynamic ones using natural language descriptions. By formalizing dynamic changes as a minimum perturbation problem with a distance bound and leveraging LLM planning and coding agents, RAGDyS outputs modified code that reflects new constraints with minimal disruption to the original schedule. The method employs a three-stage pipeline (planning, coding, execution) underpinned by a vector-based retrieval system (ChromaDB with embeddings ) and a code-fixing loop that consults solver documentation to address errors. Experimental results show GPT-4-based coding outperforms alternatives (e.g., Claude Haiku) with roughly 90% automatic match rates on test sets, while manual analysis reveals failure modes such as parameter hallucination and reasoning errors, informing future prompt optimization and broader problem applicability. Overall, the approach demonstrates practical potential to empower non-experts to adapt static schedules to dynamic conditions rapidly, with near-original solutions in many cases.

Abstract

In this paper, we explore the potential application of Large Language Models (LLMs) that will automatically model constraints and generate code for dynamic scheduling problems given an existing static model. Static scheduling problems are modelled and coded by optimization experts. These models may be easily obsoleted as the underlying constraints may need to be fine-tuned in order to reflect changes in the scheduling rules. Furthermore, it may be necessary to turn a static model into a dynamic one in order to cope with disturbances in the environment. In this paper, we propose a Retrieval-Augmented Generation (RAG) based LLM model to automate the process of implementing constraints for Dynamic Scheduling (RAGDyS), without seeking help from an optimization modeling expert. Our framework aims to minimize technical complexities related to mathematical modelling and computational workload for end-users, thereby allowing end-users to quickly obtain a new schedule close to the original schedule with changes reflected by natural language constraint descriptions.
Paper Structure (37 sections, 22 equations, 10 figures, 3 tables)

This paper contains 37 sections, 22 equations, 10 figures, 3 tables.

Figures (10)

  • Figure 1: Overview of our approach.
  • Figure 2: Planning Stage Details.
  • Figure 3: Coding Stage Details.
  • Figure 4: Code-fixing stage Details.
  • Figure 5: LLM paraphrasing for dataset generation
  • ...and 5 more figures