1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

Add clusterRuin to xml algorithm config

This commit is contained in:
braktar 2016-04-05 12:19:41 +02:00 committed by braktar
parent 91298022ab
commit 094dd9305a
3 changed files with 56 additions and 6 deletions

View file

@ -0,0 +1,20 @@
package com.graphhopper.jsprit.core.algorithm.ruin;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;
public class ClusterRuinStrategyFactory implements RuinStrategyFactory {
private int initialNumberJobsToRemove;
private JobNeighborhoods jobNeighborhoods;
public ClusterRuinStrategyFactory(int initialNumberJobsToRemove, JobNeighborhoods jobNeighborhoods) {
super();
this.initialNumberJobsToRemove = initialNumberJobsToRemove;
this.jobNeighborhoods = jobNeighborhoods;
}
@Override
public RuinStrategy createStrategy(VehicleRoutingProblem vrp) {
return new RuinClusters(vrp, initialNumberJobsToRemove, jobNeighborhoods);
}
}