if (bestScoreImproved) {
phaseScope.setBestSolutionStepIndex(stepScope.getStepIndex());
Solution newBestSolution = stepScope.createOrGetClonedSolution();
updateBestSolution(solverScope, newBestSolution);
} else if (assertBestScoreIsUnmodified) {
solverScope.assertScore(solverScope.getBestSolution());
}
}
public void updateBestSolution(DefaultSolverScope solverScope, Solution newBestSolution) {
solverScope.setBestSolution(newBestSolution);