Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
- vrpBuilder.addAllJobs(services);
- vrpBuilder.addAllVehicles(vehicles);
- EuclideanCosts costs = new EuclideanCosts();
- // Here I tried 0, 1000, 50, 20, nothing changes
- costs.speed = 500;
- vrpBuilder.setRoutingCost(costs);
- vrpBuilder.setFleetSize(FleetSize.FINITE);
- VehicleRoutingProblem vrp = vrpBuilder.build();
- VehicleRoutingAlgorithm vra = Jsprit.Builder.newInstance(vrp) .setProperty(Jsprit.Parameter.FAST_REGRET, "true")
- .setProperty(Jsprit.Parameter.THREADS, "4")
- .buildAlgorithm();
- Collection tempSolutions = vra.searchSolutions();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement