Very long-running optimization job

Hi all.
I’m trying to run a problem that has 1323 jobs and 18 vehicles.
As you can see in these log lines

INFO  [2019-06-19 15:36:54,133] com.graphhopper.jsprit.core.problem.VehicleRoutingProblem: setup problem: [fleetSize=FINITE][#jobs=1323][#vehicles=18][#vehicleTypes=12][transportCost=CostMatrixFactory$FastVehicleRoutingTransportCost
sMatrixWithTimeMultiplier@1d67d6e4][activityCosts=com.graphhopper.jsprit.core.problem.cost.WaitingTimeCosts@3b2bdf92]
INFO  [2019-06-19 15:36:54,523] SolverManager: Problem e135fee6-235e-432d-a96e-afc07c19d50c: [fleetSize=FINITE][#jobs=1323][#vehicles=18][#vehicleTypes=12][transportCost=CostMatrixFactory$FastVehicleRoutingTr
ansportCostsMatrixWithTimeMultiplier@1d67d6e4][activityCosts=com.graphhopper.jsprit.core.problem.cost.WaitingTimeCosts@3b2bdf92]
INFO  [2019-06-19 15:36:54,523] com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm: algorithm starts: [maxIterations=1024]
INFO  [2019-06-19 15:36:54,524] com.graphhopper.jsprit.core.algorithm.InsertionInitialSolutionFactory: create initial solution

It started to create the initial solution yesterday, and it’s not done yet (over 24hs later). It’s running on 4 CPUs with the following parameters

			algorithmBuilder.setProperty(Parameter.ITERATIONS, "1024");
			algorithmBuilder.setProperty(Parameter.FAST_REGRET, "true");
			algorithmBuilder.setProperty(Parameter.THREADS, "4");

The jobs have no dependencies among them, so I think fast regret is fine. I added a run-time-based PrematureAlgorithmTermination but since that is evaluated between iterations, and it’s still running the first iteration, it’s never finishing.

I’m not sure why it’s taking SO long.

Any ideas on what I might need to tweak to make it faster?

Thanks!

1 Like

@stefan, @karussell, do you know of anything I could try?
Thanks!

Use bestinsertion for construction. It will be much faster in this case.

Thanks! I will try that!