使用 SCIP 获得最佳可行解决方案

Obtain best feasible solution with SCIP

我正在使用 SCIP (SoPlex) 解决 .mps 文件提供的 MIP(混合整数程序)。我通过命令行使用 SCIP,如下所示:

1
2
3
4
5
6
7
8
9
10
11
12
13
SCIP> read file.mps
original problem has 1049 variables (471 bin, 0 int, 0 impl, 578 cont) and 638 constraints
SCIP> optimize    # so i am using default settings
... some solving information ...
SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.46
Solving Nodes      : 1
Primal Bound       : -6.58117502066443e+05 (2 solutions)
Dual Bound         : -6.58117502066443e+05
Gap                : 0.00 %
[linear] c_2_141>: x_2_73_141[C] - 1000000000 y_2_141[B] <= 0;
violation: right hand side is violated by 236.775818639799
best solution is not feasible in original problem

我不想有一个不可行的解决方案——我想要最好的可行方案。供您参考:我将 CPLEX 与相同的文件一起使用,它确认存在一个最佳可行解决方案,其 obj 值稍差(例如差 0.05 %)。
我已经尝试过强调 SCIP> set emphasis feasibility 的可行性,但这并没有帮助我自己看看:

1
2
3
4
5
6
7
8
9
SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.42
Solving Nodes      : 3 (total of 5 nodes in 3 runs)
Primal Bound       : -6.58117502066443e+05 (4 solutions)
Dual Bound         : -6.58117502066443e+05
Gap                : 0.00 %
[linear] c_2_141>: x_2_73_141[C] - 1000000000 y_2_141[B] <= 0;
violation: right hand side is violated by 236.775818639799
best solution is not feasible in original problem

亲切的问候。

编辑:
针对用户mattmilten的回答,我不得不分享一下,单独使用set numerics feastol 1e-9并没有带来可行的解决方案,但是使用1e-10这样的较低容差结合set emphasis feasibility,SCIP能够提供一个很好的可行方案仅比 CPLEXa 差 0.005 % 的解决方案€?.

感谢您的帮助 mattmilten!


您可以尝试收紧公差,尤其是可行性公差:

1
set numerics feastol 1e-9

违反的约束包含一个非常大的系数。这可能是导致这种高绝对误差的原因。在 CPLEX 中,您还应该尝试

1
display solution quality

检查 CPLEX 找到的解是否也违反边界。