当我尝试在 matlab
中使用 cplexmiqp
来解决单元 promise 问题时,我遇到了这个问题。
我有很多限制,但我仔细检查了所有限制,它们应该没问题。我不知道这个错误从何而来,我试图显示第 1408 行,但我不知道该怎么做。
有人遇到过同样的问题吗?有人知道如何解决吗?
最佳答案
使用 cplex.writeModel() API 显示模型的常用方法。
cplex.writeModel('<your_miqp_proble_filename>.lp');
但是,如果您使用 Optimization Toolbox(从 MATLAB 内部调用 CPLEX),您似乎可以尝试另一个选项:ExportModel
(注意:我还没有使用过此选项。)
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/