Class SumRegretKScoringFunction
java.lang.Object
com.graphhopper.jsprit.core.algorithm.recreate.SumRegretKScoringFunction
- All Implemented Interfaces:
RegretKScoringFunction
Sum-based regret-k scoring function.
Computes: score = sum(c_i - c_1) for i=2..k
This is the standard regret-k formulation where the score is the sum of differences between each alternative's cost and the best cost. For k=2, this is equivalent to the classic regret-2 formula: c_2 - c_1.
-
Constructor Summary
ConstructorsConstructorDescriptionSumRegretKScoringFunction(ScoringFunction additionalScorer, int k) Creates a sum regret-k scoring function. -
Method Summary
Modifier and TypeMethodDescriptionintgetK()doublescore(RegretKAlternatives alternatives, Job job) Computes a score for a job based on its k-best insertion alternatives.
-
Constructor Details
-
SumRegretKScoringFunction
Creates a sum regret-k scoring function.- Parameters:
additionalScorer- additional scoring function for tie-breaking (can be null)k- the number of alternatives to consider (use Integer.MAX_VALUE for "all")
-
-
Method Details
-
score
Description copied from interface:RegretKScoringFunctionComputes a score for a job based on its k-best insertion alternatives. Higher scores indicate higher urgency to insert the job now.- Specified by:
scorein interfaceRegretKScoringFunction- Parameters:
alternatives- the k-best insertion alternatives for the jobjob- the job being scored- Returns:
- the regret score (higher = more urgent to insert)
-
getK
public int getK()
-