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