如何在 Python 的线性规划中找到变量的可能值范围?

How to find possible values bounds of a variable in linear programming with Python?

我有一个由一些变量和线性约束定义的线性问题,我想知道每个变量的可能取值区间。

例如,对于变量 abc,以及约束 a>bb>ca+b+c=100,我们有:

a in [33.33-100] b in [0-50] c in [0-33.33]

目前,我的解决方案是使用 Pulp 的线性规划求解器,并将每个变量设置为优化函数以最大化,得到上限,然后最小化得到其下限绑定。

这让我对每个变量重复求解步骤两次,这可能不是最优的。

有人知道专门用于查找线性规划变量可能解区间的工具吗?

这是一个很常见的话题,通常称为bounds-tightening,在以下方面非常重要:

  • 静态预求解
  • 全局优化中的迭代使用

您描述的算法通常称为基于优化的边界紧缩,而且还不错。您遇到的问题是,pulp 不允许您采取更低级别的操作,并且使用 warm-starts 不需要在每个 运行 中进行全部迭代。

Gleixner, Ambros M., et al. "Three enhancements for optimization-based bound tightening." Journal of Global Optimization 67.4 (2017): 731-757. 例如开头为:

Optimization-based bound tightening (OBBT) is one of the most effective procedures to reduce variable domains of nonconvex mixed-integer nonlinear programs (MINLPs). At the same time it is one of the most expensive bound tightening procedures, since it solves auxiliary linear programs (LPs)—up to twice the number of variables many. The main goal of this paper is to discuss algorithmic techniques for an efficient implementation of OBBT.

有非 LP 技术(例如区间算术)替代方案,例如 基于可行性的边界收紧

参见示例:

  • Belotti, Pietro, et al. "Feasibility-based bounds tightening via fixed points." International Conference on Combinatorial Optimization and Applications. Springer, Berlin, Heidelberg, 2010.

您现在知道一些要搜索的关键字了。也许以下是一个好的开始(虽然没有阅读):

  • Puranik, Yash, and Nikolaos V. Sahinidis. "Domain reduction techniques for global NLP and MINLP optimization." Constraints 22.3 (2017): 338-376.