diff --git a/CHANGELOG.md b/CHANGELOG.md index 24666785..b7b096ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ Change-log ========== +**v1.4.1** @ 2014-09-25 +- bugfix [#131](https://github.com/jsprit/jsprit/issues/131) +- bugfix [#134](https://github.com/jsprit/jsprit/issues/134) + **v1.4** @ 2014-09-08 ! Break change ! diff --git a/WHATS_NEW.md b/WHATS_NEW.md index cf92105b..48f7cfee 100644 --- a/WHATS_NEW.md +++ b/WHATS_NEW.md @@ -3,6 +3,12 @@ WHATS NEW ------------------------------ +2014-09-25 new release **v1.4.1** + +It contains a fix of a critical bug (see [#134](https://github.com/jsprit/jsprit/issues/134)). + +------------------------------ + 2014-09-08 new release **v1.4** v1.4 breaks your code! Look at [changelog](https://github.com/jsprit/jsprit/blob/master/CHANGELOG.md) to migrate from v1.3.1 to v1.4. diff --git a/jsprit-core/src/main/java/jsprit/core/problem/VehicleRoutingProblem.java b/jsprit-core/src/main/java/jsprit/core/problem/VehicleRoutingProblem.java index 1c4f4fdc..eaa43f38 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/VehicleRoutingProblem.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/VehicleRoutingProblem.java @@ -288,7 +288,12 @@ public class VehicleRoutingProblem { } - + /** + * Adds an initial vehicle route. + * + * @param route initial route + * @return the builder + */ public Builder addInitialVehicleRoute(VehicleRoute route){ addVehicle((AbstractVehicle)route.getVehicle()); for(TourActivity act : route.getActivities()){ @@ -324,6 +329,12 @@ public class VehicleRoutingProblem { } } + /** + * Adds a collection of initial vehicle routes. + * + * @param routes initial routes + * @return the builder + */ public Builder addInitialVehicleRoutes(Collection routes){ for(VehicleRoute r : routes){ addInitialVehicleRoute(r); @@ -728,20 +739,37 @@ public class VehicleRoutingProblem { return activityCosts; } + /** + * @return returns all location, i.e. from vehicles and jobs. + */ public Locations getLocations(){ return locations; } + /** + * @param job for which the corresponding activities needs to be returned + * @return associated activities + */ public List getActivities(Job job){ return Collections.unmodifiableList(activityMap.get(job)); } + /** + * @return total number of activities + */ public int getNuActivities(){ return nuActivities; } + /** + * @return factory that creates the activities associated to a job + */ public JobActivityFactory getJobActivityFactory(){ return jobActivityFactory; } + /** + * @param job for which the corresponding activities needs to be returned + * @return a copy of the activities that are associated to the specified job + */ public List copyAndGetActivities(Job job){ List acts = new ArrayList(); if(activityMap.containsKey(job)) {