Class TourStrategy

java.lang.Object
com.graphhopper.routing.util.tour.TourStrategy
Direct Known Subclasses:
MultiPointTour, SinglePointTour

public abstract class TourStrategy extends Object
Defines the strategy of creating tours.
Author:
Robin Boldt
  • Field Details

    • random

      protected final Random random
    • overallDistance

      protected final double overallDistance
  • Constructor Details

    • TourStrategy

      public TourStrategy(Random random, double distanceInMeter)
  • Method Details

    • getNumberOfGeneratedPoints

      public abstract int getNumberOfGeneratedPoints()
      Defines the number of points that are generated
    • getDistanceForIteration

      public abstract double getDistanceForIteration(int iteration)
      Returns the distance in meter that is used for the generated point of a certain iteration
    • getHeadingForIteration

      public abstract double getHeadingForIteration(int iteration)
      Returns the north based heading between 0 and 360 for a certain iteration.
    • slightlyModifyDistance

      protected double slightlyModifyDistance(double distance)
      Modifies the Distance up to +-10%