net.usa.rharder.tabusearch22
Interface TSMove


public interface TSMove

There is a great deal of flexibility in defining these moves. A move could be toggling a binary variable on or off. It could be swapping two variables in a sequence. The important thing is that it affects the solution in some way and is also able to undo itself immediately afterward. For each move generated by the TSMoveManager the engine operates on the current solution, evaluates it with the objective function and penalty function, and then performs undoOperation

Since:
1.0
See Also:
TSFunction, TSSolution

Method Summary
 boolean conflictsWith(TSMove move)
          If a number of moves have improving solutions and do not affect each other, the TSEngine will execute all of these moves at that iteration.
 void operateOn(TSSolution soln)
          The required method operateOn accepts a solution to modify and does so.
 void undoOperation(TSSolution soln)
          A move needs to be able to undo itself.
 

Method Detail

operateOn

public void operateOn(TSSolution soln)
The required method operateOn accepts a solution to modify and does so. Note that a new solution is not returned. The original solution is modified.
Parameters:
soln - The solution to be modified.
Since:
1.0
See Also:
TSSolution

undoOperation

public void undoOperation(TSSolution soln)
A move needs to be able to undo itself. When the TSEngine evaluates a solution, it does not create a copy before a move operates on it. This results in a significant performance increase, but the TSMove needs to be more sophisticated and be able to undo itself.
Parameters:
soln - Solution to be un-operated on.
Since:
1.1
See Also:
TSSolution

conflictsWith

public boolean conflictsWith(TSMove move)
If a number of moves have improving solutions and do not affect each other, the TSEngine will execute all of these moves at that iteration.

For example, in a Traveling Salesman Problem moving customers around in one vehicle's tour probably does not affect moving customers in another vehicle's tour. If this is true for your problem, you can specify that a particular move does or does not conflict with the passed move object.

To be considered "not conflicting" the incremental value of making one move must be independent of the incremental value of making another. In other words if delta-X is the extra value (objective function + penalty function) for making move X and delta-Y is the extra value for making move Y, then the new solution's total value must be equal to the old value + delta-X + delta-Y.

For traditional tabu search behavior, always return true

Parameters:
move - The move to compare this one to.
Returns:
whether or not the two moves can both be executed at the same iteration
Since:
2.0
See Also:
TSSolution, TSFunction