mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge branch 'master' into OPTI-871-serialize-vrp-object
This commit is contained in:
commit
cea61b104e
1 changed files with 18 additions and 0 deletions
|
|
@ -123,6 +123,8 @@ public class VehicleRoute {
|
|||
|
||||
private Set<Shipment> openShipments = new HashSet<Shipment>();
|
||||
|
||||
private Object routeData;
|
||||
|
||||
private JobActivityFactory jobActivityFactory = new JobActivityFactory() {
|
||||
|
||||
@Override
|
||||
|
|
@ -171,6 +173,11 @@ public class VehicleRoute {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder setRouteData(Object routeData) {
|
||||
this.routeData = routeData;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a service to this route. Activity is initialized with .getTimeWindow(). If you want to explicitly set another time window
|
||||
* use .addService(Service service, TimeWindow timeWindow)
|
||||
|
|
@ -335,6 +342,8 @@ public class VehicleRoute {
|
|||
|
||||
private End end;
|
||||
|
||||
private Object routeData;
|
||||
|
||||
/**
|
||||
* Copy constructor copying a route.
|
||||
*
|
||||
|
|
@ -346,6 +355,7 @@ public class VehicleRoute {
|
|||
this.tourActivities = TourActivities.copyOf(route.getTourActivities());
|
||||
this.vehicle = route.getVehicle();
|
||||
this.driver = route.getDriver();
|
||||
this.routeData = route.getRouteData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -359,6 +369,7 @@ public class VehicleRoute {
|
|||
this.driver = builder.driver;
|
||||
this.start = builder.start;
|
||||
this.end = builder.end;
|
||||
this.routeData = builder.routeData;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -397,6 +408,9 @@ public class VehicleRoute {
|
|||
return driver;
|
||||
}
|
||||
|
||||
public Object getRouteData() {
|
||||
return routeData;
|
||||
}
|
||||
/**
|
||||
* Sets the vehicle and its departureTime from <code>vehicle.getStartLocationId()</code>.
|
||||
* <p>
|
||||
|
|
@ -473,6 +487,10 @@ public class VehicleRoute {
|
|||
return end;
|
||||
}
|
||||
|
||||
public void setRouteData(Object routeData) {
|
||||
this.routeData = routeData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[start=" + start + "][end=" + end + "][departureTime=" + start.getEndTime() + "][vehicle=" + vehicle + "][driver=" + driver + "][nuOfActs=" + tourActivities.getActivities().size() + "]";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue