我有一个非常大的问题(1百万个变量,3百万个约束),我试图用python中的cplex来解决。显然,以最佳方式解决它是不可能的,所以我已经实现了一个时间限制,这样我就可以在这个时间内得到最好的解决方案。
c.timelimit.set(7200)
但是,当时间结束时,它甚至还没有完成对根节点的处理:
Nodes Cuts/
Node Left Objective IInf Best Integer Best Bound ItCnt Gap
0 0 10.0070 2177 10.0070 65714
0 0 10.0070 1793 Cuts: 29 80275
0 0 10.0070 2427 Cuts: 6928 101277
0 0 10.0070 2061 Cuts: 4737 122524
Implied bound cuts applied: 485
Flow cuts applied: 68
Mixed integer rounding cuts applied: 12019
Zero-half cuts applied: 193
Root node processing (before b&c):
Real time = 7200.47 sec. (2762999.79 ticks)
Parallel b&c, 112 threads:
Real time = 0.00 sec. (0.00 ticks)
Sync time (average) = 0.00 sec.
Wait time (average) = 0.00 sec.
------------
Total (root+branch&cut) = 7200.47 sec. (2762999.79 ticks)
Solution status = 108 :
MIP_time_limit_infeasible
Exception raised during solve
有没有办法限制在根节点上花费的时间,以便至少启动B&C方法?那会有什么好处吗?