presolve 阶段的 Cplex 限制时间

Cplex limit time of the presolve phase

我正在使用 Cplex 12.8 并尝试求解具有硬时间限制约束的 ILP 模型,即总求解时间不得超过特定阈值。我对找到可行解决方案的次数感兴趣。我正在使用 cplex python API.
我注意到在某些情况下,这个约束没有得到遵守。 例如,考虑以下 Cplex 日志。

CPXPARAM_TimeLimit                               30
CPXPARAM_Read_DataCheck                          1
Tried aggregator 1 time.
MIP Presolve eliminated 71 rows and 0 columns.
MIP Presolve modified 2101 coefficients.
Reduced MIP has 2547 rows, 316485 columns, and 946792 nonzeros.
Reduced MIP has 316485 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 2.37 sec. (985.65 ticks)
Found incumbent of value 661.834300 after 4.66 sec. (2118.41 ticks)
Tried aggregator 1 time.
Reduced MIP has 2547 rows, 316485 columns, and 946792 nonzeros.
Reduced MIP has 316485 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 76.33 sec. (14585.95 ticks)

Root node processing (before b&c):
  Real time             =   81.22 sec. (16805.06 ticks)
Parallel b&c, 4 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) =   81.22 sec. (16805.06 ticks)
Cplex status= 107

尽管求解器确认已设置 30 秒的时间限制,但预求解阶段似乎忽略了它,并且只有在之后才考虑时间限制。

在此特定情况下,Cplex 状态显示超出时间限制,但存在整数解 (documentation)。

第一个解决方案可能包括禁用预求解阶段,但我更愿意保留它并且只得到一个在时间限制内找不到整数解决方案 return如果在预求解的 N 秒内未找到整数解,则为状态。
有没有办法实现这个目标?

快速查看您的模型后(感谢您将其传递),看来 symmetry breaking 参数的默认行为是罪魁祸首。作为您问题的解决方法,如果您将参数设置为 <= 2 的值,则应遵守时间限制。请试一试。此外,较新版本的 CPLEX(目前正在开发中)似乎已经解决了这个问题,因此应该在 CPLEX 的未来版本中解决这个问题。