matlab - 是什么原因导致错误 "Row ' c140 8' infeasible, all entries at implied bounds."?我怎样才能在matlab中显示它?

标签 matlab linear-programming cplex

当我尝试在 matlab 中使用 cplexmiqp 来解决单元 promise 问题时,我遇到了这个问题。

我有很多限制,但我仔细检查了所有限制,它们应该没问题。我不知道这个错误从何而来,我试图显示第 1408 行,但我不知道该怎么做。

有人遇到过同样的问题吗?有人知道如何解决吗?

最佳答案

使用 cplex.writeModel() API 显示模型的常用方法。

 cplex.writeModel('<your_miqp_proble_filename>.lp'); 

但是,如果您使用 Optimization Toolbox(从 MATLAB 内部调用 CPLEX),您似乎可以尝试另一个选项:ExportModel(注意:我还没有使用过此选项。)

From CPLEX for MATLAB :

The parameter ExportModel (or exportmodel) takes a file name as an argument. The default is the empty string (""). For example, opt = cplexoptimset('exportmodel', 'myModel.lp');can be used to set the name of the exported model.

您可以打开包含您的问题的 LP 文件,查看约束并查看它们是否都符合您的预期。

我还建议您迭代地缩小问题(更少的行/列)。如果问题继续重复出现,您可以更快地诊断它。如果没有,那么问题出在您最近丢弃的某件事情上。

希望能帮助您前进。

关于matlab - 是什么原因导致错误 "Row ' c140 8' infeasible, all entries at implied bounds."?我怎样才能在matlab中显示它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22563142/

相关文章:

linear-programming - LP/MILP (CPLEX) 困难

python - 如何使用 DOcplex (python) 向模型添加二次约束?

java - 如何在maven eclipse项目中使用cplex.jar?

java - Eclipse中Cplex Java库设置路径问题

android - 从android执行Matlab函数

matlab - 为什么 MATLAB 删除了我的小数?

python - Karpathy 的代码训练神经网络使用策略梯度打乒乓球

java - MATLAB:如何让 urlread2 使用 HTTPS

algorithm - 线性规划算法

python - 使用 PuLP 进行线性规划沙拉混合物优化