1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

don`t build initial solution if algorithm has one

This commit is contained in:
muzuro 2015-09-01 18:44:39 +03:00
parent 036b235d9c
commit 1664f2d338

View file

@ -136,8 +136,10 @@ public class PrettyAlgorithmBuilder {
vra.addListener(new AlgorithmStartsListener() {
@Override
public void informAlgorithmStarts(VehicleRoutingProblem problem, VehicleRoutingAlgorithm algorithm, Collection<VehicleRoutingProblemSolution> solutions) {
if (solutions.isEmpty()) {
solutions.add(new InsertionInitialSolutionFactory(iniInsertionStrategy, iniObjFunction).createSolution(vrp));
}
}
});
}
addArbitraryListener(vra);