Optimization problems are pervasive in sectors from manufacturing and distribution to healthcare. However, most such problems are still solved heuristically by hand rather than optimally by state-of-the-art solvers because the expertise required to formulate and solve these problems limits the widespread adoption of optimization tools and techniques. This paper introduces OptiMUS, a Large Language Model (LLM)-based agent designed to formulate and solve (mixed integer) linear programming problems from their natural language descriptions. OptiMUS can develop mathematical models, write and debug solver code, evaluate the generated solutions, and improve its model and code based on these evaluations. OptiMUS utilizes a modular structure to process problems, allowing it to handle problems with long descriptions and complex data without long prompts. Experiments demonstrate that OptiMUS outperforms existing state-of-the-art methods on easy datasets by more than $20\%$ and on hard datasets (including a new dataset, NLP4LP, released with this paper that features long and complex problems) by more than $30\%$.
翻译:优化问题在从制造、物流到医疗等众多领域中普遍存在。然而,大多数此类问题仍通过人工启发式方法解决,而非借助最先进的求解器实现最优求解,其原因在于建模与求解这些过程所需的专业知识限制了优化工具和技术的广泛采用。本文介绍了OptiMUS——一种基于大语言模型(LLM)的智能体,旨在根据自然语言描述来建模并求解(混合整数)线性规划问题。OptiMUS能够构建数学模型、编写并调试求解器代码、评估生成的解,并基于评估结果改进其模型与代码。OptiMUS采用模块化结构处理问题,使其能够处理包含长描述和复杂数据的问题,而无需冗长的提示。实验表明,在简单数据集上,OptiMUS的性能比现有最先进方法提升超过20%;在复杂数据集(包括本文发布的新数据集NLP4LP,该数据集包含长篇幅和复杂问题)上,性能提升超过30%。