Class AvgServiceDistance
java.lang.Object
com.graphhopper.jsprit.core.algorithm.ruin.distance.AvgServiceDistance
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDistance(Job i, Job j) Calculates and returns the average distance between two jobs based on the input-transport costs.
-
Constructor Details
-
AvgServiceDistance
-
-
Method Details
-
getDistance
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:
getDistancein interfaceJobDistance
-