在OptaPlanner中实施自定义元启发式 [英] Implementing Custom metaheuristic in OptaPlanner

查看:164
本文介绍了在OptaPlanner中实施自定义元启发式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

截止到目前,Opta Planner计划者已提供以下支持:

As of now Opta Planner planner provides support for:

  1. Tabu搜索.
  2. 模拟退火.

但是,如果我需要使用Opta Planner实现任何其他算法(如遗传算法),那么可以在哪里以及如何使用它.我已经有了遗传算法的代码,但是我不知道如何将其与Opta计划程序集成在一起.我发现可能的地方很少.

However if i need to implement any other algorithm like Genetic Algorithm with Opta Planner then where and how could it could be used. I have got the code of genetic algorithm, however i don't know how to integrate it with Opta planner. I found few places where it may be possible.

  1. 内部自定义分数类.
  2. 内部自定义Move类.
  3. 内部自定义MoveFactory类.
  4. 在XML配置文件中.

请指导我需要进行修改的地方.

Kindly guide where i need to do the modification.

谢谢

推荐答案

实际上,一个学生(Sam Van Malderen)已经分叉了OptaPlanner,并添加了遗传算法实现.我指导了他的工作.

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

这是源代码.有效.他编写了一个自定义SolverPhase,并重用了SelectorMoveTerminationScoreDirector.

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

基于这项工作,我们已经确定了许多问题(这是吉拉进行跟踪),以使OptaPlanner更友好地实施基于人口的元启发式算法.

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.

话说回来,对于所有测试用例,所有非小数据集上的遗传算法实现的结果始终次于禁忌搜索和后来接受.就我个人而言,我不认为错误在于实现方面……我不是GA的坚定拥护者,但是OptaPlanner需要开箱即用地全力支持它们(即使只是为了证明本地搜索也是如此)效果更好).因此,我绝对欢迎将GA添加到OptaPlanner的任何工作.

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.

如果您希望我与Sam取得联系以获取他的论文副本(该论文描述了他实施的GA技术),请告诉我:)

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 :)

这篇关于在OptaPlanner中实施自定义元启发式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆