Class RegretKScoringFunctionAdapter

java.lang.Object
com.graphhopper.jsprit.core.algorithm.recreate.RegretKScoringFunctionAdapter
All Implemented Interfaces:
RegretKScoringFunction

public class RegretKScoringFunctionAdapter extends Object implements RegretKScoringFunction
Adapter that wraps a legacy RegretScoringFunction to work with the new RegretKScoringFunction interface. Enables backward compatibility.
  • Constructor Details

    • RegretKScoringFunctionAdapter

      public RegretKScoringFunctionAdapter(RegretScoringFunction legacyScoringFunction)
  • Method Details

    • score

      public double score(RegretKAlternatives alternatives, Job job)
      Description copied from interface: RegretKScoringFunction
      Computes a score for a job based on its k-best insertion alternatives. Higher scores indicate higher urgency to insert the job now.
      Specified by:
      score in interface RegretKScoringFunction
      Parameters:
      alternatives - the k-best insertion alternatives for the job
      job - the job being scored
      Returns:
      the regret score (higher = more urgent to insert)
    • getLegacyScoringFunction

      public RegretScoringFunction getLegacyScoringFunction()