org.drools.planner.core.solver
Class AbstractSolverScope

java.lang.Object
  extended by org.drools.planner.core.solver.AbstractSolverScope
Direct Known Subclasses:
BruteForceSolverScope, LocalSearchSolverScope

public abstract class AbstractSolverScope
extends Object


Field Summary
protected  Score bestScore
           
protected  Solution bestSolution
           
protected  int bestSolutionStepIndex
           
protected  long calculateCount
           
static String GLOBAL_SCORE_CALCULATOR_KEY
           
protected  org.slf4j.Logger logger
           
protected  org.drools.RuleBase ruleBase
           
protected  ScoreDefinition scoreDefinition
           
protected  Score startingScore
           
protected  long startingSystemTimeMillis
           
protected  org.drools.StatefulSession workingMemory
           
protected  Random workingRandom
           
protected  ScoreCalculator workingScoreCalculator
           
protected  Solution workingSolution
           
 
Constructor Summary
AbstractSolverScope()
           
 
Method Summary
 void assertWorkingScore(Score presumedScore)
           
 String buildConstraintOccurrenceSummary()
          Calls buildConstraintOccurrenceSummary(WorkingMemory) with the current workingMemory.
 String buildConstraintOccurrenceSummary(org.drools.WorkingMemory summaryWorkingMemory)
          TODO Refactor this with the ConstraintOccurrenceTotal class: https://jira.jboss.org/jira/browse/JBRULES-2510
 Score calculateScoreFromWorkingMemory()
           
 long calculateTimeMillisSpend()
           
 Score getBestScore()
           
 Solution getBestSolution()
           
 int getBestSolutionStepIndex()
           
 long getCalculateCount()
           
 org.drools.RuleBase getRuleBase()
           
 ScoreDefinition getScoreDefinition()
           
 Score getStartingScore()
           
 long getStartingSystemTimeMillis()
           
 org.drools.WorkingMemory getWorkingMemory()
           
 Random getWorkingRandom()
           
 ScoreCalculator getWorkingScoreCalculator()
           
 Solution getWorkingSolution()
           
 void reset()
           
 void setBestScore(Score bestScore)
           
 void setBestSolution(Solution bestSolution)
           
 void setBestSolutionStepIndex(int bestSolutionStepIndex)
           
 void setRuleBase(org.drools.RuleBase ruleBase)
           
 void setScoreDefinition(ScoreDefinition scoreDefinition)
           
 void setStartingScore(Score startingScore)
           
 void setStartingSystemTimeMillis(long startingSystemTimeMillis)
           
 void setWorkingRandom(Random workingRandom)
           
 void setWorkingScoreCalculator(ScoreCalculator workingScoreCalculator)
           
 void setWorkingSolution(Solution workingSolution)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

ruleBase

protected org.drools.RuleBase ruleBase

scoreDefinition

protected ScoreDefinition scoreDefinition

startingSystemTimeMillis

protected long startingSystemTimeMillis

workingSolution

protected Solution workingSolution

workingMemory

protected org.drools.StatefulSession workingMemory

workingScoreCalculator

protected ScoreCalculator workingScoreCalculator

workingRandom

protected Random workingRandom

startingScore

protected Score startingScore

calculateCount

protected long calculateCount

bestSolutionStepIndex

protected int bestSolutionStepIndex

bestSolution

protected Solution bestSolution

bestScore

protected Score bestScore
Constructor Detail

AbstractSolverScope

public AbstractSolverScope()
Method Detail

getRuleBase

public org.drools.RuleBase getRuleBase()

setRuleBase

public void setRuleBase(org.drools.RuleBase ruleBase)

getScoreDefinition

public ScoreDefinition getScoreDefinition()

setScoreDefinition

public void setScoreDefinition(ScoreDefinition scoreDefinition)

getStartingSystemTimeMillis

public long getStartingSystemTimeMillis()

setStartingSystemTimeMillis

public void setStartingSystemTimeMillis(long startingSystemTimeMillis)

getWorkingSolution

public Solution getWorkingSolution()

setWorkingSolution

public void setWorkingSolution(Solution workingSolution)

getWorkingMemory

public org.drools.WorkingMemory getWorkingMemory()

getWorkingScoreCalculator

public ScoreCalculator getWorkingScoreCalculator()

setWorkingScoreCalculator

public void setWorkingScoreCalculator(ScoreCalculator workingScoreCalculator)

getWorkingRandom

public Random getWorkingRandom()

setWorkingRandom

public void setWorkingRandom(Random workingRandom)

getStartingScore

public Score getStartingScore()

setStartingScore

public void setStartingScore(Score startingScore)

getCalculateCount

public long getCalculateCount()

getBestSolutionStepIndex

public int getBestSolutionStepIndex()

setBestSolutionStepIndex

public void setBestSolutionStepIndex(int bestSolutionStepIndex)

getBestSolution

public Solution getBestSolution()

setBestSolution

public void setBestSolution(Solution bestSolution)

getBestScore

public Score getBestScore()

setBestScore

public void setBestScore(Score bestScore)

reset

public void reset()

calculateScoreFromWorkingMemory

public Score calculateScoreFromWorkingMemory()

calculateTimeMillisSpend

public long calculateTimeMillisSpend()

assertWorkingScore

public void assertWorkingScore(Score presumedScore)
Parameters:
presumedScore - never null

buildConstraintOccurrenceSummary

public String buildConstraintOccurrenceSummary()
Calls buildConstraintOccurrenceSummary(WorkingMemory) with the current workingMemory.

Returns:
never null

buildConstraintOccurrenceSummary

public String buildConstraintOccurrenceSummary(org.drools.WorkingMemory summaryWorkingMemory)
TODO Refactor this with the ConstraintOccurrenceTotal class: https://jira.jboss.org/jira/browse/JBRULES-2510

Parameters:
summaryWorkingMemory - sometimes null
Returns:
never null


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.