The MyMoveManager Object
The move manager is responsible for determining which moves are valid for each iteration. If we had defined our move to be "Move from position X to position Y," we would have the same set of moves at each iteration, but we don't, so we have to determine how far each customer can move forward and back at each iteration.
As before the complete source is available, but we've duplicated it here:
The move manager generates a number of moves being careful not to generate any that are logically impossible such as moving a customer from position three to a spot five places earlier. That would be a negative position which we cannot allow.
We expect that some moves will turn out to be duplicates of each other: If Customer A is followed by Customer B, then an A+1 move would be the same as a B-1 move. Since the hash code for the move is based on the customer only, we might find that A+1 is on the tabu list but B-1 is not.