Class AbstractMove<Solution_>

java.lang.Object
ai.timefold.solver.core.impl.move.streams.generic.move.AbstractMove<Solution_>
All Implemented Interfaces:
Move<Solution_>
Direct Known Subclasses:
ChangeMove, ListAssignMove, ListChangeMove, ListUnassignMove

@NullMarked public abstract class AbstractMove<Solution_> extends Object implements Move<Solution_>
  • Constructor Details

    • AbstractMove

      public AbstractMove()
  • Method Details

    • describe

      public final String describe()
      Description copied from interface: Move
      Describes the move type for statistical purposes. For example, a move which changes a variable "computer" on a class "Process" could be described as "ChangeMove(Process.computer)".

      The format is not formalized. Never parse the String returned by this method.

      Specified by:
      describe in interface Move<Solution_>
      Returns:
      Non-empty String that describes the move type.
    • toString

      public abstract String toString()
      Description copied from interface: Move
      The solver will make sure to only call this when the move is actually printed out during debug logging.
      Specified by:
      toString in interface Move<Solution_>
      Overrides:
      toString in class Object
      Returns:
      A description of the move, ideally including the state of the planning entities being changed.
    • getVariableMetaModels

      protected List<VariableMetaModel<Solution_,?,?>> getVariableMetaModels()
    • getVariableDescriptor

      protected static <Solution_> VariableDescriptor<Solution_> getVariableDescriptor(VariableMetaModel<Solution_,?,?> variableMetaModel)
    • getVariableDescriptor

      protected static <Solution_> GenuineVariableDescriptor<Solution_> getVariableDescriptor(PlanningVariableMetaModel<Solution_,?,?> variableMetaModel)
    • getVariableDescriptor

      protected static <Solution_> ListVariableDescriptor<Solution_> getVariableDescriptor(PlanningListVariableMetaModel<Solution_,?,?> variableMetaModel)
    • rebaseList

      public static <E> List<E> rebaseList(List<E> externalObjectList, ScoreDirector<?> destinationScoreDirector)
    • rebaseSet

      public static <E> Set<E> rebaseSet(Set<E> externalObjectSet, ScoreDirector<?> destinationScoreDirector)