Solution time error
Awaiting user inputI have faced this error many times, but now I am asking it.
Gurobi sometimes quits a run with a flag of "TIME_LIMIT", although it actually takes far less time than my time limit. For example, when I use a 600-second time limit, Gurobi quits a run and reports 944 seconds while it takes only 17 seconds. I found this issue because I recorded both Gurobi's built-in time output and Matlab's tic-toc time. In my recent experiments, it happened 83 times out of 4750 instances.
Do you have any solution to avoid this error? I enjoy using Gurobi and am always grateful that it is available under an academic license for free. But when this error happens, I have to report that Gurobi fails to solve a certain number of instances within the time limit in my paper.
-
Could you please share one such model when the reported solution time does not match the actual wallclock time? You can use the gurobi_write function to generate an LP or MPS file. Note that uploading files in the Community Forum is not possible but we discuss an alternative in Posting to the Community Forum.
Best regards,
Jaromił0 -
Sorry. I cannot share the model because I do not publish the model yet.
I experienced it especially when so many runs were sequentially conducted for computational experiments. I guess Gurobi has the error when the solver is called extremely many times (over several thousand times) in sequence, so it has an error in separating CPU times between the current and previous calls. Or it could be an error in Gurobi under Matlab.
In fact, a more serious problem is that Gurobi fails to report any (non-global or feasible) solution in that case. It simply reports "TIME_LIMIT" without giving any sub-optimal solution. Then, I should report that Gurobi failed because I need a feasible (hopefully global) solution in my algorithm that sequentially uses a solver to get to an optimal solution of the main model. Strangely, when I try to solve the same sub-problem separately, Gurobi nicely finds a solution in a few seconds. I can use try-catch function in Matlab to run Gurobi again, but I do not do it because it does not properly measure the solution time of my algorithm.
I just hoped the Gurobi team would notice the error and fix it in a future version because I appreciate the academic license and would like to continue to use it in future research.
0 -
Thank you for reporting this issue. Please note that without a way to reproduce it, the chance of us fixing the issue is small. Could you maybe share a log snippet of such a failing run?
0
Please sign in to leave a comment.
Comments
3 comments