I'm using Cplex 12.8 and trying to solve ILP models with hard time limit constraints on them, i.e., 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?