Implementing Custom metaheuristic in OptaPlanner

自闭症网瘾萝莉.ら 提交于 2019-12-06 13:18:27

Actually, a student (Sam Van Malderen) already forked OptaPlanner and added a Genetic Algorithm implementation. I guided his work.

Here's the source code. It works. He wrote a custom SolverPhase and reused Selector, Move, Termination and ScoreDirector.

Based on that work, we've been able to identify a number of issues (here's the jira to track) to make OptaPlanner more friendly to implement population based metaheuristics.

That being said, the results of that genetic algorithm implementation were consistently inferior to Tabu Search and Late Acceptance on all non-small datasets on all tested use cases. Personally, I don't think the fault lies within the implementation... I am not a strong believer of GA's, but OptaPlanner needs fully support them out-of-the-box one day (even if it's only to prove that Local Search works better). So I definitely welcome any work to add GA's to OptaPlanner.

If you want me to put you in contact with Sam to get a copy of his thesis (which described which GA techniques he implemented), let me know :)

PS: Another quick alternative is to implement a custom solver phase. Much easier, but you can only reuse the score calculation plumbing.

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