简体   繁体   中英

Cplex limit time of the presolve phase

I'm using Cplex 12.8 and trying to solve ILP models with hard time limit constraints on them, ie, the total solving time must not exceed a certain threshold. I'm interested in the number of times a feasible solution has been found. I'm using the cplex python API.
I've noticed that for some of the instances this constraint is not respected. For instance, consider the following Cplex log.

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

Even though the solver confirms that a time limit of 30 seconds has been set, it seems that the presolve phase ignores it and time limit gets considered only after.

In this specific case the Cplex status says Time limit exceeded, but integer solution exists ( documentation ).

A first solution might consist in disabling the presolve phase, but I would prefer to keep it and just get a no integer solution found within the time limit return status if within N seconds of the presolve no integer solution has been found.
Is there a way to achieve this goal?

After taking a quick look at your model (thanks for passing that along), it appears that the default behavior of the symmetry breaking parameter is the culprit. As a workaround to your issue, if you set the parameter to a value <= 2 then the time limit should be honored. Please give that a try. Furthermore a newer version of CPLEX (currently in development) appears to already fix this problem, so this issue should be addressed in a future version of CPLEX.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM