OpenTS Tutorial
Tabu List
The Tabu List Object

We're going to use a tabu list that's included with the OpenTS package. It's full name is org.coinor.opents.SimpleTabuList. It keeps an array of ints to track attributes of the moves that are executed.

As discussed with the MySwapMove object, the tabu list expects you to override the hashCode() method in your moves to return a number that is representative of your move. In our case we chose to record the customer number that was relocated.

We set the tabu list's tenure to seven (7) in the constructor. There are many papers and many hours of work that people put into determining how long the tabu list tenure should be, but for this problem seven is a good number. The tenure is how many iterations a move remains tabu after it has been put on the tabu list.

You can make this tabu list dynamic by calling its setTenure(...) and getTenure(...) methods while the tabu search is running. This may be in reponse to a TabuSearchEvent that you've chosen to "listen" to, such as the discovery of a new best solution or executing an unimproving move.

Let's put it all together and run the program to see how our very simple tabu search performs.