JBoss.orgCommunity Documentation

Drools Planner User Guide

Version 5.4.0.CR1


1. Planner introduction
1.1. What is Drools Planner?
1.2. What is a planning problem?
1.2.1. A planning problem is NP-complete
1.2.2. A planning problem has (hard and soft) constraints
1.2.3. A planning problem has a huge search space
1.3. Status of Drools Planner
1.4. Download and run the examples
1.4.1. Get the release zip and run the examples
1.4.2. Run the examples in an IDE (IntelliJ, Eclipse, NetBeans)
1.4.3. Use it with maven, gradle, ivy, buildr or ANT
1.4.4. Build it from source
1.5. Questions, issues and blog
2. Quick start
2.1. Cloud balancing tutorial
2.1.1. Problem statement
2.1.2. Domain model
2.1.3. Main method
2.1.4. Solver configuration
2.1.5. Domain model
2.1.6. Score configuration
2.1.7. Beyond this tutorial
3. Use cases and examples
3.1. Introduction
3.2. Toy examples
3.2.1. N queens
3.2.2. Cloud balancing
3.2.3. Traveling salesman (TSP - Traveling salesman problem)
3.2.4. Manners 2009
3.3. Real examples
3.3.1. Course timetabling (ITC 2007 track 3 - Curriculum course scheduling)
3.3.2. Machine reassignment (Google ROADEF 2012)
3.3.3. Vehicle routing
3.3.4. Hospital bed planning (PAS - Patient admission scheduling)
3.4. Difficult examples
3.4.1. Exam timetabling (ITC 2007 track 1 - Examination)
3.4.2. Employee rostering (INRC 2010 - Nurse rostering)
3.4.3. Sport scheduling (TTP - Traveling tournament problem)
4. Planner configuration
4.1. Overview
4.2. Solver configuration
4.2.1. Solver configuration by XML file
4.2.2. Solver configuration by Java API
4.3. Model your planning problem
4.3.1. Is this class a problem fact or planning entity?
4.3.2. Problem fact
4.3.3. Planning entity and planning variables
4.3.4. Planning value and planning value ranges
4.3.5. Planning problem and planning solution
4.4. Use the Solver
4.4.1. The Solver interface
4.4.2. Solving a problem
4.4.3. Environment mode: Are there bugs in my code?
4.4.4. Logging level: What is the Solver doing?
5. Score calculation
5.1. Rule based score calculation
5.2. Choosing a Score implementation
5.2.1. The ScoreDefinition interface
5.2.2. SimpleScore
5.2.3. HardAndSoftScore
5.2.4. Implementing a custom Score
5.3. Defining the score rules source
5.3.1. A scoreDrl resource on the classpath
5.3.2. A RuleBase (possibly defined by Guvnor)
5.4. Implementing a score rule
5.5. Aggregating the score rules into the Score
5.6. Delta based score calculation
5.7. Tips and tricks
6. Optimization algorithms
6.1. The size of real world problems
6.2. The secret sauce of Drools Planner
6.3. Optimization algorithms overview
6.4. Which optimization algorithms should I use?
6.5. SolverPhase
6.6. Termination
6.6.1. TimeMillisSpendTermination
6.6.2. ScoreAttainedTermination
6.6.3. StepCountTermination
6.6.4. UnimprovedStepCountTermination
6.6.5. Combining Terminations
6.6.6. Asynchronous termination from another thread
6.7. SolverEventListener
6.8. Custom SolverPhase
7. Exact methods
7.1. Overview
7.2. Brute Force
7.2.1. Algorithm description
7.2.2. Configuration
7.3. Branch and bound
7.3.1. Algorithm description
7.3.2. Configuration
8. Construction heuristics
8.1. Overview
8.2. First Fit
8.2.1. Algorithm description
8.2.2. Configuration
8.3. First Fit Decreasing
8.3.1. Algorithm description
8.3.2. Configuration
8.4. Best Fit
8.4.1. Algorithm description
8.4.2. Configuration
8.5. Best Fit Decreasing
8.5.1. Algorithm description
8.5.2. Configuration
8.6. Cheapest insertion
8.6.1. Algorithm description
8.6.2. Configuration
9. Local search
9.1. Overview
9.2. Hill climbing (simple local search)
9.2.1. Algorithm description
9.3. Tabu search
9.3.1. Algorithm description
9.4. Simulated annealing
9.4.1. Algorithm description
9.5. About neighborhoods, moves and steps
9.5.1. A move
9.5.2. Move generation
9.5.3. Generic MoveFactory
9.5.4. A step
9.5.5. Getting stuck in local optima
9.6. Deciding the next step
9.6.1. Selector
9.6.2. Acceptor
9.6.3. Forager
9.7. Using a custom Selector, Acceptor, Forager or Termination
10. Evolutionary algorithms
10.1. Overview
10.2. Evolutionary Strategies
10.3. Genetic algorithms
11. Benchmarking and tweaking
11.1. Finding the best configuration
11.2. Building a benchmarker
11.2.1. Adding the extra dependency
11.2.2. Building a PlannerBenchmark
11.2.3. ProblemIO: input and output of Solution files
11.2.4. Warming up the hotspot compiler
11.3. Summary statistics
11.3.1. Best score summary
11.4. Statistics per data set (graph and CSV)
11.4.1. Best score over time statistic (graph and CSV)
11.4.2. Calculate count per second statistic (graph and CSV)
11.4.3. Memory use statistic (graph and CSV)
12. Repeated planning
12.1. Introduction to repeated planning
12.2. Backup planning
12.3. Continuous planning (windowed planning)
12.4. Real-time planning (event based planning)