org.optaplanner.core.impl.score.definition
public interface ScoreDefinition<S extends Score>
Modifier and Type | Method and Description |
---|---|
ScoreHolder |
buildScoreHolder(boolean constraintMatchEnabled) |
double |
calculateTimeGradient(S startScore,
S endScore,
S score)
See explanation in
Termination.calculateSolverTimeGradient(DefaultSolverScope) . |
String |
formatScore(Score score)
|
S |
getPerfectMaximumScore()
|
S |
getPerfectMinimumScore()
|
Class<S> |
getScoreClass()
|
Score |
parseScore(String scoreString)
|
S getPerfectMaximumScore()
Score
is the Score
of which there is no better in any problem instance.
This doesn't mean that the current problem instance, or any problem instance for that matter,
could ever attain that Score
.
For example, most cases have a perfect maximum Score
of zero, as most use cases only have negative
constraints.S getPerfectMinimumScore()
Score
is the Score
of which there is no worse in any problem instance.
This doesn't mean that the current problem instance, or any problem instance for that matter,
could ever attain such a bad Score
.
For example, most cases have a perfect minimum Score
of negative infinity.String formatScore(Score score)
score
- never nullparseScore(String)
Score parseScore(String scoreString)
scoreString
- never nullformatScore(Score)
double calculateTimeGradient(S startScore, S endScore, S score)
Termination.calculateSolverTimeGradient(DefaultSolverScope)
.startScore
- never nullendScore
- never nullscore
- never nullScoreHolder buildScoreHolder(boolean constraintMatchEnabled)
constraintMatchEnabled
- true if ScoreHolder.isConstraintMatchEnabled()
should be trueCopyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.