mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6d7087f8ca
3 changed files with 39 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
Change-log
|
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
|
**v1.4** @ 2014-09-08
|
||||||
|
|
||||||
<b>! Break change !</b>
|
<b>! Break change !</b>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,12 @@ WHATS NEW
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
<b>2014-09-25</b> new release **v1.4.1**
|
||||||
|
|
||||||
|
It contains a fix of a critical bug (see [#134](https://github.com/jsprit/jsprit/issues/134)).
|
||||||
|
|
||||||
|
------------------------------
|
||||||
|
|
||||||
<b>2014-09-08</b> new release **v1.4**
|
<b>2014-09-08</b> 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.
|
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.
|
||||||
|
|
|
||||||
|
|
@ -288,7 +288,12 @@ public class VehicleRoutingProblem {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an initial vehicle route.
|
||||||
|
*
|
||||||
|
* @param route initial route
|
||||||
|
* @return the builder
|
||||||
|
*/
|
||||||
public Builder addInitialVehicleRoute(VehicleRoute route){
|
public Builder addInitialVehicleRoute(VehicleRoute route){
|
||||||
addVehicle((AbstractVehicle)route.getVehicle());
|
addVehicle((AbstractVehicle)route.getVehicle());
|
||||||
for(TourActivity act : route.getActivities()){
|
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<VehicleRoute> routes){
|
public Builder addInitialVehicleRoutes(Collection<VehicleRoute> routes){
|
||||||
for(VehicleRoute r : routes){
|
for(VehicleRoute r : routes){
|
||||||
addInitialVehicleRoute(r);
|
addInitialVehicleRoute(r);
|
||||||
|
|
@ -728,20 +739,37 @@ public class VehicleRoutingProblem {
|
||||||
return activityCosts;
|
return activityCosts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return returns all location, i.e. from vehicles and jobs.
|
||||||
|
*/
|
||||||
public Locations getLocations(){
|
public Locations getLocations(){
|
||||||
return locations;
|
return locations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param job for which the corresponding activities needs to be returned
|
||||||
|
* @return associated activities
|
||||||
|
*/
|
||||||
public List<AbstractActivity> getActivities(Job job){
|
public List<AbstractActivity> getActivities(Job job){
|
||||||
return Collections.unmodifiableList(activityMap.get(job));
|
return Collections.unmodifiableList(activityMap.get(job));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return total number of activities
|
||||||
|
*/
|
||||||
public int getNuActivities(){ return nuActivities; }
|
public int getNuActivities(){ return nuActivities; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return factory that creates the activities associated to a job
|
||||||
|
*/
|
||||||
public JobActivityFactory getJobActivityFactory(){
|
public JobActivityFactory getJobActivityFactory(){
|
||||||
return jobActivityFactory;
|
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<AbstractActivity> copyAndGetActivities(Job job){
|
public List<AbstractActivity> copyAndGetActivities(Job job){
|
||||||
List<AbstractActivity> acts = new ArrayList<AbstractActivity>();
|
List<AbstractActivity> acts = new ArrayList<AbstractActivity>();
|
||||||
if(activityMap.containsKey(job)) {
|
if(activityMap.containsKey(job)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue