Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
oblonski committed Mar 28, 2020
1 parent a3a4e6f commit 1ebf236
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ public void setProportionOfUnassignedJobsToBeReinserted(double proportionOfUnass
@Override
public VehicleRoutingProblemSolution runAndGetSolution(VehicleRoutingProblemSolution previousVrpSolution) {
Collection<Job> ruinedJobs = ruin.ruin(previousVrpSolution.getRoutes());
Set<Job> ruinedJobSet = new HashSet<>();
ruinedJobSet.addAll(ruinedJobs);
Set<Job> ruinedJobSet = new HashSet<>(ruinedJobs);
List<Job> stillUnassignedInThisIteration = new ArrayList<>();
if (previousVrpSolution.getUnassignedJobs().size() < minUnassignedJobsToBeReinserted) {
ruinedJobSet.addAll(previousVrpSolution.getUnassignedJobs());
Expand All @@ -100,8 +99,7 @@ public VehicleRoutingProblemSolution runAndGetSolution(VehicleRoutingProblemSolu
previousVrpSolution.getUnassignedJobs().clear();
previousVrpSolution.getUnassignedJobs().addAll(unassignedJobs);
previousVrpSolution.getUnassignedJobs().addAll(stillUnassignedInThisIteration);
VehicleRoutingProblemSolution newSolution = previousVrpSolution;
return newSolution;
return previousVrpSolution;

}

Expand Down

0 comments on commit 1ebf236

Please sign in to comment.