In this study, we introduce an innovative deep learning framework that employs a transformer model to address the challenges of mixed-integer programs, specifically focusing on the Capacitated Lot Sizing Problem (CLSP). Our approach, to our knowledge, is the first to utilize transformers to predict the binary variables of a mixed-integer programming (MIP) problem. Specifically, our approach harnesses the encoder decoder transformer's ability to process sequential data, making it well-suited for predicting binary variables indicating production setup decisions in each period of the CLSP. This problem is inherently dynamic, and we need to handle sequential decision making under constraints. We present an efficient algorithm in which CLSP solutions are learned through a transformer neural network. The proposed post-processed transformer algorithm surpasses the state-of-the-art solver, CPLEX and Long Short-Term Memory (LSTM) in solution time, optimal gap, and percent infeasibility over 240K benchmark CLSP instances tested. After the ML model is trained, conducting inference on the model, including post-processing, reduces the MIP into a linear program (LP). This transforms the ML-based algorithm, combined with an LP solver, into a polynomial-time approximation algorithm to solve a well-known NP-Hard problem, with almost perfect solution quality.
翻译:本研究提出了一种创新的深度学习框架,采用Transformer模型解决混合整数规划中的挑战,重点聚焦于含容量约束的批量问题(CLSP)。据我们所知,本方法是首个利用Transformer预测混合整数规划(MIP)二进制变量的研究。具体而言,该方法利用编码器-解码器Transformer处理序列数据的能力,使其特别适用于预测CLSP每个时段中表示生产设置决策的二进制变量。该问题本质上是动态的,需要处理约束条件下的序列决策。我们提出了一种高效算法,通过Transformer神经网络学习CLSP解决方案。所提出的后处理Transformer算法在24万个基准CLSP实例的测试中,在求解时间、最优间隙和不可行百分比方面均超越了最先进的求解器CPLEX及长短期记忆网络(LSTM)。机器学习模型训练完成后,对模型进行推理(包括后处理)可将MIP简化为线性规划问题。这使得基于该ML算法与线性规划求解器相结合的方法,转化为一个多项式时间近似算法,能够以近乎完美的求解质量解决著名的NP困难问题。