org.drools.planner.core.solution.director
Class DefaultSolutionDirector
java.lang.Object
org.drools.planner.core.solution.director.DefaultSolutionDirector
- All Implemented Interfaces:
- SolutionDirector
public class DefaultSolutionDirector
- extends Object
- implements SolutionDirector
Default implementation for SolutionDirector
.
- See Also:
SolutionDirector
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GLOBAL_SCORE_CALCULATOR_KEY
public static final String GLOBAL_SCORE_CALCULATOR_KEY
- See Also:
- Constant Field Values
logger
protected final transient org.slf4j.Logger logger
solutionDescriptor
protected SolutionDescriptor solutionDescriptor
ruleBase
protected org.drools.RuleBase ruleBase
scoreDefinition
protected ScoreDefinition scoreDefinition
workingSolution
protected Solution workingSolution
workingMemory
protected org.drools.StatefulSession workingMemory
workingScoreCalculator
protected ScoreCalculator workingScoreCalculator
calculateCount
protected long calculateCount
DefaultSolutionDirector
public DefaultSolutionDirector()
getSolutionDescriptor
public SolutionDescriptor getSolutionDescriptor()
setSolutionDescriptor
public void setSolutionDescriptor(SolutionDescriptor solutionDescriptor)
getRuleBase
public org.drools.RuleBase getRuleBase()
setRuleBase
public void setRuleBase(org.drools.RuleBase ruleBase)
getScoreDefinition
public ScoreDefinition getScoreDefinition()
setScoreDefinition
public void setScoreDefinition(ScoreDefinition scoreDefinition)
getWorkingSolution
public Solution getWorkingSolution()
- Description copied from interface:
SolutionDirector
- The
Solution
that is used in the WorkingMemory
.
If the Solution
has been changed since SolutionDirector.calculateScoreFromWorkingMemory()
has been called,
the Solution.getScore()
of this Solution
won't be correct.
- Specified by:
getWorkingSolution
in interface SolutionDirector
- Returns:
- never null
setWorkingSolution
public void setWorkingSolution(Solution workingSolution)
getWorkingMemory
public org.drools.WorkingMemory getWorkingMemory()
- Specified by:
getWorkingMemory
in interface SolutionDirector
- Returns:
- never null
getCalculateCount
public long getCalculateCount()
resetCalculateCount
public void resetCalculateCount()
getWorkingFacts
public Collection<Object> getWorkingFacts()
getWorkingPlanningEntityList
public List<Object> getWorkingPlanningEntityList()
isWorkingSolutionInitialized
public boolean isWorkingSolutionInitialized()
calculateScoreFromWorkingMemory
public Score calculateScoreFromWorkingMemory()
- Description copied from interface:
SolutionDirector
- Calculates the and updates the workingSolution accordingly.
- Specified by:
calculateScoreFromWorkingMemory
in interface SolutionDirector
- Returns:
- never null, the score of the working solution
dispose
public void dispose()
assertWorkingScore
public void assertWorkingScore(Score presumedScore)
- Parameters:
presumedScore
- never null
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.