Class TrendBasedScoreBounder
- java.lang.Object
-
- org.optaplanner.core.impl.exhaustivesearch.node.bounder.TrendBasedScoreBounder
-
- All Implemented Interfaces:
ScoreBounder
public class TrendBasedScoreBounder extends Object implements ScoreBounder
-
-
Field Summary
Fields Modifier and Type Field Description protected InitializingScoreTrend
initializingScoreTrend
protected ScoreDefinition
scoreDefinition
-
Constructor Summary
Constructors Constructor Description TrendBasedScoreBounder(InnerScoreDirectorFactory scoreDirectorFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Score
calculateOptimisticBound(ScoreDirector scoreDirector, Score score)
In OR terms, this is called the lower bound if they minimize, and upper bound if they maximize.Score
calculatePessimisticBound(ScoreDirector scoreDirector, Score score)
In OR terms, this is called the upper bound if they minimize, and lower bound if they maximize.
-
-
-
Field Detail
-
scoreDefinition
protected final ScoreDefinition scoreDefinition
-
initializingScoreTrend
protected final InitializingScoreTrend initializingScoreTrend
-
-
Constructor Detail
-
TrendBasedScoreBounder
public TrendBasedScoreBounder(InnerScoreDirectorFactory scoreDirectorFactory)
-
-
Method Detail
-
calculateOptimisticBound
public Score calculateOptimisticBound(ScoreDirector scoreDirector, Score score)
Description copied from interface:ScoreBounder
In OR terms, this is called the lower bound if they minimize, and upper bound if they maximize. Because we always maximize theScore
, calling it lower bound would be a contradiction.- Specified by:
calculateOptimisticBound
in interfaceScoreBounder
- Parameters:
scoreDirector
- never null, useScoreDirector.getWorkingSolution()
to get the workingPlanningSolution
score
- never null, theScore
of the workingPlanningSolution
- Returns:
- never null, never worse than the best possible
Score
we can get by initializing the uninitialized variables of the workingPlanningSolution
. - See Also:
ScoreDefinition.buildOptimisticBound(InitializingScoreTrend, Score)
-
calculatePessimisticBound
public Score calculatePessimisticBound(ScoreDirector scoreDirector, Score score)
Description copied from interface:ScoreBounder
In OR terms, this is called the upper bound if they minimize, and lower bound if they maximize. Because we always maximize theScore
, calling it upper bound would be a contradiction.- Specified by:
calculatePessimisticBound
in interfaceScoreBounder
- Parameters:
scoreDirector
- never null, useScoreDirector.getWorkingSolution()
to get the workingPlanningSolution
score
- never null, theScore
of the workingPlanningSolution
- Returns:
- never null, never better than the worst possible
Score
we can get by initializing the uninitialized variables of the workingPlanningSolution
. - See Also:
ScoreDefinition.buildPessimisticBound(InitializingScoreTrend, Score)
-
-