Class AvgServiceAndShipmentDistance

java.lang.Object
com.graphhopper.jsprit.core.algorithm.ruin.distance.AvgServiceAndShipmentDistance
All Implemented Interfaces:
JobDistance

public class AvgServiceAndShipmentDistance extends Object implements JobDistance
Calculator that calculates average distance between two jobs based on the input-transport costs.

If the distance between two jobs cannot be calculated with input-transport costs, it tries the euclidean distance between these jobs.

Author:
stefan schroeder
  • Constructor Details

  • Method Details

    • getDistance

      public double getDistance(Job i, Job j)
      Calculates and returns the average distance between two jobs based on the input-transport costs.

      If the distance between two jobs cannot be calculated with input-transport costs, it tries the euclidean distance between these jobs.

      Specified by:
      getDistance in interface JobDistance