mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add and test new ruin strategy: cluster ruin based on dbscan clusterer
This commit is contained in:
parent
708400a34a
commit
f4dc5e3b8d
8 changed files with 356 additions and 30 deletions
|
|
@ -21,6 +21,7 @@ package jsprit.examples;
|
|||
import jsprit.analysis.toolbox.Plotter;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithmBuilder;
|
||||
import jsprit.core.algorithm.box.Jsprit;
|
||||
import jsprit.core.algorithm.state.StateManager;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.constraint.ConstraintManager;
|
||||
|
|
@ -90,9 +91,7 @@ public class SolomonWithSkillsExample {
|
|||
ConstraintManager constraintManager = new ConstraintManager(skillProblem,stateManager);
|
||||
constraintManager.addSkillsConstraint();
|
||||
|
||||
VehicleRoutingAlgorithm vra = vraBuilder.build();
|
||||
// vra.setMaxIterations(500);
|
||||
|
||||
VehicleRoutingAlgorithm vra = Jsprit.Builder.newInstance(skillProblem).setStateAndConstraintManager(stateManager,constraintManager).buildAlgorithm();
|
||||
|
||||
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
|
||||
VehicleRoutingProblemSolution solution = Solutions.bestOf(solutions);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue