I am solving a planning problem with OptaPlanner. After configuring solver I call solve() method and wait for it to produce the solution. The question is, what if I want to compare few Best Solutions created by solver method with each other and choose one of them. Is it possible? I want to set termination condition by comparing last two solutions with each other and seeing how they differ from each other. That is why I want to implement this. Thank you in advance.
0
votes
1 Answers
1
votes
The easy answer: add a SolverEventListener to the Solver and listen to bestSolutionChanged() events to remember them. That suffices for most users.
The difficult answer: See "pareto optimization" in optaplanner docs. That isn't supported out of the box yet, but several users added it themselves by hacking the BestSolutionRecaller.