deciderScoreComparatorFactory.setSuccessiveNoHardChangeMinimum(1);
deciderScoreComparatorFactory.setSuccessiveNoHardChangeMaximum(3);
deciderScoreComparatorFactory.setSuccessiveNoHardChangeRepetitionMultiplicand(5.0);
deciderScoreComparatorFactory.setHardWeightSurvivalRatio(0.9);
LocalSearchSolverScope localSearchSolverScope = createLocalSearchSolverScope();
deciderScoreComparatorFactory.solvingStarted(localSearchSolverScope);
LocalSearchStepScope localSearchStepScope = localSearchSolverScope.getLastCompletedLocalSearchStepScope();
// Under hardScoreActivationThreshold 1
localSearchStepScope = nextStepScope(localSearchStepScope);
deciderScoreComparatorFactory.beforeDeciding(localSearchStepScope);
assertTrue(deciderScoreComparatorFactory.createDeciderScoreComparator() instanceof NaturalScoreComparator);
deciderScoreComparatorFactory.stepDecided(localSearchStepScope);
localSearchStepScope.setScore(DefaultHardAndSoftScore.valueOf(-11, -200));
deciderScoreComparatorFactory.stepTaken(localSearchStepScope);
// Under hardScoreActivationThreshold 2
localSearchStepScope = nextStepScope(localSearchStepScope);
deciderScoreComparatorFactory.beforeDeciding(localSearchStepScope);
assertTrue(deciderScoreComparatorFactory.createDeciderScoreComparator() instanceof NaturalScoreComparator);
deciderScoreComparatorFactory.stepDecided(localSearchStepScope);
localSearchStepScope.setScore(DefaultHardAndSoftScore.valueOf(-10, -200));
localSearchSolverScope.setBestSolutionStepIndex(localSearchStepScope.getStepIndex());
deciderScoreComparatorFactory.stepTaken(localSearchStepScope);
// Above hardScoreActivationThreshold 0
localSearchStepScope = nextStepScope(localSearchStepScope);
deciderScoreComparatorFactory.beforeDeciding(localSearchStepScope);
assertTrue(deciderScoreComparatorFactory.createDeciderScoreComparator() instanceof NaturalScoreComparator);