为什么 CPLEX Refiner 没有检测到中断的变量边界?

Why does the CPLEX Refiner not detect broken variable bounds?

Cplex(12.6 或 12.8)在使用 GetConflict 或

时未检测到不可行的变量边界

我 运行 来自 http://www-01.ibm.com/support/docview.wss?uid=swg21429472

的代码

IBM 的示例采用问题的所有原始约束并添加所有变量边界作为附加约束。

我已经用这个lp模型测试了

Maximize
obj: x1 + 2 x2 + 3 x3
Subject To
c1: x2 + x3 <= 20
c2: x1 - 3 x2 + x3 <= 30
c3: x1<= 20
c4: x1>=40
Bounds
40 <= x1 <= 00
Generals
x1 x2 x3
End

注意:x1 的边界是有意打破的。

使用这个编辑过的 lp 文件,我希望 CPLEX return 打破边界作为不可行集的成员。但事实并非如此。只是所有约束和边界都被排除在冲突集中

The IRange model including the variable bounds as constraints

The conflict refinement result: none of these constraints are in coflict (wrong!)

The cplex console output: correctly finds x1 is broken

如何解决这个问题?我想在结果集中获得所有破坏的约束。

RefineConflict 方法的文档指出:

To check whether the bounds of a variable cause a conflict, use instances of the class ILOG.Concert.INumVarBound to specify the upper and lower bounds of the variable in question. Use those bounds like constraints among the arguments you pass to refineConflict.

考虑到这一点,并以技术说明为起点,尝试改用以下代码块:

//add variable bounds to the constraints array
for(int c1=0;c1<lp.NumVars.Length;c1++)
{
    if (lp.GetNumVar(c1).Type != NumVarType.Bool)
    {
        // Instead of the following:
        // constraints[rng.Length + 2*numVarCounter] = cplex.AddLe(lp.GetNumVar(c1).LB, lp.GetNumVar(c1));
        // constraints[rng.Length + 2 * numVarCounter].Name = lp.GetNumVar(c1).ToString() + "_LB";
        // constraints[rng.Length + 2*numVarCounter + 1] = cplex.AddGe(lp.GetNumVar(c1).UB, lp.GetNumVar(c1));
        // constraints[rng.Length + 2 * numVarCounter + 1].Name = lp.GetNumVar(c1).ToString() + "_UB";
        // Use this:
        constraints[rng.Length + 2 * numVarCounter] = cplex.Bound(lp.GetNumVar(c1), NumVarBoundType.Lower);
        constraints[rng.Length + 2 * numVarCounter + 1] = cplex.Bound(lp.GetNumVar(c1), NumVarBoundType.Upper);
        numVarCounter++;
    }
}

通过这些更改,我得到以下输出:

Warning:  Bound infeasibility column 'x1'.
Solution status = Infeasible
Model Infeasible, Calling CONFLICT REFINER
Number of SOSs=0
Conflict Refinement process finished: Printing Conflicts
 Proved : IloRange c3 : -infinity <= (1*x1) <= 20
 Proved : IloRange c4 : 40 <= (1*x1) <= infinity
Conflict Summary:
 Constraint conflicts = 2
 Variable Bound conflicts = 0
 SOS conflicts = 0
Calling FEASOPT
Warning:  Bound infeasibility column 'x1'.
FeasOpt failed- Could not repair infeasibilities