Question

As of now Opta Planner planner provides support for:

  1. Tabu Search.
  2. Simulated Annealing.

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. Inside custom Score class.
  2. Inside custom Move class.
  3. Inside custom MoveFactory class.
  4. In the XML configuration file.

Kindly guide where i need to do the modification.

Thanks

Était-ce utile?

La solution

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

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top