SHARE
TWEET

Untitled

a guest Sep 14th, 2017 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
  2. vrpBuilder.addAllJobs(services);
  3. vrpBuilder.addAllVehicles(vehicles);
  4. EuclideanCosts costs = new EuclideanCosts();
  5. // Here I tried 0, 1000, 50, 20, nothing changes
  6. costs.speed = 500;
  7. vrpBuilder.setRoutingCost(costs);
  8. vrpBuilder.setFleetSize(FleetSize.FINITE);
  9. VehicleRoutingProblem vrp = vrpBuilder.build();
  10. VehicleRoutingAlgorithm vra = Jsprit.Builder.newInstance(vrp) .setProperty(Jsprit.Parameter.FAST_REGRET, "true")
  11. .setProperty(Jsprit.Parameter.THREADS, "4")
  12. .buildAlgorithm();
  13. Collection tempSolutions = vra.searchSolutions();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top