Class Route
- java.lang.Object
-
- org.optaweb.vehiclerouting.domain.Route
-
- Direct Known Subclasses:
RouteWithTrack
public class Route extends Object
Vehicle's itinerary (sequence of visits) and its depot. This entity cannot exist without the vehicle and the depot but it's allowed to have no visits when the vehicle hasn't been assigned any (it's idle).This entity describes part of a
solutionof the vehicle routing problem (assignment of a subset of visits to one of the vehicles). It doesn't carry the data about physical tracks between adjacent visits. Geographical data is held byRouteWithTrack.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Locationdepot()Depot in which the route starts and ends.StringtoString()Vehiclevehicle()The vehicle assigned to this route.List<Location>visits()List of vehicle's visits (not including the depot).
-
-
-
Method Detail
-
vehicle
public Vehicle vehicle()
The vehicle assigned to this route.- Returns:
- route's vehicle (never
null)
-
depot
public Location depot()
Depot in which the route starts and ends.- Returns:
- route's depot (never
null)
-
visits
public List<Location> visits()
List of vehicle's visits (not including the depot).- Returns:
- list of visits
-
-