deciderScoreComparatorFactory.setSuccessiveNoHardChangeMinimum(1);
deciderScoreComparatorFactory.setSuccessiveNoHardChangeMaximum(3);
deciderScoreComparatorFactory.setSuccessiveNoHardChangeRepetitionMultiplicand(5.0);
deciderScoreComparatorFactory.setHardWeightSurvivalRatio(0.9);
LocalSearchSolverPhaseScope localSearchSolverPhaseScope = createLocalSearchSolverPhaseScope();
deciderScoreComparatorFactory.phaseStarted(localSearchSolverPhaseScope);
LocalSearchStepScope localSearchStepScope = localSearchSolverPhaseScope.getLastCompletedStepScope();
// Under hardScoreActivationThreshold 1
localSearchStepScope = nextStepScope(localSearchStepScope);
deciderScoreComparatorFactory.stepStarted(localSearchStepScope);
assertTrue(deciderScoreComparatorFactory.createDeciderScoreComparator() instanceof NaturalScoreComparator);
localSearchStepScope.setScore(DefaultHardAndSoftScore.valueOf(-11, -200));
deciderScoreComparatorFactory.stepEnded(localSearchStepScope);
// Under hardScoreActivationThreshold 2
localSearchStepScope = nextStepScope(localSearchStepScope);
deciderScoreComparatorFactory.stepStarted(localSearchStepScope);
assertTrue(deciderScoreComparatorFactory.createDeciderScoreComparator() instanceof NaturalScoreComparator);
localSearchStepScope.setScore(DefaultHardAndSoftScore.valueOf(-10, -200));
localSearchSolverPhaseScope.setBestSolutionStepIndex(localSearchStepScope.getStepIndex());
deciderScoreComparatorFactory.stepEnded(localSearchStepScope);
// Above hardScoreActivationThreshold 0
localSearchStepScope = nextStepScope(localSearchStepScope);
deciderScoreComparatorFactory.stepStarted(localSearchStepScope);
assertTrue(deciderScoreComparatorFactory.createDeciderScoreComparator() instanceof NaturalScoreComparator);