英文:
Continue MIP optimization in Gurobi / Drake
问题
如果我有一个长时间运行的优化问题,我想知道它所找到的最佳解的质量。
我可以想象一种方式来实现这个目标:
我进行一个时间限制为15分钟的优化运行。然后,我可以检查优化的结果,然后以某种方式加载优化问题(包括整个分支和界树,而不仅仅是二进制文件),再进行15分钟,如此往复。我应该如何加载/恢复上次的MIP优化会话?
或者,如果在Gurobi / Drake中逐步检查长时间运行优化问题的解决方案还有其他好方法,那也会很棒。
英文:
If I have a long running optimization, I would like to know the quality of the best solutions it is finding.
One way I can see this working:
I do an optimization run with a time limit of 15 minutes. I can then check the result of the optimization, then somehow load the optimization (including the entire branch and bound tree, not just binaries) and do another 15 minutes, and so on. How would I do this loading / resuming of the last MIP optimization session?
Or, if there's another good way to incrementally check the solutions of long-running optimization in Gurobi / Drake, that would also be great.
答案1
得分: 1
Inside Gurobi, you can add a callback function. One could imagine to use this callback function to print out the best solutions found so far, with the lower and upper bounds on the MIP cost.
你可以使用Drake的函数GurobiSolver::AddMipNodeCallback来添加回调函数。
英文:
Inside Gurobi, you can add a callback function. One could imagine to use this callback function to print out the best solutions found so far, with the lower and upper bounds on the MIP cost.
You can use Drake's function GurobiSolver::AddMipNodeCallback to add the callback.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论