Interface Move<Solution_>

Type Parameters:
Solution_ - the solution type, the class with the PlanningSolution annotation
All Superinterfaces:
Move<Solution_>
All Known Implementing Classes:
AbstractMove, AbstractSimplifiedMove, AbstractUndoMove, ChainedChangeMove, ChainedSwapMove, ChangeMove, CompositeMove, KOptListMove, KOptMove, ListAssignMove, ListChangeMove, ListRuinRecreateMove, ListSwapMove, ListUnassignMove, NoChangeMove, PillarChangeMove, PillarSwapMove, RuinRecreateMove, SubChainChangeMove, SubChainReversingChangeMove, SubChainReversingSwapMove, SubChainSwapMove, SubListChangeMove, SubListSwapMove, SubListUnassignMove, SwapMove, TailChainSwapMove, TwoOptListMove

public interface Move<Solution_> extends Move<Solution_>
A Move represents a change of 1 or more PlanningVariables of 1 or more PlanningEntitys in the working PlanningSolution.

Usually the move holds a direct reference to each PlanningEntity of the PlanningSolution which it will change when doMoveOnly(ScoreDirector) is called. On that change it should also notify the ScoreDirector accordingly.

A Move should implement Object.equals(Object) and Object.hashCode() for MoveTabuAcceptor.

An implementation must extend AbstractMove to ensure backwards compatibility in future versions. It is highly recommended to override Move.getPlanningEntities() and Move.getPlanningValues(), otherwise the resulting move will throw an exception when used with Tabu search.

To ease interoperability with Neighborhoods API, this interface extends Move, giving the user an option to override certain methods which they should not. Specifically, the following methods must not be overridden by the user, as suitable default implementations are provided:

The following methods should also not be overridden, on account of being deprecated:

This entire interface exists to provide interoperability with move selectors and will eventually be phased out in favor of the Neighborhoods API. It will be marked as deprecated for removal in a future release.

To avoid having to implement this interface and instead use the new Move API directly, you can use MoveAdapters.toLegacyMoveIterator(Iterator) in your move selectors.

See Also: