org.optaplanner.examples.examination.examinationSolverConfig.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.examination.domain.Examination</solutionClass> <entityClass>org.optaplanner.examples.examination.domain.Exam</entityClass> <entityClass>org.optaplanner.examples.examination.domain.LeadingExam</entityClass> <entityClass>org.optaplanner.examples.examination.domain.FollowingExam</entityClass> <scoreDirectorFactory> <constraintProviderClass>org.optaplanner.examples.examination.score.ExaminationConstraintProvider</constraintProviderClass> <initializingScoreTrend>ONLY_DOWN</initializingScoreTrend> </scoreDirectorFactory> <termination> <minutesSpentLimit>5</minutesSpentLimit> </termination> <constructionHeuristic> <queuedEntityPlacer> <entitySelector id="placerEntitySelector"> <entityClass>org.optaplanner.examples.examination.domain.Exam</entityClass> <cacheType>PHASE</cacheType> <selectionOrder>SORTED</selectionOrder> <sorterManner>DECREASING_DIFFICULTY</sorterManner> </entitySelector> <cartesianProductMoveSelector> <changeMoveSelector> <entitySelector mimicSelectorRef="placerEntitySelector"/> <valueSelector variableName="period"> <downcastEntityClass>org.optaplanner.examples.examination.domain.LeadingExam</downcastEntityClass> <cacheType>PHASE</cacheType> <!--<selectionOrder>SORTED</selectionOrder>--> <!--<sorterManner>INCREASING_STRENGTH</sorterManner>--> </valueSelector> </changeMoveSelector> <changeMoveSelector> <entitySelector mimicSelectorRef="placerEntitySelector"/> <valueSelector variableName="room"> <cacheType>PHASE</cacheType> <selectionOrder>SORTED</selectionOrder> <sorterManner>INCREASING_STRENGTH</sorterManner> </valueSelector> </changeMoveSelector> </cartesianProductMoveSelector> </queuedEntityPlacer> </constructionHeuristic> <localSearch> <unionMoveSelector> <cartesianProductMoveSelector> <changeMoveSelector> <entitySelector id="cartesianProductEntitySelector"> <entityClass>org.optaplanner.examples.examination.domain.Exam</entityClass> </entitySelector> <valueSelector variableName="room"/> </changeMoveSelector> <changeMoveSelector> <entitySelector mimicSelectorRef="cartesianProductEntitySelector"/> <valueSelector variableName="period"> <downcastEntityClass>org.optaplanner.examples.examination.domain.LeadingExam</downcastEntityClass> </valueSelector> </changeMoveSelector> </cartesianProductMoveSelector> <swapMoveSelector> <entitySelector> <entityClass>org.optaplanner.examples.examination.domain.LeadingExam</entityClass> </entitySelector> </swapMoveSelector> </unionMoveSelector> <acceptor> <entityTabuSize>10</entityTabuSize> </acceptor> <forager> <acceptedCountLimit>2000</acceptedCountLimit> </forager> </localSearch> </solver>