Interface SolutionCostCalculator


public interface SolutionCostCalculator
Interface for all solutionCostCalculators which should be the objective-functions of the problem.

It evaluates VehicleRoutingProblemSolution and returns its costs.

Author:
schroeder
  • Method Details

    • getCosts

      double getCosts(VehicleRoutingProblemSolution solution)
      Returns costs of solution.
      Parameters:
      solution -
      Returns:
      costs
    • getCostBreakdown

      default Map<String,Double> getCostBreakdown(VehicleRoutingProblemSolution solution)
      Returns a breakdown of costs by component name.

      Override this method to provide detailed cost breakdown for analysis and debugging. The default implementation returns null, indicating no breakdown is available.

      Parameters:
      solution - the solution to analyze
      Returns:
      map of component name to cost, or null if breakdown not supported