GraphHopper.com | Forum | GitHub | Maps | Blog

How to improve overall execution time


#1

Hello,

I am trying to solve a problem with 1500 shipments and 20 vehicles (with same vehicle type) with 36 threads. The total time taken was - 8853.256 seconds (More that 2 hours)

PFA log below :
> 2017-04-04 10:46:30 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.problem.VehicleRoutingProblem.(VehicleRoutingProblem.java:596).{39}:596] : setup problem: [fleetSize=FINITE][#jobs=1500][#vehicles=20][#vehicleTypes=1][transportCost=com.graphhopper.jsprit.core.util.VehicleRoutingTransportCostsMatrix@5b6c11f2][activityCosts=com.graphhopper.jsprit.core.problem.cost.WaitingTimeCosts@4fc9b295]
2017-04-04 10:46:37 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm.searchSolutions(VehicleRoutingAlgorithm.java:194).searchSolutions{39}:194] : algorithm starts: [maxIterations=100]
2017-04-04 10:46:37 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.InsertionInitialSolutionFactory.createSolution(InsertionInitialSolutionFactory.java:52).createSolution{39}:52] : create initial solution
2017-04-04 10:47:44 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm.searchSolutions(VehicleRoutingAlgorithm.java:202).searchSolutions{39}:202] : iterations start
2017-04-04 10:47:44 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm$Counter.incCounter(VehicleRoutingAlgorithm.java:79).incCounter{39}:79] : iterations 1
2017-04-04 10:48:24 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm$Counter.incCounter(VehicleRoutingAlgorithm.java:79).incCounter{39}:79] : iterations 2
2017-04-04 10:50:06 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm$Counter.incCounter(VehicleRoutingAlgorithm.java:79).incCounter{39}:79] : iterations 4
2017-04-04 10:53:51 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm$Counter.incCounter(VehicleRoutingAlgorithm.java:79).incCounter{39}:79] : iterations 8
2017-04-04 11:02:46 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm$Counter.incCounter(VehicleRoutingAlgorithm.java:79).incCounter{39}:79] : iterations 16
2017-04-04 11:20:06 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm$Counter.incCounter(VehicleRoutingAlgorithm.java:79).incCounter{39}:79] : iterations 32
2017-04-04 11:58:56 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm$Counter.incCounter(VehicleRoutingAlgorithm.java:79).incCounter{39}:79] : iterations 64
2017-04-04 13:14:10 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm.searchSolutions(VehicleRoutingAlgorithm.java:219).searchSolutions{39}:219] : iterations end at 100 iterations
2017-04-04 13:14:10 - [INFO] [Executor-9] [com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm.searchSolutions(VehicleRoutingAlgorithm.java:222).searchSolutions{39}:222] : took 8853.256 seconds

Could you please tell me if this is expected time or i am doing something wrong here.


#2

Can anyone tell me if i am thinking right or please point in right direction here.

Thanks!


#3

if possible, maybe try dividing the problem into a few smaller problems? For example, divide the region into, say, 5 zones, each zone with a few hundred shipments and a few vehicles, and call jsprit to solve for each of them.