problemBenchmark.getName(), solverBenchmark.getName() );
// Intentionally create a fresh solver for every SingleBenchmark to reset Random, tabu lists, ...
Solver solver = solverBenchmark.getSolverConfig().buildSolver();
for (ProblemStatistic problemStatistic : problemBenchmark.getProblemStatisticList()) {
SingleStatistic singleStatistic = problemStatistic.createSingleStatistic();
singleStatistic.open(solver);
singleStatisticMap.put(problemStatistic.getProblemStatisticType(), singleStatistic);
}
solver.setPlanningProblem(inputSolution);
solver.solve();
Solution outputSolution = solver.getBestSolution();
timeMillisSpend = solver.getTimeMillisSpend();
DefaultSolverScope solverScope = ((DefaultSolver) solver).getSolverScope();
calculateCount = solverScope.getCalculateCount();
score = outputSolution.getScore();
SolutionDescriptor solutionDescriptor = ((DefaultSolver) solver).getSolutionDescriptor();
planningEntityCount = solutionDescriptor.getPlanningEntityCount(outputSolution);
problemBenchmark.registerProblemScale(solutionDescriptor.getProblemScale(outputSolution));
for (SingleStatistic singleStatistic : singleStatisticMap.values()) {
singleStatistic.close(solver);
}
problemBenchmark.writeOutputSolution(this, outputSolution);
return this;
}