【发布时间】:2019-06-26 14:46:24
【问题描述】:
我正在使用 IBM CPLEX python 的 API 来求解线性程序。
我正在求解的线性程序被证明是不可行的,所以我使用 CPLEX 的 feasopt() 来缓解这个问题。
我可以通过my_prob.feasopt(my_prob.feasopt.all_constraints())得到一个可行的解决方案,其中 feasopt 放宽了所有的限制。
但我有兴趣获得每个约束的松弛量。特别是,在文档中它说In addition to that conventional solution vector, FeasOpt also produces a vector of values that provide useful information about infeasible constraints and variables.
我有兴趣得到这个向量。
【问题讨论】:
-
这个问题是在 IBM developerWorks 论坛 here 上交叉发布的。我也在那里回答。
标签: optimization linear-programming cplex