<?xml version="1.0" encoding="UTF-8"?>
<solver>
  <!--<environmentMode>FULL_ASSERT</environmentMode>--><!-- To slowly prove there are no bugs in this code -->
  <!--<moveThreadCount>AUTO</moveThreadCount>--><!-- To solve faster by saturating multiple CPU cores -->

  <solutionClass>org.optaplanner.examples.tsp.domain.TspSolution</solutionClass>
  <entityClass>org.optaplanner.examples.tsp.domain.Visit</entityClass>

  <scoreDirectorFactory>
    <!--<easyScoreCalculatorClass>org.optaplanner.examples.tsp.solver.score.TspEasyScoreCalculator</easyScoreCalculatorClass>-->
    <!--<constraintProviderClass>org.optaplanner.examples.tsp.optional.score.TspConstraintProvider</constraintProviderClass>-->
    <!--<incrementalScoreCalculatorClass>org.optaplanner.examples.tsp.solver.score.TspIncrementalScoreCalculator</incrementalScoreCalculatorClass>-->
    <scoreDrl>org/optaplanner/examples/tsp/solver/tspScoreRules.drl</scoreDrl>
    <!--<assertionScoreDirectorFactory>-->
      <!--<easyScoreCalculatorClass>org.optaplanner.examples.tsp.solver.score.TspEasyScoreCalculator</easyScoreCalculatorClass>-->
    <!--</assertionScoreDirectorFactory>-->
    <initializingScoreTrend>ONLY_DOWN</initializingScoreTrend>
  </scoreDirectorFactory>

  <termination>
    <minutesSpentLimit>2</minutesSpentLimit>
  </termination>
  <constructionHeuristic>
    <constructionHeuristicType>FIRST_FIT_DECREASING</constructionHeuristicType>
  </constructionHeuristic>
  <localSearch>
    <unionMoveSelector>
      <changeMoveSelector>
        <cacheType>STEP</cacheType>
        <selectionOrder>SHUFFLED</selectionOrder>
      </changeMoveSelector>
      <!--<swapMoveSelector>-->
        <!--<cacheType>PHASE</cacheType>-->
        <!--<selectionOrder>SHUFFLED</selectionOrder>-->
      <!--</swapMoveSelector>-->
      <tailChainSwapMoveSelector/>
      <subChainChangeMoveSelector>
        <subChainSelector>
          <maximumSubChainSize>50</maximumSubChainSize>
        </subChainSelector>
        <selectReversingMoveToo>true</selectReversingMoveToo>
      </subChainChangeMoveSelector>
      <!--<subChainSwapMoveSelector>-->
        <!--<selectReversingMoveToo>false</selectReversingMoveToo>-->
      <!--</subChainSwapMoveSelector>-->
      <!-- TODO use nearby selection to scale out -->
    </unionMoveSelector>
    <acceptor>
      <lateAcceptanceSize>400</lateAcceptanceSize>
    </acceptor>
    <forager>
      <acceptedCountLimit>1</acceptedCountLimit>
    </forager>
  </localSearch>
</solver>
