OptaPlanner core 6.0.0.CR2

org.optaplanner.core.impl.score.director.simple
Class SimpleScoreDirector

java.lang.Object
  extended by org.optaplanner.core.impl.score.director.AbstractScoreDirector<SimpleScoreDirectorFactory>
      extended by org.optaplanner.core.impl.score.director.simple.SimpleScoreDirector
All Implemented Interfaces:
Cloneable, ScoreDirector

public class SimpleScoreDirector
extends AbstractScoreDirector<SimpleScoreDirectorFactory>

Simple java implementation of ScoreDirector, which recalculates the Score of the Solution workingSolution every time. This is non-incremental calculation, which is slow.

See Also:
ScoreDirector

Field Summary
 
Fields inherited from class org.optaplanner.core.impl.score.director.AbstractScoreDirector
calculateCount, constraintMatchEnabledPreference, logger, scoreDirectorFactory, trailingEntityMapSupport, variableListenerSupport, workingSolution
 
Constructor Summary
SimpleScoreDirector(SimpleScoreDirectorFactory scoreDirectorFactory, SimpleScoreCalculator simpleScoreCalculator)
           
 
Method Summary
 Score calculateScore()
          Calculates the Score and updates the workingSolution accordingly.
 
Methods inherited from class org.optaplanner.core.impl.score.director.AbstractScoreDirector
afterEntityAdded, afterEntityAdded, afterEntityRemoved, afterEntityRemoved, afterProblemFactAdded, afterProblemFactChanged, afterProblemFactRemoved, afterShadowVariableChanged, afterVariableChanged, afterVariableChanged, appendLegacyConstraintOccurrences, assertExpectedWorkingScore, assertWorkingScoreFromScratch, beforeEntityAdded, beforeEntityAdded, beforeEntityRemoved, beforeEntityRemoved, beforeProblemFactAdded, beforeProblemFactChanged, beforeProblemFactRemoved, beforeShadowVariableChanged, beforeVariableChanged, beforeVariableChanged, buildScoreCorruptionAnalysis, clone, cloneWorkingSolution, countWorkingSolutionUninitializedVariables, dispose, getCalculateCount, getConstraintMatchTotals, getScoreDefinition, getScoreDirectorFactory, getSolutionDescriptor, getTrailingEntity, getWorkingEntityCount, getWorkingEntityList, getWorkingSolution, getWorkingValueCount, isConstraintMatchEnabled, isWorkingSolutionInitialized, setCalculatedScore, setWorkingSolution, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleScoreDirector

public SimpleScoreDirector(SimpleScoreDirectorFactory scoreDirectorFactory,
                           SimpleScoreCalculator simpleScoreCalculator)
Method Detail

calculateScore

public Score calculateScore()
Description copied from interface: ScoreDirector
Calculates the Score and updates the workingSolution accordingly.

Returns:
never null, the Score of the workingSolution

OptaPlanner core 6.0.0.CR2

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.