Class RuinRadial

java.lang.Object
com.graphhopper.jsprit.core.algorithm.ruin.AbstractRuinStrategy
com.graphhopper.jsprit.core.algorithm.ruin.RuinRadial
All Implemented Interfaces:
RuinStrategy

public final class RuinRadial extends AbstractRuinStrategy
RuinStrategy that ruins the neighborhood of a randomly selected job. The size and the structure of the neighborhood is defined by the share of jobs to be removed and the distance between jobs (where distance not necessarily mean Euclidean distance but an arbitrary measure).
Author:
stefan
  • Constructor Details

    • RuinRadial

      public RuinRadial(VehicleRoutingProblem vrp, double fraction2beRemoved, JobDistance jobDistance)
      Constructs RuinRadial.
      Parameters:
      vrp -
      fraction2beRemoved - i.e. the share of jobs to be removed (relative to the total number of jobs in vrp)
      jobDistance - i.e. a measure to define the distance between two jobs and whether they are located close or distant to eachother
    • RuinRadial

      public RuinRadial(VehicleRoutingProblem vrp, int noJobs2beRemoved, JobDistance jobDistance)
    • RuinRadial

      public RuinRadial(VehicleRoutingProblem vrp, int noJobs2beRemoved, JobNeighborhoods neighborhoods)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • ruinRoutes

      public Collection<Job> ruinRoutes(Collection<VehicleRoute> vehicleRoutes)
      Ruins the collection of vehicleRoutes, i.e. removes a share of jobs. First, it selects a job randomly. Second, it identifies its neighborhood. And finally, it removes the neighborhood plus the randomly selected job from the number of vehicleRoutes. All removed jobs are then returned as a collection.
      Specified by:
      ruinRoutes in class AbstractRuinStrategy