|
||||||||||
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 | |
---|---|
ScoreHolder |
buildScoreHolder()
TODO JBRULES-2238 remove when the rule that sums the final score can be written as a single rule and ScoreHolder 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)
|
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 ScoreHolder buildScoreHolder()
ScoreDefinition
ScoreHolder
is dead
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |