|
OptaPlanner core 6.1.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InnerScoreDirector
Method Summary | |
---|---|
void |
assertExpectedWorkingScore(Score expectedWorkingScore,
Object completedAction)
Asserts that if the Score is calculated for the current workingSolution
in the current ScoreDirector (with possibly incremental calculation residue),
it is equal to the parameter expectedWorkingScore . |
void |
assertWorkingScoreFromScratch(Score workingScore,
Object completedAction)
Asserts that if the Score is calculated for the current workingSolution
in a fresh ScoreDirector (with no incremental calculation residue),
it is equal to the parameter workingScore . |
ScoreDirector |
clone()
Clones this ScoreDirector and its workingSolution . |
Solution |
cloneWorkingSolution()
|
int |
countWorkingSolutionUninitializedVariables()
|
long |
getCalculateCount()
|
ScoreDefinition |
getScoreDefinition()
|
InnerScoreDirectorFactory |
getScoreDirectorFactory()
|
SolutionDescriptor |
getSolutionDescriptor()
|
Object |
getTrailingEntity(GenuineVariableDescriptor chainedVariableDescriptor,
Object planningValue)
|
int |
getWorkingEntityCount()
|
List<Object> |
getWorkingEntityList()
|
long |
getWorkingEntityListRevision()
|
int |
getWorkingValueCount()
|
boolean |
isWorkingEntityListDirty(long expectedWorkingEntityListRevision)
|
boolean |
isWorkingSolutionInitialized()
|
void |
setAllChangesWillBeUndoneBeforeStepEnds(boolean allChangesWillBeUndoneBeforeStepEnds)
Do not waste performance by propagating changes to step (or higher) mechanisms. |
Methods inherited from interface org.optaplanner.core.impl.score.director.ScoreDirector |
---|
afterEntityAdded, afterEntityRemoved, afterProblemFactAdded, afterProblemFactChanged, afterProblemFactRemoved, afterVariableChanged, afterVariableChanged, beforeEntityAdded, beforeEntityRemoved, beforeProblemFactAdded, beforeProblemFactChanged, beforeProblemFactRemoved, beforeVariableChanged, beforeVariableChanged, calculateScore, dispose, getConstraintMatchTotals, getWorkingSolution, isConstraintMatchEnabled, setWorkingSolution |
Method Detail |
---|
long getWorkingEntityListRevision()
isWorkingEntityListDirty(long)
later onboolean isWorkingEntityListDirty(long expectedWorkingEntityListRevision)
expectedWorkingEntityListRevision
- an
InnerScoreDirectorFactory getScoreDirectorFactory()
SolutionDescriptor getSolutionDescriptor()
ScoreDefinition getScoreDefinition()
Solution cloneWorkingSolution()
int getWorkingEntityCount()
List<Object> getWorkingEntityList()
int getWorkingValueCount()
int countWorkingSolutionUninitializedVariables()
boolean isWorkingSolutionInitialized()
workingSolution
is initializedlong getCalculateCount()
ScoreDirector clone()
ScoreDirector
and its workingSolution
.
Use ScoreDirector.getWorkingSolution()
to retrieve the workingSolution
of that clone.
This is heavy method, because it usually breaks incremental score calculation. Use it sparingly.
Therefore it's best to clone lazily by delaying the clone call as long as possible.
Object getTrailingEntity(GenuineVariableDescriptor chainedVariableDescriptor, Object planningValue)
chainedVariableDescriptor
- never null, must be GenuineVariableDescriptor.isChained()
true
and known to the SolutionDescriptor
planningValue
- sometimes null
void setAllChangesWillBeUndoneBeforeStepEnds(boolean allChangesWillBeUndoneBeforeStepEnds)
allChangesWillBeUndoneBeforeStepEnds
- true if all changes will be undonevoid assertExpectedWorkingScore(Score expectedWorkingScore, Object completedAction)
Score
is calculated for the current workingSolution
in the current ScoreDirector
(with possibly incremental calculation residue),
it is equal to the parameter expectedWorkingScore
.
Used to assert that skipping ScoreDirector.calculateScore()
(when the score is otherwise determined) is correct,
expectedWorkingScore
- never nullcompletedAction
- sometimes null, when assertion fails then the completedAction's Object.toString()
is included in the exception messagevoid assertWorkingScoreFromScratch(Score workingScore, Object completedAction)
Score
is calculated for the current workingSolution
in a fresh ScoreDirector
(with no incremental calculation residue),
it is equal to the parameter workingScore
.
Furthermore, if the assert fails, a score corruption analysis might be included in the exception message.
workingScore
- never nullcompletedAction
- sometimes null, when assertion fails then the completedAction's Object.toString()
is included* in the exception messageInnerScoreDirectorFactory.assertScoreFromScratch(Solution)
|
OptaPlanner core 6.1.0.Final | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |