|
||||||||||
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<HardAndSoftScore>
org.drools.planner.core.score.buildin.hardandsoft.HardAndSoftScoreDefinition
public class HardAndSoftScoreDefinition
Constructor Summary | |
---|---|
HardAndSoftScoreDefinition()
|
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(HardAndSoftScore startScore,
HardAndSoftScore endScore,
HardAndSoftScore score)
See explanation in Termination.calculateSolverTimeGradient(DefaultSolverScope) . |
HardAndSoftScore |
getPerfectMaximumScore()
The perfect maximum score is the score of which there is no better in any problem instance. |
HardAndSoftScore |
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(HardAndSoftScore perfectMaximumScore)
|
void |
setPerfectMinimumScore(HardAndSoftScore perfectMinimumScore)
|
Double |
translateScoreToGraphValue(HardAndSoftScore score)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HardAndSoftScoreDefinition()
Method Detail |
---|
public void setHardScoreTimeGradientWeight(double hardScoreTimeGradientWeight)
hardScoreTimeGradientWeight
- 0.0 <= hardScoreTimeGradientWeight <= 1.0public void setPerfectMaximumScore(HardAndSoftScore perfectMaximumScore)
public void setPerfectMinimumScore(HardAndSoftScore perfectMinimumScore)
public HardAndSoftScore getPerfectMaximumScore()
ScoreDefinition
getPerfectMaximumScore
in interface ScoreDefinition<HardAndSoftScore>
getPerfectMaximumScore
in class AbstractScoreDefinition<HardAndSoftScore>
public HardAndSoftScore getPerfectMinimumScore()
ScoreDefinition
getPerfectMinimumScore
in interface ScoreDefinition<HardAndSoftScore>
getPerfectMinimumScore
in class AbstractScoreDefinition<HardAndSoftScore>
public Score parseScore(String scoreString)
ScoreDefinition
scoreString
- never null
public double calculateTimeGradient(HardAndSoftScore startScore, HardAndSoftScore endScore, HardAndSoftScore score)
ScoreDefinition
Termination.calculateSolverTimeGradient(DefaultSolverScope)
.
startScore
- never nullendScore
- never nullscore
- never null
public Double translateScoreToGraphValue(HardAndSoftScore score)
score
- never null
public ScoreCalculator buildScoreCalculator()
ScoreDefinition
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |