+ ") cannot be negative or zero.");
}
}
public boolean isAccepted(LocalSearchMoveScope moveScope) {
Score moveScore = moveScope.getScore();
Score lastStepScore = moveScope.getStepScope().getPhaseScope().getLastCompletedStepScope().getScore();
if (moveScore.compareTo(lastStepScore) >= 0) {
return true;
}
Score lateScore = previousScores[lateScoreIndex];
Score bestScore = moveScope.getStepScope().getPhaseScope().getBestScore();
Score moveScoreDifference = bestScore.subtract(moveScore);
double[] moveScoreDifferenceLevels = ScoreUtils.extractLevelDoubles(moveScoreDifference);
Score lateScoreDifference = bestScore.subtract(lateScore);
double[] lateScoreDifferenceLevels = ScoreUtils.extractLevelDoubles(lateScoreDifference);
double acceptChance = 1.0;
for (int i = 0; i < moveScoreDifferenceLevels.length; i++) {
double moveScoreDifferenceLevel = moveScoreDifferenceLevels[i];
double lateScoreDifferenceLevel = lateScoreDifferenceLevels[i];