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:
parent
036b235d9c
commit
1664f2d338
1 changed files with 3 additions and 1 deletions
|
|
@ -136,7 +136,9 @@ public class PrettyAlgorithmBuilder {
|
|||
vra.addListener(new AlgorithmStartsListener() {
|
||||
@Override
|
||||
public void informAlgorithmStarts(VehicleRoutingProblem problem, VehicleRoutingAlgorithm algorithm, Collection<VehicleRoutingProblemSolution> solutions) {
|
||||
solutions.add(new InsertionInitialSolutionFactory(iniInsertionStrategy, iniObjFunction).createSolution(vrp));
|
||||
if (solutions.isEmpty()) {
|
||||
solutions.add(new InsertionInitialSolutionFactory(iniInsertionStrategy, iniObjFunction).createSolution(vrp));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue