9

I am solving a MILP model using CPLEX 12.8.0, but CPLEX exceeds the time limit on some test instances. More specifically, I set the time limit for 30 minutes using the cplex.setParam(IloCplex::TiLim, 1800) command, but in some instances, CPLEX runs for over 2 hours.

OllieK
  • 99
  • 3
  • 1
    I have faced a similar bug in Gurobi for a few times, but only for my large instances. In those instances, the time for "presolve" was too large, that made the total time larger than the specified limit. – Mostafa Jul 02 '19 at 01:08
  • @Mostafa, so how did you fix the problem? – OllieK Jul 02 '19 at 02:26
  • @OllieK CPLEX has different time "units" available, and these will have different behaviour, so you should check which one you are using (CPU time, real time, ...). – Holt Jul 02 '19 at 12:17

2 Answers2

12

It could be that you faced the issue described in this bug report.

RS03137: CPLEX MAY IGNORE TIME LIMITS ON HIGHLY SYMMETRIC MODELS ON WHICH A NEW INCUMBENT IS FOUND CLOSE TO THE TIME LIMIT. http://www-01.ibm.com/support/docview.wss?uid=swg1RS03137

The bug was fixed in version 12.9, which was released earlier in the year.

Xavier Nodet
  • 346
  • 1
  • 7
  • I downloaded CPLEX 12.9.0 and rerun my tests, but CPLEX keeps exceeding the time limit. I've tried all suggestions so far, but the same issue persists. – OllieK Jul 05 '19 at 05:43
  • Does the problem reproduce when using only the CPLEX Interactive? In order to understand what goes wrong, we would need your model (as a SAV or LP file) and the full log of a run that exceeds the time limit. May I suggest that you post both on https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000002059&ps=25 so that we can investigate? – Xavier Nodet Jul 05 '19 at 09:34
  • I have tried several different ways to run my tests and the issue has persisted. I have both my model exported as an LP file and I have the full log of a run that exceeds the time limit, but I keeping having trouble with posting my question on the IBM developer forum for some reason. I keeping getting a page error as soon as I log in using my IBMid. – OllieK Jul 11 '19 at 00:52
  • 1
    Please send the log, model, and any other relevant detail to cos-ai-support@wwpdl.vnet.ibm.com, and we will look into this. – Xavier Nodet Jul 11 '19 at 06:29
8

That may be related to the "presolve" phase of the optimization procedure. In large instances, the time for "presolve" may be too large, that makes the total time larger than the specified time-limit.

If that is the case, you can set the presolve parameter to zero, so that CPLEX does not perform a presolve on your instances. The following link is useful to perform that:

https://www.ibm.com/support/knowledgecenter/en/SS9UKU_12.6.1/com.ibm.cplex.zos.help/CPLEX/Parameters/topics/PreInd.html

Also, if you don't want to eliminate the presolve totally, you can limit the number of passes it performs. For that, you can find the parameter in the following link:

https://www.ibm.com/support/knowledgecenter/SSSA5P_12.6.1/ilog.odms.cplex.help/CPLEX/Parameters/topics/PrePass.html

Mostafa
  • 2,104
  • 10
  • 28
  • I rerun my tests having set the presolve parameter to 0, and I still get the same issue on some instances. – OllieK Jul 03 '19 at 14:10