LLM-Driven Dynamic Patching and Large-Scale Reoptimization Framework for Operations Research Models

This paper proposes a large language model (LLM)-driven agent-based reoptimization framework designed to address the frequent failure of operations research models in industrial settings caused by evolving business rules or sudden disturbances. Instead of relying on human OR experts to manually adjust models, the framework empowers an LLM to assume the role of an optimization specialist: it receives user instructions in natural language, transforms them into structured model patches, and automatically invokes appropriate reoptimization strategies from an integrated optimization toolkit. The toolkit consolidates prior knowledge including historical optimal solutions, valid inequalities, solver configuration parameters, and metaheuristic algorithms to accelerate the reoptimization process while preserving solution quality. Experiments on two large-scale real-world cases—dynamic online supply chain scheduling and offline university examination timetabling—demonstrate that the framework significantly improves reoptimization efficiency. Moreover, the patch-based structured update mechanism enhances the interpretability and traceability of model modifications, thereby reducing reliance on domain experts and strengthening the robustness and sustainability of decision support systems.

Background and Context

In industrial applications, optimization models meticulously constructed by operations research (OR) experts are frequently deployed as critical decision support systems. However, the real-world environment is highly dynamic, characterized by evolving business rules and the sudden emergence of previously ignored constraints or unforeseen disturbances. When existing models fail to provide feasible and implementable solutions, end-users face significant operational challenges. Traditional resolution methods rely heavily on manual debugging and re-modeling by OR experts, a process that is not only time-consuming and labor-intensive but also lacks the responsiveness required for real-time demands.

To address this critical pain point, this study introduces an innovative agent-based reoptimization framework. The core contribution lies in leveraging large language models (LLMs) as intelligent agents endowed with OR expertise, enabling seamless interaction with end-users through natural language. The LLM interprets unstructured user instructions, transforms them into structured updates for the underlying optimization model, and automatically selects the most suitable reoptimization strategy. This mechanism facilitates continuous, interactive adaptation of optimization models while significantly reducing dependency on specialized OR experts, offering a new technical pathway for the long-term sustainability of decision support systems.

Deep Analysis

Technically, the framework employs a hierarchical collaborative architecture. The LLM serves as the front-end interaction layer, parsing natural language prompts to identify implicit constraint changes or objective adjustments, mapping them into specific mathematical model modification instructions presented as structured patches. This ensures precision and logical consistency in model modifications. Central to the reoptimization process is an integrated optimization toolkit, which functions as an intelligent library rather than a mere solver interface. It consolidates prior knowledge, including primal information such as historical optimal solutions, validated valid inequalities, solver configuration parameters, and metaheuristic algorithms. Upon receiving model patches from the LLM, the toolkit automatically selects the most appropriate reoptimization technique based on the problem's characteristics. For instance, in scenarios requiring rapid response, it prioritizes initialization strategies based on historical solutions; for high-quality solution requirements, it engages complex metaheuristic searches. This prior-knowledge-driven approach accelerates convergence while preserving solution quality, avoiding the substantial computational overhead of solving from scratch.

To validate the framework's effectiveness and scalability, extensive experiments were conducted on two complementary large-scale real-world cases. The first case focused on dynamic online supply chain scheduling, a time-sensitive scenario where solutions must be generated quickly and remain close to the original deployed plan to minimize operational disruption. Results demonstrated that toolkit-driven, primal-information-based reoptimization significantly improved computational efficiency while maintaining solution proximity. The second case involved offline university examination timetabling, a scenario demanding high solution quality with relatively relaxed time constraints. Here, the focus was on optimization capability under complex constraints. The experiments showed that patch-based structured updates not only enhanced the interpretability and traceability of model modifications but also improved final scheduling quality through more precise adjustments. Ablation studies confirmed that removing prior information from the toolkit or using unstructured model updates led to significant performance degradation, validating the critical role of the proposed technical components.

Industry Impact

From an industry perspective, this research has profound implications for the intersection of operations research and artificial intelligence. It drives the transition of optimization systems from static deployment to dynamic adaptability, allowing industries to respond more flexibly to uncertainty. By providing a natural language interface via LLMs, the framework lowers the barrier to entry for OR technology, enabling non-expert users to participate in model adjustment and optimization, thereby promoting the democratization of technology. For the open-source community, the toolkit and patch mechanism provide a reusable infrastructure for subsequent research. In terms of industrial implementation, decision support systems capable of continuously adapting to environmental changes will significantly enhance enterprise operational efficiency and risk resistance. The structured update mechanism ensures that model modifications are interpretable and traceable, which is crucial for regulatory compliance and audit trails in sensitive industries such as finance and logistics.

The reduction in reliance on domain experts represents a significant cost-saving and efficiency-enhancing measure for organizations. By automating the translation of business rule changes into technical model patches, the framework bridges the gap between business stakeholders and technical implementation teams. This synergy allows business users to express their needs in familiar language, while the system handles the complex mathematical translation and optimization. Furthermore, the integration of historical data and metaheuristics ensures that the system learns from past successes, continuously improving its performance over time. This creates a self-improving loop where the decision support system becomes more robust and accurate with each iteration, providing a competitive advantage in fast-moving markets.

Outlook

Looking ahead, as LLM capabilities continue to advance and optimization toolkits become more sophisticated, such frameworks are expected to find broader applications across logistics, energy, and manufacturing sectors. The potential for integrating these systems with real-time data streams from IoT devices and enterprise resource planning (ERP) systems offers exciting possibilities for predictive and prescriptive analytics. Future research may explore the integration of reinforcement learning to further optimize the selection of reoptimization strategies based on continuous feedback loops. Additionally, enhancing the security and robustness of LLM-driven models against adversarial inputs will be a critical area of focus. As industries increasingly adopt AI-driven decision support systems, the ability to dynamically adapt to changing conditions will become a key differentiator. This framework provides a foundational step toward creating truly intelligent, adaptive, and resilient operational systems that can navigate the complexities of the modern business landscape with greater agility and precision.

The long-term sustainability of these systems will depend on the continuous refinement of the underlying algorithms and the expansion of the knowledge base within the optimization toolkit. As more data becomes available, the system's ability to predict potential disruptions and pre-emptively adjust models will improve. This proactive approach to optimization will minimize downtime and maximize resource utilization. Moreover, the framework's modular design allows for easy integration of new optimization techniques and solvers as they emerge, ensuring that the system remains at the cutting edge of technological advancement. The democratization of OR through LLMs will also foster a more inclusive innovation ecosystem, where diverse perspectives and expertise can contribute to solving complex operational challenges. Ultimately, this technology has the potential to transform how organizations approach decision-making, shifting from reactive problem-solving to proactive strategic planning.