Class RuinRadial
java.lang.Object
com.graphhopper.jsprit.core.algorithm.ruin.AbstractRuinStrategy
com.graphhopper.jsprit.core.algorithm.ruin.RuinRadial
- All Implemented Interfaces:
RuinStrategy
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
-
Field Summary
Fields inherited from class com.graphhopper.jsprit.core.algorithm.ruin.AbstractRuinStrategy
jobFilter, random, ruinShareFactory -
Constructor Summary
ConstructorsConstructorDescriptionRuinRadial(VehicleRoutingProblem vrp, double fraction2beRemoved, JobDistance jobDistance) Constructs RuinRadial.RuinRadial(VehicleRoutingProblem vrp, int noJobs2beRemoved, JobDistance jobDistance) RuinRadial(VehicleRoutingProblem vrp, int noJobs2beRemoved, JobNeighborhoods neighborhoods) -
Method Summary
Modifier and TypeMethodDescriptionruinRoutes(Collection<VehicleRoute> vehicleRoutes) Ruins the collection of vehicleRoutes, i.e.toString()Methods inherited from class com.graphhopper.jsprit.core.algorithm.ruin.AbstractRuinStrategy
addListener, filterJobs, getListeners, getRuinShareFactory, removeJob, removeJob, removeListener, ruin, setJobFilter, setRandom, setRuinShareFactory
-
Constructor Details
-
RuinRadial
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
-
RuinRadial
-
-
Method Details
-
toString
-
ruinRoutes
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:
ruinRoutesin classAbstractRuinStrategy
-