mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
variable departure times and waiting time opt
This commit is contained in:
parent
1604a637a5
commit
552729d7ee
10 changed files with 403 additions and 14 deletions
|
|
@ -18,7 +18,7 @@ package jsprit.examples;
|
|||
|
||||
import jsprit.analysis.toolbox.Plotter;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import jsprit.core.algorithm.box.Jsprit;
|
||||
import jsprit.core.problem.Location;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.VehicleRoutingProblem.FleetSize;
|
||||
|
|
@ -58,7 +58,7 @@ public class CostMatrixExample {
|
|||
Service s2 = Service.Builder.newInstance("2").addSizeDimension(0, 1).setLocation(Location.newInstance("2")).build();
|
||||
Service s3 = Service.Builder.newInstance("3").addSizeDimension(0, 1).setLocation(Location.newInstance("3")).build();
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Assume the following symmetric distance-matrix
|
||||
* from,to,distance
|
||||
|
|
@ -98,7 +98,7 @@ public class CostMatrixExample {
|
|||
VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().setFleetSize(FleetSize.INFINITE).setRoutingCost(costMatrix)
|
||||
.addVehicle(vehicle).addJob(s1).addJob(s2).addJob(s3).build();
|
||||
|
||||
VehicleRoutingAlgorithm vra = VehicleRoutingAlgorithms.readAndCreateAlgorithm(vrp, "input/fastAlgo.xml");
|
||||
VehicleRoutingAlgorithm vra = Jsprit.createAlgorithm(vrp);
|
||||
|
||||
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue