Class MaxRegretKScoringFunction
java.lang.Object
com.graphhopper.jsprit.core.algorithm.recreate.MaxRegretKScoringFunction
- All Implemented Interfaces:
RegretKScoringFunction
Max-based regret-k scoring function.
Computes: score = c_k - c_1 (maximum difference)
This variant uses the maximum regret - the difference between the k-th best alternative and the best. This focuses on the worst-case scenario.
-
Constructor Summary
ConstructorsConstructorDescriptionMaxRegretKScoringFunction(ScoringFunction additionalScorer, int k) Creates a max 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
-
MaxRegretKScoringFunction
Creates a max 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()
-