org.coinor.opents
Interface TabuSearch

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
TabuSearchBase

public interface TabuSearch
extends java.io.Serializable

The TabuSearch is the main source of control for the programmer. The extended and instantiated tabu objects are passed to the tabu search, and the tabu search fires off relevant events to interested listeners. These events make it easy to extend the tabu search to include popular techniques such as intensification, diversification, and strategic oscillation.

As always, I am available for questions at rharder@usa.net.

This code is licensed for public use under the Common Public License version 0.5.
The Common Public License, developed by IBM and modeled after their industry-friendly IBM Public License, differs from other common open source licenses in several important ways:

Copyright 2001 Robert Harder

Since:
1.0

Method Summary
 void addTabuSearchListener(TabuSearchListener listener)
          Register a TabuSearchListener with the tabu search.
 AspirationCriteria getAspirationCriteria()
          Returns the aspiration critera.
 Solution getBestSolution()
          Returns the best solution found so far.
 Solution getCurrentSolution()
          Returns the current solution.
 int getIterationsCompleted()
          Returns the total number iterations that have been completed since the instantiation of this TabuSearch.
 int getIterationsToGo()
          Returns the number of iterations left to go.
 MoveManager getMoveManager()
          Returns the move manager.
 ObjectiveFunction getObjectiveFunction()
          Returns the objective function.
 TabuList getTabuList()
          Returns the tabu list.
 boolean isChooseFirstImprovingMove()
          Returns whether or not the tabu search engine will choose the first improving move it encounters at each iteration (true) or will choose the best move at each iteration (false).
 boolean isMaximizing()
          Returns whether or not the tabu search should be maximizing the objective function.
 boolean isSolving()
          Returns true if the tabu search is currently solving.
 void removeTabuSearchListener(TabuSearchListener listener)
          Unregister a TabuSearchListener with the tabu search.
 void setAspirationCriteria(AspirationCriteria aspirationCriteria)
          Sets the aspiration critera effective at the start of the next iteration.
 void setBestSolution(Solution solution)
          Sets the best solution effective at the start of the next iteration and evaluates the solution with the current objective function.
 void setChooseFirstImprovingMove(boolean choose)
          Setting this to true will cause the search to go faster by not necessarily evaluating all of the moves in a neighborhood for each iteration.
 void setCurrentSolution(Solution solution)
          Sets the current solution effective at the start of the next iteration and evaluates the solution with the current objective function.
 void setIterationsToGo(int iterations)
          Sets the iterations remaining to be solved.
 void setMaximizing(boolean maximizing)
          Sets whether or not the tabu search should be maximizing the objective function.
 void setMoveManager(MoveManager moveManager)
          Sets the move manager effective at the start of the next iteration.
 void setObjectiveFunction(ObjectiveFunction function)
          Sets the objective function effective at the start of the next iteration and re-evaluates the best and current solutions.
 void setTabuList(TabuList tabuList)
          Sets the tabu list effective at the start of the next iteration.
 void startSolving()
          Starts the tabu search if iterationsToGo is greater than zero.
 void stopSolving()
          Stops the tabu search after the current iteration finishes but leaves iterationsToGo untouched.
 

Method Detail

startSolving

public void startSolving()
Starts the tabu search if iterationsToGo is greater than zero.

Since:
1.0
See Also:
setIterationsToGo(int), getIterationsToGo()

stopSolving

public void stopSolving()
Stops the tabu search after the current iteration finishes but leaves iterationsToGo untouched.

Implementations of TabuSearch should block on this method until the iteration is done.

Since:
1.0
See Also:
setIterationsToGo(int), getIterationsToGo()

isSolving

public boolean isSolving()
Returns true if the tabu search is currently solving.

Returns:
Whether or not the tabu search is currently solving.
Since:
1.0

addTabuSearchListener

public void addTabuSearchListener(TabuSearchListener listener)
Register a TabuSearchListener with the tabu search.

Implementations of TabuSearch should synchronize this method.

Parameters:
listener - The listener to register.
Since:
1.0
See Also:
TabuSearchListener

removeTabuSearchListener

public void removeTabuSearchListener(TabuSearchListener listener)
Unregister a TabuSearchListener with the tabu search.

Implementations of TabuSearch should synchronize this method.

Parameters:
listener - The listener to unregister.
Since:
1.0
See Also:
TabuSearchListener

setObjectiveFunction

public void setObjectiveFunction(ObjectiveFunction function)
Sets the objective function effective at the start of the next iteration and re-evaluates the best and current solutions.

Implementations of TabuSearch should synchronize this method.

Parameters:
function - The new objective function
Since:
1.0
See Also:
ObjectiveFunction

setMoveManager

public void setMoveManager(MoveManager moveManager)
Sets the move manager effective at the start of the next iteration.

Implementations of TabuSearch should synchronize this method.

Parameters:
moveManager - The new move manager
Since:
1.0
See Also:
MoveManager

setTabuList

public void setTabuList(TabuList tabuList)
Sets the tabu list effective at the start of the next iteration.

Implementations of TabuSearch should synchronize this method.

Parameters:
tabuList - The new tabu list
Since:
1.0
See Also:
TabuList

setAspirationCriteria

public void setAspirationCriteria(AspirationCriteria aspirationCriteria)
Sets the aspiration critera effective at the start of the next iteration. A null value indicates that no aspiration criteria is to be used.

Implementations of TabuSearch should synchronize this method.

Parameters:
aspirationCriteria - The new aspiration criteria
Since:
1.0
See Also:
AspirationCriteria

setBestSolution

public void setBestSolution(Solution solution)
Sets the best solution effective at the start of the next iteration and evaluates the solution with the current objective function.

Implementations of TabuSearch should synchronize this method.

Parameters:
solution - The new best solution
Since:
1.0
See Also:
Solution

setCurrentSolution

public void setCurrentSolution(Solution solution)
Sets the current solution effective at the start of the next iteration and evaluates the solution with the current objective function.

Implementations of TabuSearch should synchronize this method.

Parameters:
solution - The new current solution
Since:
1.0
See Also:
Solution

setIterationsToGo

public void setIterationsToGo(int iterations)
Sets the iterations remaining to be solved. The number of iterations to go is decremented at the beginning of each iteration. If a listener, which is notified at the end of an iteration, increases iterationsToGo from zero to a positive number, the tabu search will continue solving as if it never was about to stop.

Implementations of TabuSearch should synchronize this method.

Parameters:
iterations - The number of iterations left to go
Since:
1.0

setMaximizing

public void setMaximizing(boolean maximizing)
Sets whether or not the tabu search should be maximizing the objective function. A value of true means maximize while a value of false means minimize.

Implementations of TabuSearch should synchronize this method.

Parameters:
maximizing - true if the tabu search should be maximizing, false otherwise.
Since:
1.0

setChooseFirstImprovingMove

public void setChooseFirstImprovingMove(boolean choose)
Setting this to true will cause the search to go faster by not necessarily evaluating all of the moves in a neighborhood for each iteration. Instead of evaluating all of the moves and selecting the best one for execution, setting this will cause the tabu search engine to select the first move that it encounters that causes an improvement to the current solution. The default value should be false.

Parameters:
choose - Whether or not the first improving move will be chosen
Since:
1.0.1

isChooseFirstImprovingMove

public boolean isChooseFirstImprovingMove()
Returns whether or not the tabu search engine will choose the first improving move it encounters at each iteration (true) or will choose the best move at each iteration (false).

Returns:
Whether or not the first improving move will be chosen
Since:
1.0.1

getObjectiveFunction

public ObjectiveFunction getObjectiveFunction()
Returns the objective function.

Implementations of TabuSearch should synchronize this method.

Returns:
The objective function.
Since:
1.0
See Also:
Function

getMoveManager

public MoveManager getMoveManager()
Returns the move manager.

Implementations of TabuSearch should synchronize this method.

Returns:
The move manager.
Since:
1.0
See Also:
MoveManager

getTabuList

public TabuList getTabuList()
Returns the tabu list.

Implementations of TabuSearch should synchronize this method.

Returns:
The tabu list.
Since:
1.0
See Also:
TabuList

getAspirationCriteria

public AspirationCriteria getAspirationCriteria()
Returns the aspiration critera. A null value indicates that no aspiration criteria is to be used.

Implementations of TabuSearch should synchronize this method.

Returns:
The aspiration criteria
Since:
1.0
See Also:
AspirationCriteria

getBestSolution

public Solution getBestSolution()
Returns the best solution found so far.

Implementations of TabuSearch should synchronize this method.

Returns:
The best solution found so far.
Since:
1.0
See Also:
Solution

getCurrentSolution

public Solution getCurrentSolution()
Returns the current solution.

Implementations of TabuSearch should synchronize this method.

Returns:
The current solution.
Since:
1.0
See Also:
Solution

getIterationsToGo

public int getIterationsToGo()
Returns the number of iterations left to go.

Implementations of TabuSearch should synchronize this method.

Returns:
The number of iterations left to go.
Since:
1.0

getIterationsCompleted

public int getIterationsCompleted()
Returns the total number iterations that have been completed since the instantiation of this TabuSearch.

Implementations of TabuSearch should synchronize this method.

Returns:
Total number of completed iterations
Since:
1.0a

isMaximizing

public boolean isMaximizing()
Returns whether or not the tabu search should be maximizing the objective function. A value of true means maximize while a value of false means minimize.

Implementations of TabuSearch should synchronize this method.

Returns:
Whether or not the tabu search should be maximizing the objective function.
Since:
1.0