org.optaplanner.examples.tsp.tspSolverConfig.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of optaplanner-examples Show documentation
Show all versions of optaplanner-examples Show documentation
OptaPlanner solves planning problems.
This lightweight, embeddable planning engine implements powerful and scalable algorithms
to optimize business resource scheduling and planning.
This module contains the examples which demonstrate how to use it in a normal Java application.
<?xml version="1.0" encoding="UTF-8"?> <solver xmlns="https://www.optaplanner.org/xsd/solver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.optaplanner.org/xsd/solver https://www.optaplanner.org/xsd/solver/solver.xsd"> <!-- To slowly prove there are no bugs in this code --> <!--<environmentMode>FULL_ASSERT</environmentMode>--> <!-- To solve faster by saturating multiple CPU cores --> <!--<moveThreadCount>AUTO</moveThreadCount>--> <solutionClass>org.optaplanner.examples.tsp.domain.TspSolution</solutionClass> <entityClass>org.optaplanner.examples.tsp.domain.Visit</entityClass> <scoreDirectorFactory> <!--<easyScoreCalculatorClass>org.optaplanner.examples.tsp.optional.score.TspEasyScoreCalculator</easyScoreCalculatorClass>--> <constraintProviderClass>org.optaplanner.examples.tsp.score.TspConstraintProvider</constraintProviderClass> <!--<incrementalScoreCalculatorClass>org.optaplanner.examples.tsp.optional.score.TspIncrementalScoreCalculator</incrementalScoreCalculatorClass>--> <!--<scoreDrl>org/optaplanner/examples/tsp/optional/score/tspConstraints.drl</scoreDrl>--> <!--<assertionScoreDirectorFactory>--> <!--<easyScoreCalculatorClass>org.optaplanner.examples.tsp.optional.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>