mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add stateManager
This commit is contained in:
parent
9489b5f716
commit
1563610bb0
1 changed files with 3 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ import jsprit.analysis.toolbox.Plotter;
|
|||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import jsprit.core.algorithm.state.StateManager;
|
||||
import jsprit.core.algorithm.termination.IterationWithoutImprovementTermination;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.VehicleRoutingProblem.Builder;
|
||||
|
|
@ -107,6 +108,8 @@ public class BicycleMessenger {
|
|||
|
||||
VehicleRoutingProblem bicycleMessengerProblem = problemBuilder.build();
|
||||
|
||||
StateManager stateManager = new StateManager(bicycleMessengerProblem);
|
||||
|
||||
VehicleRoutingAlgorithm algorithm = VehicleRoutingAlgorithms.readAndCreateAlgorithm(bicycleMessengerProblem,"input/algorithmConfig_open.xml");
|
||||
algorithm.setPrematureAlgorithmTermination(new IterationWithoutImprovementTermination(200));
|
||||
Collection<VehicleRoutingProblemSolution> solutions = algorithm.searchSolutions();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue