I'm using Gurobi 7.0.2 (+ Python 3.5, i.e., gurobipy) to solve some hard optimization problems (MIPs). Finding optimal results usually takes days or even weeks. It's possible to interrupt Gurobi before having found an optimal solution, i.e., Gap > 0%, and the currently best solution will be returned.
However, it would be much nicer to retrieve such an intermediate result with Gap > 0% but without completely interrupting Gurobi. Gurobi should continue trying to improve the current solution, but I could already start working with the intermediate solution.
Is this possible somehow? If not, please add it to the next Gurobi version.
Write a callback function, with where==MIPSOL. Then call Model.cbGetSolution(); see the sample code for Model.cbGetSolution().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With