|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.planner.core.score.definition.AbstractScoreDefinition<HardAndSoftLongScore>
org.drools.planner.core.score.buildin.hardandsoftlong.HardAndSoftLongScoreDefinition
public class HardAndSoftLongScoreDefinition
Constructor Summary | |
---|---|
HardAndSoftLongScoreDefinition()
|
Method Summary | |
---|---|
ScoreCalculator |
buildScoreCalculator()
TODO remove when the rule that sums the final score can be written as a single rule and ScoreCalculator is dead |
double |
calculateTimeGradient(HardAndSoftLongScore startScore,
HardAndSoftLongScore endScore,
HardAndSoftLongScore score)
See explanation in Termination.calculateSolverTimeGradient(DefaultSolverScope) . |
HardAndSoftLongScore |
getPerfectMaximumScore()
The perfect maximum score is the score of which there is no better in any problem instance. |
HardAndSoftLongScore |
getPerfectMinimumScore()
The perfect minimum score is the score of which there is no worser in any problem instance. |
Score |
parseScore(String scoreString)
Parses the String and returns a Score. |
void |
setHardScoreTimeGradientWeight(double hardScoreTimeGradientWeight)
It's recommended to use a number which can be exactly represented as a double, such as 0.5, 0.25, 0.75, 0.125, ... but not 0.1, 0.2, ... |
void |
setPerfectMaximumScore(HardAndSoftLongScore perfectMaximumScore)
|
void |
setPerfectMinimumScore(HardAndSoftLongScore perfectMinimumScore)
|
Double |
translateScoreToGraphValue(HardAndSoftLongScore score)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HardAndSoftLongScoreDefinition()
Method Detail |
---|
public void setHardScoreTimeGradientWeight(double hardScoreTimeGradientWeight)
hardScoreTimeGradientWeight
- 0.0 <= hardScoreTimeGradientWeight <= 1.0public void setPerfectMaximumScore(HardAndSoftLongScore perfectMaximumScore)
public void setPerfectMinimumScore(HardAndSoftLongScore perfectMinimumScore)
public HardAndSoftLongScore getPerfectMaximumScore()
ScoreDefinition
getPerfectMaximumScore
in interface ScoreDefinition<HardAndSoftLongScore>
getPerfectMaximumScore
in class AbstractScoreDefinition<HardAndSoftLongScore>
public HardAndSoftLongScore getPerfectMinimumScore()
ScoreDefinition
getPerfectMinimumScore
in interface ScoreDefinition<HardAndSoftLongScore>
getPerfectMinimumScore
in class AbstractScoreDefinition<HardAndSoftLongScore>
public Score parseScore(String scoreString)
ScoreDefinition
scoreString
- never null
public double calculateTimeGradient(HardAndSoftLongScore startScore, HardAndSoftLongScore endScore, HardAndSoftLongScore score)
ScoreDefinition
Termination.calculateSolverTimeGradient(DefaultSolverScope)
.
startScore
- never nullendScore
- never nullscore
- never null
public Double translateScoreToGraphValue(HardAndSoftLongScore score)
score
- never null
public ScoreCalculator buildScoreCalculator()
ScoreDefinition
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |