Solving with multiple initial solutions in parallel

最后都变了- 提交于 2019-12-23 01:59:04

问题


I just started using Optaplanner. Usually in local search metaheuristics, it is common to start from multiple initial solutions in the search space and try to improve them in parallel. That way we decrease the risk of falling in a local optimum and we choose the final solution with the best score.

Is there a similar feature in Optaplanner where I could say, for example, start solving using those 100 initial solutions?

Thanks,

Antoine


回答1:


Not out-of-the-box, but it's trivial too add (and I have done so in the past). Just start n threads, using their own Solver. At the end, take the solution of the thread with the overall best score.

To have each Solver try something different, either use environmentMode PRODUCTION (which uses a random randomSeed), or configure alternative solver configurations (with different TS or LA parameters etc)

It's not a good idea to take an n higher than your number of CPU cores (or even half of them with some technologies).



来源:https://stackoverflow.com/questions/29349458/solving-with-multiple-initial-solutions-in-parallel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!