2

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?

abc
  • 11,579
  • 2
  • 26
  • 51
  • Is your model small enough that you can include it here in LP format (i.e., by editing your question)? Do you get the same behavior if you run your model in the CPLEX interactive? – rkersh Jan 16 '19 at 19:40
  • I've just tried the interactive CPLEX and still getting the same behavior `(Presolve time = 61.67 sec. (12982.95 ticks))` even though the solver confirm `CPLEX> New value for time limit in seconds: 30`. The model is big (more than 50 Mb) and it's a bit hard to add it to the question. – abc Jan 16 '19 at 21:52
  • 1
    If you are willing to share your model via FTP (or an alternate method) you can send an email to me at rkersh at us dot ibm dot com. Without taking a closer look it will be hard to figure out what is going on here. Keep in mind that while there may indeed be an issue here, CPLEX may always overshoot the time limit by a small amount. There is no guarantee that a "hard time limit constraint" will be enforced. – rkersh Jan 16 '19 at 23:28

1 Answers1

2

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.

rkersh
  • 4,447
  • 2
  • 22
  • 31