JBoss.orgCommunity Documentation

Chapter 2. Use cases and examples

2.1. Introduction
2.2. The n queens example
2.2.1. Problem statement
2.2.2. Solution(s)
2.2.3. Screenshot
2.2.4. Problem size
2.2.5. Domain class diagram
2.3. The Manners 2009 example
2.3.1. Problem statement
2.4. The Traveling Salesman Problem (TSP) example
2.4.1. Problem statement
2.5. The Traveling Tournament Problem (TTP) example
2.5.1. Problem statement
2.5.2. Simple and smart implementation
2.5.3. Problem size
2.6. Cloud balancing
2.6.1. Problem statement
2.7. The ITC 2007 curriculum course example
2.7.1. Problem statement
2.8. The ITC 2007 examination example
2.8.1. Problem statement
2.8.2. Problem size
2.8.3. Domain class diagram
2.9. The patient admission scheduling (PAS) example (hospital bed planning)
2.9.1. Problem statement
2.10. The INRC 2010 nurse rostering example
2.10.1. Problem statement

Drools Planner has several examples. In this manual we explain Drools Planner mainly using the n queens example. So it's advisable to read at least the section about that example. For advanced users, the following examples are recommended: curriculum course, examination and nurse rostering.

You can find the source code of all these examples in the drools source distribution and also in git under drools-planner/drools-planner-examples.

Given a list of cities, find the shortest tour for a salesman that visits each city exactly once. See the wikipedia definition of the traveling Salesman Problem.

It is one of the most intensively studied problems in computational mathematics. Yet, in the real world, it's often only part of a planning problem, along with other constraints, such as employee shift time constraints.