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.
-
1$\begingroup$ 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. $\endgroup$– MostafaJul 2, 2019 at 1:08
-
$\begingroup$ @Mostafa, so how did you fix the problem? $\endgroup$– OllieKJul 2, 2019 at 2:26
-
$\begingroup$ @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, ...). $\endgroup$– HoltJul 2, 2019 at 12:17
2 Answers
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.
-
$\begingroup$ 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. $\endgroup$– OllieKJul 5, 2019 at 5:43
-
$\begingroup$ 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 ibm.com/developerworks/community/forums/html/… so that we can investigate? $\endgroup$ Jul 5, 2019 at 9:34
-
$\begingroup$ 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. $\endgroup$– OllieKJul 11, 2019 at 0:52
-
1$\begingroup$ Please send the log, model, and any other relevant detail to [email protected], and we will look into this. $\endgroup$ Jul 11, 2019 at 6:29
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:
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:
-
$\begingroup$ I rerun my tests having set the presolve parameter to 0, and I still get the same issue on some instances. $\endgroup$– OllieKJul 3, 2019 at 14:10