Adding lazy cuts using callback in LP
AnsweredIs it possible to add lazy cuts using callback feature in a linear program? I am currently solving a stochastic linear program using Benders decomposition. But I observed that Gurobi can only retrieve solutions for MIP. Is it possible to retrieve the current solution of an LP when an optimal solution is found?
Thanks!
-
Hi,
Adding lazy cuts during the solution of a linear program does not make sense, because there are no intermediate solutions to be cut off. There is no B&B tree present and no subproblems have to be solved. For linear programs the procedure you describe should be:
- Solve LP to optimality
- Get optimal solution and analyze it
- Add new cut to LP and re-optimize
This has the advantage that Gurobi can re-use information from a previous solve and warm-start subsequent optimization processes improving the performance.
Best regards,
Jaromił0 -
Hi,
Thanks for the answer! As for the aforementioned procedure, can I still use the callback feature? Or I can only reoptimize it and add cut iteratively?
Best,
Yingqiu
0 -
Hi Yingqiu
Please excuse the late response.
Lazy and user cuts are not available for LPs. Thus you have to re-optimize and add cuts iteratively when working with LPs.
Best regards,
Jaromił0
Please sign in to leave a comment.
Comments
3 comments