|Modifier and Type||Field and Description|
|Constructor and Description|
|Modifier and Type||Method and Description|
Called before the move is done, so the move can be evaluated and then be undone without resulting into a permanent change in the solution.
Called before a move is evaluated to decide whether the move can be done and evaluated.
equals, getEntity, getPlanningEntities, getPlanningValues, getSimpleMoveTypeDescription, getToPlanningValue, getVariableName, hashCode, toString
doMove, rebaseArray, rebaseList
protected final Object oldTrailingEntity
protected final Object newTrailingEntity
public ChainedChangeMove(Object entity, GenuineVariableDescriptor<Solution_> variableDescriptor, SingletonInverseVariableSupply inverseVariableSupply, Object toPlanningValue)
public boolean isMoveDoable(ScoreDirector<Solution_> scoreDirector)
It is recommended to keep this method implementation simple: do not use it in an attempt to satisfy normal hard and soft constraints.
public ChainedChangeMove<Solution_> createUndoMove(ScoreDirector<Solution_> scoreDirector)
protected void doMoveOnGenuineVariables(ScoreDirector<Solution_> scoreDirector)
AbstractMove.doMove(ScoreDirector)but without the
AbstractMove.doMove(ScoreDirector)already does that).
public ChainedChangeMove<Solution_> rebase(ScoreDirector<Solution_> destinationScoreDirector)
ScoreDirectorto another destination
ScoreDirectorwhich is usually on another
Threador JVM. The new move returned by this method translates the entities and problem facts to the destination
PlanningSolutionof the destination
ScoreDirector, That destination
PlanningSolutionis a deep planning clone (or an even deeper clone) of the origin
PlanningSolutionthat this move has been generated from.
That new move does the exact same change as this move,
resulting in the same
presuming that destination
PlanningSolution was in the same state
as the original
PlanningSolution to begin with.
Generally speaking, an implementation of this method iterates through every entity and fact instance in this move,
translates each one to the destination
and creates a new move instance of the same move type, using those translated instances.
PlanningSolution can be in a different state than the original
So, rebasing can only depend on the identity of
planning entities and planning facts,
which is usually declared by a
PlanningId on those classes.
It must not depend on the state of the
One thread might rebase a move before, amid or after another thread does that same move instance.
This method is thread-safe.
destinationScoreDirector- never null, the
ScoreDirector.getWorkingSolution()that the new move should change the planning entity instances of.
Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.